STORMM Source Documentation
|
The table of contents keeps a list of arrays and specific values as well as text-based strings describing them. The strings can come from Hybrid objects' labels, for example, but can also accept arbitrary character strings. More...
#include <binary_encoding.h>
Public Member Functions | |
template<typename T> | |
void | addScalar (T parm, const std::string &description_in=std::string("")) |
Add a critical scalar constant to the table of contents. Every added array gets its own sizing constants (size of the element, number of elements), and the number of arrays also gets automatic inclusion. Constants like the time step size, simulation time constant, or fixed-precision bit counts are also critical to interpreting a binary file. Only data scalar types may be included in the table of contents, as they will be decomposed into a program-specific bit string describing their attributes. | |
template<typename T2> | |
void | addTuple2 (T2 parm, const std::string &description_in=std::string("")) |
Add a two-component tuple to the table of contents. Descriptions of input parameters follow from addScalar(), above. | |
template<typename T3> | |
void | addTuple3 (T3 parm, const std::string &description_in=std::string("")) |
Add a three-component tuple to the table of contents. Descriptions of input parameters follow from addScalar(), above. | |
template<typename T4> | |
void | addTuple4 (T4 parm, const std::string &description_in=std::string("")) |
Add a four-component tuple to the table of contents. Descriptions of input parameters follow from addScalar(), above. | |
BinaryFileKey (const std::string &description_in=std::string("")) | |
The constructor can take one or more arrays as well as specific objects, for convenience. | |
template<typename T> | |
BinaryFileKey (const T *content, size_t length, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
template<typename T> | |
BinaryFileKey (const std::vector< T > *content, const std::string &description_in=std::string("")) | |
template<typename T> | |
BinaryFileKey (const std::vector< T > &content, const std::string &description_in=std::string("")) | |
template<typename T> | |
BinaryFileKey (const Hybrid< T > *content, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
template<typename T> | |
BinaryFileKey (const Hybrid< T > &content, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const CoordinateFrame *cf, const std::string &description_in=std::string(default_cf_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const CoordinateFrame &cf, const std::string &description_in=std::string(default_cf_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const PhaseSpace *ps, const std::string &description_in=std::string(default_ps_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const PhaseSpace &ps, const std::string &description_in=std::string(default_ps_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
template<typename T> | |
BinaryFileKey (const CoordinateSeries< T > *content, const std::string &description_in=std::string(default_cs_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
template<typename T> | |
BinaryFileKey (const CoordinateSeries< T > &content, const std::string &description_in=std::string(default_cs_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const PhaseSpaceSynthesis *content, const std::string &description_in=std::string(default_polyps_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
BinaryFileKey (const PhaseSpaceSynthesis &content, const std::string &description_in=std::string(default_polyps_descriptor), HybridTargetLevel tier_in=HybridTargetLevel::HOST) | |
void | addArray (const void *vptr, size_t length, size_t ct_vptr, bool repeating_in, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) |
Add a new array to the current table of contents. The array will be appended by default, but specifying a position for the array among the list is possible. Overloading and descriptions of input parameters follow from the constructor, above, in addition to: | |
template<typename T> | |
void | addArray (const T *content, size_t length, bool repeating_in, const std::string &description_in, HybridTargetLevel tier_in=HybridTargetLevel::HOST) |
template<typename T> | |
void | addArray (const std::vector< T > *content, bool repeating_in, const std::string &description_in=std::string("")) |
template<typename T> | |
void | addArray (const std::vector< T > &content, bool repeating_in, const std::string &description_in=std::string("")) |
template<typename T> | |
void | addArray (const Hybrid< T > *content, bool repeating_in, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) |
template<typename T> | |
void | addArray (const Hybrid< T > &content, bool repeating_in, const std::string &description_in=std::string(""), HybridTargetLevel tier_in=HybridTargetLevel::HOST) |
The table of contents keeps a list of arrays and specific values as well as text-based strings describing them. The strings can come from Hybrid objects' labels, for example, but can also accept arbitrary character strings.
stormm::diskutil::BinaryFileKey::BinaryFileKey | ( | const std::string & | description_in = std::string("") | ) |
The constructor can take one or more arrays as well as specific objects, for convenience.
Overloaded:
content | An array or STORMM object with data to write to the binary file |
length | Trusted length of content, if provided as a C-style array |
desc | The description of the array initializing the table of contents |
void stormm::diskutil::BinaryFileKey::addArray | ( | const void * | vptr, |
size_t | length, | ||
size_t | ct_vptr, | ||
bool | repeating_in, | ||
const std::string & | description_in = std::string(""), | ||
HybridTargetLevel | tier_in = HybridTargetLevel::HOST ) |
Add a new array to the current table of contents. The array will be appended by default, but specifying a position for the array among the list is possible. Overloading and descriptions of input parameters follow from the constructor, above, in addition to:
vptr | The void-casted pointer of whatever data array in its raw form. The pointer may address memory on the CPU host or GPU device. |
void stormm::diskutil::BinaryFileKey::addScalar | ( | T | parm, |
const std::string & | description_in = std::string("") ) |
Add a critical scalar constant to the table of contents. Every added array gets its own sizing constants (size of the element, number of elements), and the number of arrays also gets automatic inclusion. Constants like the time step size, simulation time constant, or fixed-precision bit counts are also critical to interpreting a binary file. Only data scalar types may be included in the table of contents, as they will be decomposed into a program-specific bit string describing their attributes.
parm | The parameter to include in the table of contents |
desc | The description of the parameter |