#include <ObjectArena.h>
Public Member Functions | |
| ObjectArena (void) | |
| ~ObjectArena (void) | |
| void | setBlockSize (int n) |
| Type * | getNewArray (int n) |
Definition at line 16 of file ObjectArena.h.
|
||||||||||
|
Definition at line 18 of file ObjectArena.h. 00018 : blockSize(1024), alignment(1), pos(0), end(0) { };
|
|
||||||||||
|
Definition at line 19 of file ObjectArena.h. 00019 {
00020 int i;
00021 for( i = 0; i < blocks.size(); ++i ) delete [] blocks[i];
00022 }
|
|
||||||||||
|
Definition at line 49 of file ObjectArena.h. Referenced by ComputeNonbondedCUDA::build_exclusions(), ComputeMap::storeCompute(), PatchMap::unpack(), and ComputeMap::unpack(). 00049 {
00050 Type *rpos = pos;
00051 if ( n > (blockSize/2) ) {
00052 rpos = new Type[n];
00053 blocks.add(rpos);
00054 } else if ( ( pos += n ) > end ) {
00055 rpos = pos = new Type[blockSize];
00056 blocks.add(pos);
00057 end = rpos + blockSize;
00058 pos += n;
00059 }
00060 return rpos;
00061 }
|
|
||||||||||
|
Definition at line 23 of file ObjectArena.h. Referenced by ComputeMap::allocateCids(), PatchMap::unpack(), and ComputeMap::unpack(). 00023 { blockSize = n; }
|
1.3.9.1