|
| BlockData (Cuboid< T, D > &cuboid, int overlap=0, int size=1) |
|
| BlockData (BlockStructureD< D > &&block, int size=1) |
|
| BlockData (BlockF< U, D > &blockF) |
|
| BlockData (BlockData< D, T, U > &&)=default |
|
virtual | ~BlockData ()=default |
|
bool | operator() (T output[], const int input[]) |
|
Column< U > & | getColumn (unsigned iD) |
|
U & | get (std::size_t iCell, int iD=0) |
|
U & | get (LatticeR< D > latticeR, int iD=0) |
|
U | get (LatticeR< D > latticeR, int iD=0) const |
|
Platform | getPlatform () const |
|
bool | hasCommunicatable (std::type_index field) const |
|
auto & | getCommunicatable (std::type_index field) |
|
unsigned | getSize () const |
|
std::size_t | getNblock () const override |
| Returns the number of blocks.
|
|
std::size_t | getSerializableSize () const override |
| Returns the binary size of the data to be saved.
|
|
bool * | getBlock (std::size_t iBlock, std::size_t &sizeBlock, bool loadingMode) override |
| Returns the address of the i-th block and its size.
|
|
| BlockStructureD (Vector< int, D > size, int padding=0) |
|
| BlockStructureD () |
|
int | getNx () const |
| Read only access to block width.
|
|
int | getNy () const |
| Read only access to block height.
|
|
int | getNz () const |
| Read only access to block height.
|
|
LatticeR< D > | getExtent () const |
|
int | getPadding () const |
| Read only access to padding.
|
|
std::size_t | getNcells () const |
| Get number of cells.
|
|
CellID | getCellId (LatticeR< D > latticeR) const |
| Get 1D cell ID.
|
|
template<typename... L> |
std::enable_if_t< sizeof...(L)==D, CellID > | getCellId (L... latticeR) const |
|
CellDistance | getNeighborDistance (LatticeR< D > dir) const |
| Get 1D neighbor distance.
|
|
bool | isInside (LatticeR< D > latticeR) const |
| Return whether location is valid.
|
|
bool | isInsideCore (LatticeR< D > latticeR) const |
| Return whether location is inside core.
|
|
bool | isPadding (LatticeR< D > latticeR) const |
| Return whether location is valid.
|
|
template<typename... L> |
std::enable_if_t< sizeof...(L)==D, bool > | isInside (L... latticeR) const |
|
CellDistance | getNeighborhoodRadius (LatticeR< D > latticeR) const |
| Return maximum valid neighborhood sphere radius w.r.t. latticeR.
|
|
template<typename F > |
void | forSpatialLocations (F f) const |
|
template<typename F > |
void | forSpatialLocationsParallel (F f) const |
|
template<typename F > |
void | forSpatialLocations (LatticeR< D > min, LatticeR< D > max, F f) const |
|
template<typename F > |
void | forCoreSpatialLocations (F f) const |
|
template<typename F > |
void | forCellIndices (F f) const |
|
virtual | ~Serializable ()=default |
|
template<bool includeLogOutputDir = true> |
bool | save (std::string fileName="", const bool enforceUint=false) |
| Save Serializable into file fileName
|
|
template<bool includeLogOutputDir = true> |
bool | load (std::string fileName="", const bool enforceUint=false) |
| Load Serializable from file fileName
|
|
bool | save (std::uint8_t *buffer) |
| Save Serializable into buffer of length getSerializableSize
|
|
bool | load (const std::uint8_t *buffer) |
| Load Serializable from buffer of length getSerializableSize
|
|
virtual void | postLoad () |
|
|
template<typename DataType > |
void | registerVar (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, const DataType &data, const size_t arrayLength=1) const |
| Register primitive data types (int , double , ...) or arrays of those.
|
|
template<typename DataType > |
void | registerSerializableOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false) |
| Register Serializable object of constant size.
|
|
template<typename DataType > |
void | registerSerializablesOfConstSize (const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType *data, const size_t arrayLength, const bool loadingMode=false) |
| Register an array of Serializable objects of constant size.
|
|
template<unsigned D, typename T, typename U>
class olb::BlockData< D, T, U >
Definition at line 41 of file blockData.h.
template<unsigned D, typename T , typename U >
bool * olb::BlockData< D, T, U >::getBlock |
( |
std::size_t | iBlock, |
|
|
std::size_t & | sizeBlock, |
|
|
bool | loadingMode ) |
|
overridevirtual |
Returns the address of the i-th block and its size.
- Parameters
-
iBlock | Index of the block to be returned |
sizeBlock | Reference to the size of the returned block |
- Returns
- Pointer to the current block
Each getBlock()
method should look like this:
std::size_t currentBlock = 0;
bool* dataPtr = nullptr;
// ... register methods...
return dataPtr;
Implements olb::Serializable.
Definition at line 136 of file blockData.hh.
137{
138 std::size_t currentBlock = 0;
139 bool* dataPtr = nullptr;
140
141 for (
unsigned iD=0; iD <
_size; ++iD) {
143 }
144
145 return dataPtr;
146}
void registerSerializableOfConstSize(const std::size_t iBlock, std::size_t &sizeBlock, std::size_t ¤tBlock, bool *&dataPtr, DataType &data, const bool loadingMode=false)
Register Serializable object of constant size.