Peano
Loading...
Searching...
No Matches
VertexWiseContinuousMemoryPool.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6namespace toolbox {
7 namespace particles {
8 namespace memorypool {
9 template <class T>
10 struct VertexWiseContinuousMemoryPool;
11 } // namespace memorypool
12 } // namespace particles
13} // namespace toolbox
14
15
29template <class T>
31 public:
32 typedef std::list<T*> Container;
33
35
37
43 void scatter();
44
45
55 typename Container::iterator scatterAndUpdateIterator( const typename Container::iterator& p );
56
75 void gather();
76
82 bool isGathered() const;
83
94 void replace( typename Container::iterator p, T* newCopy );
95
102
112
113 private:
115
120};
121
122
123#include "VertexWiseContinuousMemoryPool.cpph"
124
Log Device.
Definition Log.h:517
Memory pool offering continuous global memory for a particle species.
static bool requestCompleteScatter()
Recommend complete scatter.
void scatter()
If the data are scattered already, nothing is to be done.
Container::iterator scatterAndUpdateIterator(const typename Container::iterator &p)
Scatter the data if not scattered yet and return the updated iterator.
bool isGathered() const
Is the vertex data gathered.
void clearAndReset()
Clears the underlying list of pointers and resets _gatheredDataPointer to nullptr.
void replace(typename Container::iterator p, T *newCopy)
Replace particle.