11 namespace memorypool {
141 void replace(
typename Container::iterator p, T* newCopy);
Memory pool offering continuous global memory for a particle species.
static bool requestCompleteScatter()
Recommend complete scatter.
static tarch::logging::Log _log
void gather()
Gather the particle.
void clearAndReset()
Clear dataset tied to one vertex.
GlobalContinuousMemoryPool()
T * _gatheredDataPointer
Is nullptr as long as data is not gathered.
Container::iterator scatterAndUpdateIterator(const typename Container::iterator &p)
int _globalMemoryPage
Equals UndefinedPoolReference as long as data is not gathered.
bool isGathered() const
Is the vertex data gathered.
void replace(typename Container::iterator p, T *newCopy)
Replace particle.
std::list< T * > Container
static constexpr int UndefinedMemoryPage
Container container
List of pointers.
void scatter()
Scatter the data.
static GlobalMemory _globalMemory
This class attribute represents the global data space for all of the particles.
Represents the global memory.
GlobalMemory(int initialSize)
void freePage(int pageNumber)
Free a page.
tarch::multicore::BooleanSemaphore semaphore
int totalUsedSize() const
Take last page's start index, add its size and you get the result.
int additionalEntriesRequested
Number of entries that we would have liked to have.
std::vector< Page > pages
int addPage(int size)
Add a new page of size size.