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
101 void clearAndReset();
102
111 static bool requestCompleteScatter();
112
113 private:
115
120};
121
122
124
Log Device.
Definition Log.h:516
Memory pool offering continuous global memory for a particle species.
Container::iterator scatterAndUpdateIterator(const typename Container::iterator &p)
Scatter the data if not scattered yet and return the updated iterator.
void scatter()
If the data are scattered already, nothing is to be done.
void clearAndReset()
Clears the underlying list of pointers and resets _gatheredDataPointer to nullptr.
void replace(typename Container::iterator p, T *newCopy)
Replace particle.