openPMD-api
|
Public definitions of openPMD-api. More...
Typedefs | |
using | iterator_t = Container< Iteration, uint64_t >::iterator |
using | ChunkTable = std::vector< WrittenChunkInfo > |
using | Extent = std::vector< std::uint64_t > |
using | Offset = std::vector< std::uint64_t > |
typedef Access | AccessType |
Enumerations | |
enum | Datatype : int { CHAR = 0, UCHAR, SHORT, INT, LONG, LONGLONG, USHORT, UINT, ULONG, ULONGLONG, FLOAT, DOUBLE, LONG_DOUBLE, CFLOAT, CDOUBLE, CLONG_DOUBLE, STRING, VEC_CHAR, VEC_SHORT, VEC_INT, VEC_LONG, VEC_LONGLONG, VEC_UCHAR, VEC_USHORT, VEC_UINT, VEC_ULONG, VEC_ULONGLONG, VEC_FLOAT, VEC_DOUBLE, VEC_LONG_DOUBLE, VEC_CFLOAT, VEC_CDOUBLE, VEC_CLONG_DOUBLE, VEC_STRING, ARR_DBL_7, BOOL, DATATYPE = 1000, UNDEFINED } |
Concrete datatype of an object available at runtime. | |
enum | Access { Access::READ_ONLY, Access::READ_WRITE, Access::CREATE } |
File access mode to use during IO. More... | |
enum | Format { HDF5, ADIOS1, ADIOS2, ADIOS2_SST, JSON, DUMMY } |
File format to use during IO. | |
enum | IterationEncoding { fileBased, groupBased } |
Encoding scheme of an Iterations Series'. More... | |
enum | AdvanceStatus : unsigned char { OK, OVER } |
In step-based mode (i.e. More... | |
enum | AdvanceMode : unsigned char { BEGINSTEP, ENDSTEP } |
In step-based mode (i.e. More... | |
enum | StepStatus : unsigned char { DuringStep, NoStep } |
Used in step-based mode (i.e. More... | |
enum | UnitDimension : uint8_t { UnitDimension::L = 0, UnitDimension::M, UnitDimension::T, UnitDimension::I, UnitDimension::theta, UnitDimension::N, UnitDimension::J } |
Physical dimension of a record. More... | |
Functions | |
void | warnWrongDtype (std::string const &key, Datatype store, Datatype request) |
std::ostream & | operator<< (std::ostream &os, openPMD::Datatype const &d) |
Datatype | stringToDatatype (std::string s) |
std::string | datatypeToString (openPMD::Datatype dt) |
Datatype | basicDatatype (Datatype dt) |
basicDatatype Strip openPMD Datatype of std::vector, std::array et. More... | |
Datatype | toVectorType (Datatype dt) |
Format | determineFormat (std::string const &filename) |
Determine the storage format of a Series from the used filename extension. More... | |
std::string | suffix (Format f) |
Determine the default filename suffix for a given storage format. More... | |
std::shared_ptr< AbstractIOHandler > | createIOHandler (std::string path, Access access, Format format, MPI_Comm comm, std::string const &options="{}") |
Construct an appropriate specific IOHandler for the desired IO mode that may be MPI-aware. More... | |
std::shared_ptr< AbstractIOHandler > | createIOHandler (std::string path, Access access, Format format, std::string const &options="{}") |
Construct an appropriate specific IOHandler for the desired IO mode. More... | |
Writable * | getWritable (Attributable *a) |
template<typename U > | |
U | getCast (Attribute const &a) |
Retrieve a stored specific Attribute and cast if convertible. More... | |
Datatype | dtype_from_numpy (pybind11::dtype const dt) |
Datatype | dtype_from_bufferformat (std::string const &fmt) |
Return openPMD::Datatype from py::buffer_info::format. | |
pybind11::dtype | dtype_to_numpy (Datatype const dt) |
template<typename T > | |
constexpr Datatype | determineDatatype () |
template<typename T > | |
constexpr Datatype | determineDatatype (std::shared_ptr< T >) |
size_t | toBytes (Datatype d) |
Return number of bytes representing a Datatype. More... | |
size_t | toBits (Datatype d) |
Return number of bits representing a Datatype. More... | |
bool | isVector (Datatype d) |
Compare if a Datatype is a vector type. More... | |
bool | isFloatingPoint (Datatype d) |
Compare if a Datatype is a floating point type. More... | |
bool | isComplexFloatingPoint (Datatype d) |
Compare if a Datatype is a complex floating point type. More... | |
template<typename T > | |
bool | isFloatingPoint () |
Compare if a type is a floating point type. More... | |
template<typename T > | |
bool | isComplexFloatingPoint () |
Compare if a type is a complex floating point type. More... | |
std::tuple< bool, bool > | isInteger (Datatype d) |
Compare if a Datatype is an integer type. More... | |
template<typename T > | |
std::tuple< bool, bool > | isInteger () |
Compare if a type is an integer type. More... | |
template<typename T_FP > | |
bool | isSameFloatingPoint (Datatype d) |
Compare if a Datatype is equivalent to a floating point type. More... | |
template<typename T_CFP > | |
bool | isSameComplexFloatingPoint (Datatype d) |
Compare if a Datatype is equivalent to a complex floating point type. More... | |
template<typename T_Int > | |
bool | isSameInteger (Datatype d) |
Compare if a Datatype is equivalent to an integer type. More... | |
bool | isSame (openPMD::Datatype const d, openPMD::Datatype const e) |
Comparison for two Datatypes. More... | |
template<typename ReturnType = void, typename Action , typename... Args> | |
ReturnType | switchType (Datatype dt, Action action, Args &&... args) |
Generalizes switching over an openPMD datatype. More... | |
std::string | getBP1Extent (Extent const &e, std::string const &delimiter=",") |
std::string | getZerosLikeBP1Extent (Extent const &e, std::string const &delimiter=",") |
ADIOS_DATATYPES | getBP1DataType (Datatype dtype) |
std::string | concrete_bp1_file_position (Writable *w) |
std::string | getEnvNum (std::string const &key, std::string const &defaultValue) |
template<typename T > | |
Attribute | readVectorAttributeInternal (void *data, int size) |
hid_t | getH5DataSpace (Attribute const &att) |
std::string | concrete_h5_file_position (Writable *w) |
OPENPMDAPI_EXPORT_ENUM_CLASS (Operation) | |
Type of IO operation between logical and persistent data. More... | |
std::ostream & | operator<< (std::ostream &, openPMD::IterationEncoding const &) |
std::ostream & | operator<< (std::ostream &, openPMD::Mesh::Geometry const &) |
std::ostream & | operator<< (std::ostream &, openPMD::Mesh::DataOrder const &) |
std::string | getVersion () |
Return the version of the openPMD-api library (run-time) More... | |
std::string | getStandard () |
Return the maximum supported version of the openPMD standard (read & write, run-time) More... | |
std::string | getStandardMinimum () |
Return the minimum supported version of the openPMD standard (read, run-time) More... | |
std::map< std::string, bool > | getVariants () |
Return the feature variants of the openPMD-api library (run-time) More... | |
std::vector< std::string > | getFileExtensions () |
Return the file extensions supported in this variant of the openPMD-api library (run-time) More... | |
template<typename T > | |
std::shared_ptr< T > | shareRaw (T *x) |
Share ownership with a raw pointer. More... | |
template<typename T > | |
std::shared_ptr< T const > | shareRaw (T const *x) |
template<typename T > | |
auto | shareRaw (T &c) -> std::shared_ptr< typename std::remove_pointer< decltype(c.data()) >::type > |
template<typename T > | |
auto | shareRaw (T const &c) -> std::shared_ptr< typename std::remove_pointer< decltype(c.data()) >::type > |
Variables | |
std::vector< Datatype > | openPMD_Datatypes |
All openPMD datatypes defined in Datatype, listed in order in a vector. | |
template<typename T , typename U > | |
constexpr bool | decay_equiv_v = decay_equiv< T, U >::value |
class OPENPMDAPI_EXPORT | ADIOS1IOHandlerImpl |
class OPENPMDAPI_EXPORT | ParallelADIOS1IOHandlerImpl |
Public definitions of openPMD-api.
|
strong |
File access mode to use during IO.
Enumerator | |
---|---|
READ_ONLY | open series as read-only, fails if series is not found |
READ_WRITE | open existing series as writable |
CREATE | create new series and truncate existing (files) |
|
strong |
In step-based mode (i.e.
when using the Streaming API), stepping/advancing through the Series is performed in terms of interleaving begin- and end-step calls. Distinguish both kinds by using this enum.
|
strong |
In step-based mode (i.e.
when using the Streaming API), indicate whether there are further steps to read or not (i.e. the stream is not over or it is).
|
strong |
Encoding scheme of an Iterations Series'.
|
strong |
Used in step-based mode (i.e.
when using the Streaming API) to determine whether a step is currently active or not.
|
strong |
basicDatatype Strip openPMD Datatype of std::vector, std::array et.
al.
dt | The "full" Datatype. |
std::shared_ptr< AbstractIOHandler > openPMD::createIOHandler | ( | std::string | path, |
Access | access, | ||
Format | format, | ||
MPI_Comm | comm, | ||
std::string const & | options = "{}" |
||
) |
Construct an appropriate specific IOHandler for the desired IO mode that may be MPI-aware.
path | Path to root folder for all operations associated with the desired handler. |
access | Access mode describing desired operations and permissions of the desired handler. |
format | Format describing the IO backend of the desired handler. |
comm | MPI communicator used for IO. |
options | JSON-formatted option string, to be interpreted by the backend. |
std::shared_ptr< AbstractIOHandler > openPMD::createIOHandler | ( | std::string | path, |
Access | access, | ||
Format | format, | ||
std::string const & | options = "{}" |
||
) |
Construct an appropriate specific IOHandler for the desired IO mode.
path | Path to root folder for all operations associated with the desired handler. |
access | Access describing desired operations and permissions of the desired handler. |
format | Format describing the IO backend of the desired handler. |
options | JSON-formatted option string, to be interpreted by the backend. |
Format openPMD::determineFormat | ( | std::string const & | filename | ) |
Determine the storage format of a Series from the used filename extension.
filename | string containing the filename. |
|
inline |
Retrieve a stored specific Attribute and cast if convertible.
std::runtime_error | if stored object is not static castable to U. |
U | Type of the object to be casted to. |
std::vector< std::string > openPMD::getFileExtensions | ( | ) |
Return the file extensions supported in this variant of the openPMD-api library (run-time)
std::string openPMD::getStandard | ( | ) |
std::string openPMD::getStandardMinimum | ( | ) |
std::map< std::string, bool > openPMD::getVariants | ( | ) |
Return the feature variants of the openPMD-api library (run-time)
std::string openPMD::getVersion | ( | ) |
Return the version of the openPMD-api library (run-time)
|
inline |
Compare if a Datatype is a complex floating point type.
Includes our vector types
d | Datatype to test |
|
inline |
Compare if a type is a complex floating point type.
Like isFloatingPoint but for complex floats
T | type to test |
|
inline |
Compare if a Datatype is a floating point type.
Equivalent to std::is_floating_point including our vector types
d | Datatype to test |
|
inline |
Compare if a type is a floating point type.
Just std::is_floating_point but also valid for std::vector< > types
T | type to test |
|
inline |
Compare if a Datatype is an integer type.
contrary to std::is_integer, the types bool and char types are not considered ints in this function
d | Datatype to test |
|
inline |
Compare if a type is an integer type.
contrary to std::is_integer, the types bool and char types are not considered ints in this function
T | type to test |
|
inline |
Comparison for two Datatypes.
Besides returning true for the same types, identical implementations on some platforms, e.g. if long and long long are the same or double and long double will also return true.
|
inline |
Compare if a Datatype is equivalent to a complex floating point type.
T_CFP | complex floating point type to compare |
d | Datatype to compare |
|
inline |
Compare if a Datatype is equivalent to a floating point type.
T_FP | floating point type to compare |
d | Datatype to compare |
|
inline |
Compare if a Datatype is equivalent to an integer type.
T_Int | signed or unsigned integer type to compare |
d | Datatype to compare |
|
inline |
Compare if a Datatype is a vector type.
d | Datatype to test |
openPMD::OPENPMDAPI_EXPORT_ENUM_CLASS | ( | Operation | ) |
Type of IO operation between logical and persistent data.
< Query chunks that can be loaded in a dataset
std::shared_ptr< T > openPMD::shareRaw | ( | T * | x | ) |
Share ownership with a raw pointer.
Helper function to share load/store data ownership unprotected and without reference counting with a raw pointer or stdlib container (that implements a contiguous data storage).
std::string openPMD::suffix | ( | Format | f | ) |
Determine the default filename suffix for a given storage format.
f | File format to determine suffix for. |
ReturnType openPMD::switchType | ( | Datatype | dt, |
Action | action, | ||
Args &&... | args | ||
) |
Generalizes switching over an openPMD datatype.
Will call the functor passed to it using the C++ internal datatype corresponding to the openPMD datatype as template parameter for the templated <operator()>().
ReturnType | The functor's return type. |
Action | The functor's type. |
Args | The functors argument types. |
dt | The openPMD datatype. |
action | The functor. |
args | The functor's arguments. |
|
inline |
Return number of bits representing a Datatype.
d | Datatype |
|
inline |
Return number of bytes representing a Datatype.
d | Datatype |