|
Schnek
|
Allocate a single array for multidimensional grids in C ordering. More...
#include <single-array-allocation.hpp>

Classes | |
| struct | SizeInfo |
Public Types | |
| typedef Array< int, rank > | IndexType |
| The grid index type. | |
| typedef Range< int, rank > | RangeType |
| The grid range type. | |
Public Member Functions | |
| SingleArrayInstantAllocation () | |
| Default constructor. | |
| SingleArrayInstantAllocation (const SingleArrayInstantAllocation< T, rank > &) | |
| Copy constructor. | |
| SingleArrayInstantAllocation< T, rank > & | operator= (const SingleArrayInstantAllocation< T, rank > &) |
| Assignment operator. | |
| ~SingleArrayInstantAllocation () | |
| destructor | |
Protected Types | |
| typedef std::function< void()> | UpdaterType |
Protected Member Functions | |
| void | resizeImpl (const IndexType &lo, const IndexType &hi) |
| resizes to grid with lower indices lo[0],...,lo[rank-1] and upper indices hi[0],...,hi[rank-1] | |
| void | onUpdate (const UpdaterType &updater) |
| Add an updater to the data. More... | |
Protected Attributes | |
| std::shared_ptr< internal::SingleArrayAllocationData< T, SizeInfo > > | data |
| The pointer to the data. | |
| size_t | size |
| The length of the allocated array. | |
| RangeType | range |
| The lowest and highest coordinates in the grid (inclusive) | |
| IndexType | dims |
The dimensions of the grid dims = high - low + 1 | |
Allocate a single array for multidimensional grids in C ordering.
Deallocation and allocation is performed on every resize.
| T | The type of data stored in the grid |
| rank | The rank of the grid |
|
protected |
Add an updater to the data.
The updater is called when the data is resized.