#include <ComputeNonbondedUtil.h>
Public Member Functions | |
Pairlists () | |
~Pairlists () | |
plint * | newlist (int max_size) |
plint * | newlist () |
void | newsize (int list_size) |
void | reset () |
void | nextlist (plint **list, int *list_size) |
int | getSize () |
void | addIndex () |
void | setIndexValue (plint i) |
plint | getIndexValue () |
Definition at line 35 of file ComputeNonbondedUtil.h.
Pairlists::Pairlists | ( | ) | [inline] |
Definition at line 43 of file ComputeNonbondedUtil.h.
00043 : size(initsize) { data = new plint[initsize]; }
Pairlists::~Pairlists | ( | ) | [inline] |
Definition at line 44 of file ComputeNonbondedUtil.h.
void Pairlists::addIndex | ( | ) | [inline] |
Definition at line 75 of file ComputeNonbondedUtil.h.
plint Pairlists::getIndexValue | ( | ) | [inline] |
Definition at line 82 of file ComputeNonbondedUtil.h.
int Pairlists::getSize | ( | ) | [inline] |
Definition at line 73 of file ComputeNonbondedUtil.h.
plint* Pairlists::newlist | ( | ) | [inline] |
Definition at line 60 of file ComputeNonbondedUtil.h.
plint* Pairlists::newlist | ( | int | max_size | ) | [inline] |
Definition at line 45 of file ComputeNonbondedUtil.h.
References newsize().
Referenced by ComputeLCPO::doForce().
00045 { // get a new list w/ room for max_size 00046 int reqnewsize = curpos + max_size + 1; 00047 int newsize = size; 00048 while ( newsize < reqnewsize ) { newsize += newsize >> 1; } 00049 if ( newsize > size ) { 00050 plint *newdata = new plint[newsize]; 00051 CmiMemcpy(newdata,data,curpos*sizeof(plint)); 00052 delete [] data; 00053 data = newdata; 00054 size = newsize; 00055 } 00056 return &data[curpos+1]; 00057 }
void Pairlists::newsize | ( | int | list_size | ) | [inline] |
Definition at line 64 of file ComputeNonbondedUtil.h.
Referenced by ComputeLCPO::doForce(), newlist(), and pairlistFromAll().
void Pairlists::nextlist | ( | plint ** | list, | |
int * | list_size | |||
) | [inline] |
Definition at line 69 of file ComputeNonbondedUtil.h.
Referenced by ComputeNonbondedUtil::calcGBIS(), and ComputeLCPO::doForce().
void Pairlists::reset | ( | ) | [inline] |
Definition at line 68 of file ComputeNonbondedUtil.h.
Referenced by ComputeNonbondedUtil::calcGBIS(), ComputeLCPO::doForce(), and pairlistFromAll().
void Pairlists::setIndexValue | ( | plint | i | ) | [inline] |
Definition at line 78 of file ComputeNonbondedUtil.h.