openPMD-api
|
Public definitions of openPMD-api. More...
Classes | |
class | AbstractFilePosition |
class | AbstractIOHandler |
Interface for communicating between logical and physically persistent data. More... | |
class | AbstractIOHandlerImpl |
class | AbstractIOHandlerImplCommon |
struct | AbstractParameter |
struct | ADIOS1FilePosition |
class | ADIOS1IOHandler |
class | ADIOS1IOHandlerImpl |
struct | ADIOS2FilePosition |
class | ADIOS2IOHandler |
class | ADIOS2IOHandlerImpl |
class | AttributableInterface |
Layer to manage storage of attributes associated with file objects. More... | |
class | Attribute |
Varidic datatype supporting at least all formats for attributes specified in the openPMD standard. More... | |
class | BaseRecord |
class | BaseRecordComponent |
class | BlockSlicer |
Abstract class to associate a thread with its local cuboid in the total cuboid. More... | |
struct | ChunkInfo |
Represents the meta info around a chunk in a dataset. More... | |
class | Container |
Map-like container that enforces openPMD requirements and handles IO. More... | |
class | Dataset |
class | DatasetFiller |
An abstract class to create one iteration of data per thread. More... | |
struct | decay_equiv |
Fundamental equivalence check for two given types T and U. More... | |
struct | DoConvert |
struct | DoConvert< std::vector< T >, std::vector< U >, false > |
struct | DoConvert< T, U, false > |
struct | DoConvert< T, U, true > |
class | DummyIOHandler |
Dummy handler without any IO operations. More... | |
class | DynamicMemoryView |
A view into a buffer that might be reallocated at some points and thus has changing base pointers over time. More... | |
struct | File |
struct | GetH5DataType |
struct | HDF5FilePosition |
class | HDF5IOHandler |
class | HDF5IOHandlerImpl |
class | IndexedIteration |
Subclass of Iteration that knows its own index withing the containing Series. More... | |
struct | InvalidatableFile |
Wrapper around a shared pointer to: More... | |
class | IOTask |
Self-contained description of a single IO operation. More... | |
class | Iteration |
Logical compilation of data from one snapshot (e.g. More... | |
struct | JSONFilePosition |
class | JSONIOHandler |
class | JSONIOHandlerImpl |
class | LegacyAttributable |
class | Mesh |
Container for N-dimensional, homogeneous Records. More... | |
class | MeshRecordComponent |
class | MPIBenchmark |
Class representing a benchmark. More... | |
struct | MPIBenchmarkReport |
The report for a single benchmark produced by <openPMD/benchmark/mpi/MPIBenchmark>. More... | |
class | no_such_attribute_error |
class | no_such_file_error |
class | OneDimensionalBlockSlicer |
class | ParallelADIOS1IOHandler |
class | ParallelADIOS1IOHandlerImpl |
class | ParallelHDF5IOHandler |
class | ParallelHDF5IOHandlerImpl |
struct | Parameter |
Typesafe description of all required arguments for a specified Operation. More... | |
struct | Parameter< Operation::ADVANCE > |
struct | Parameter< Operation::AVAILABLE_CHUNKS > |
struct | Parameter< Operation::CLOSE_FILE > |
struct | Parameter< Operation::CLOSE_PATH > |
struct | Parameter< Operation::CREATE_DATASET > |
struct | Parameter< Operation::CREATE_FILE > |
struct | Parameter< Operation::CREATE_PATH > |
struct | Parameter< Operation::DELETE_ATT > |
struct | Parameter< Operation::DELETE_DATASET > |
struct | Parameter< Operation::DELETE_FILE > |
struct | Parameter< Operation::DELETE_PATH > |
struct | Parameter< Operation::EXTEND_DATASET > |
struct | Parameter< Operation::GET_BUFFER_VIEW > |
struct | Parameter< Operation::LIST_ATTS > |
struct | Parameter< Operation::LIST_DATASETS > |
struct | Parameter< Operation::LIST_PATHS > |
struct | Parameter< Operation::OPEN_DATASET > |
struct | Parameter< Operation::OPEN_FILE > |
struct | Parameter< Operation::OPEN_PATH > |
struct | Parameter< Operation::READ_ATT > |
struct | Parameter< Operation::READ_DATASET > |
struct | Parameter< Operation::WRITE_ATT > |
struct | Parameter< Operation::WRITE_DATASET > |
class | ParticlePatches |
class | ParticleSpecies |
class | PatchRecord |
class | PatchRecordComponent |
class | RandomDatasetFiller |
class | ReadIterations |
Reading side of the streaming API. More... | |
class | Record |
class | RecordComponent |
class | Series |
Root level of the openPMD hierarchy. More... | |
class | SeriesInterface |
Implementation for the root level of the openPMD hierarchy. More... | |
class | SeriesIterator |
class | SimpleDatasetFillerProvider |
class | Span |
Subset of C++20 std::span class template. More... | |
class | unsupported_data_error |
class | Writable |
Layer to mirror structure of logical data and persistent data in file. More... | |
class | WriteIterations |
Writing side of the streaming API. More... | |
struct | WrittenChunkInfo |
Represents the meta info around a chunk that has been written by some data producing application. More... | |
Typedefs | |
using | iterator_t = Container< Iteration, uint64_t >::iterator |
using | Attributable = AttributableInterface |
using | ChunkTable = std::vector< WrittenChunkInfo > |
using | Extent = std::vector< std::uint64_t > |
using | Offset = std::vector< std::uint64_t > |
typedef Access | AccessType |
using | SupportedSchema = ADIOS2Schema::SupportedSchema |
Enumerations | |
enum | Datatype : int { CHAR = LOWEST_DATATYPE, 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 = HIGHEST_DATATYPE, UNDEFINED } |
Concrete datatype of an object available at runtime. | |
enum | FlushLevel : unsigned char { FlushLevel::UserFlush, FlushLevel::InternalFlush, FlushLevel::SkeletonOnly } |
Determine what items should be flushed upon Series::flush() More... | |
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, ADIOS2_SSC, JSON, DUMMY } |
File format to use during IO. | |
enum | IterationEncoding { fileBased, groupBased, variableBased } |
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... | |
template<> | |
std::shared_ptr< AbstractIOHandler > | createIOHandler< nlohmann::json > (std::string path, Access access, Format format, MPI_Comm comm, nlohmann::json options) |
template<> | |
std::shared_ptr< AbstractIOHandler > | createIOHandler< nlohmann::json > (std::string path, Access access, Format format, nlohmann::json options) |
std::shared_ptr< AbstractIOHandler > | createIOHandler (std::string path, Access access, Format format) |
Writable * | getWritable (AttributableInterface *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_Args, typename T_SeriesAccessor > | |
void | add_pickle (pybind11::class_< T_Args... > &cl, T_SeriesAccessor &&seriesAccessor) |
Helper to Pickle Attributable Classes. More... | |
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 Action , typename... Args> | |
auto | switchType (Datatype dt, Action action, Args &&... args) -> decltype(action. template operator()< char >(std::forward< Args >(args)...)) |
Generalizes switching over an openPMD datatype. More... | |
template<typename Action , typename... Args> | |
auto | switchNonVectorType (Datatype dt, Action action, Args &&... args) -> decltype(action. template operator()< char >(std::forward< Args >(args)...)) |
Generalizes switching over an openPMD datatype. More... | |
template<typename JSON > | |
std::shared_ptr< AbstractIOHandler > | createIOHandler (std::string path, Access access, Format format, MPI_Comm comm, JSON options) |
Construct an appropriate specific IOHandler for the desired IO mode that may be MPI-aware. More... | |
template<typename JSON > | |
std::shared_ptr< AbstractIOHandler > | createIOHandler (std::string path, Access access, Format format, JSON options=JSON()) |
Construct an appropriate specific IOHandler for the desired IO mode. 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) |
template<typename Action , typename... Args> | |
auto | switchAdios2AttributeType (Datatype dt, Action action, Args &&... args) -> decltype(action. template operator()< char >(std::forward< Args >(args)...)) |
Generalizes switching over an openPMD datatype. More... | |
template<typename Action , typename... Args> | |
auto | switchAdios2VariableType (Datatype dt, Action action, Args &&... args) -> decltype(action. template operator()< char >(std::forward< Args >(args)...)) |
Generalizes switching over an openPMD datatype. More... | |
hid_t | getH5DataSpace (Attribute const &att) |
std::string | concrete_h5_file_position (Writable *w) |
std::vector< hsize_t > | getOptimalChunkDims (std::vector< hsize_t > const dims, size_t const typeSize) |
Computes the chunk dimensions for a dataset. More... | |
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. | |
constexpr int | LOWEST_DATATYPE = 0 |
constexpr int | HIGHEST_DATATYPE = 1000 |
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 |
Determine what items should be flushed upon Series::flush()
Enumerator | |
---|---|
UserFlush | Flush operation that was triggered by user code. Everything flushable must be flushed. This mode defines a flush point (see docs/source/usage/workflow.rst.rst). |
InternalFlush | Default mode, used when flushes are triggered internally, e.g. during parsing to read attributes. Does not trigger a flush point. All operations must be performed by a backend, except for those that may only happen at a flush point. Those operations must not be performed. |
SkeletonOnly | Restricted mode, ensures to set up the openPMD hierarchy (as far as defined so far) in the backend. Do not flush record components / datasets, especially do not flush CREATE_DATASET tasks. Attributes may or may not be flushed yet. |
|
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 |
|
inline |
Helper to Pickle Attributable Classes.
T_Args | the types in pybind11::class_ - the first type will be pickled |
T_SeriesAccessor | During unpickle, this accesses the object inside a newly constructed series |
cl | the pybind11 class that gets the pickle methods defined |
seriesAccessor | accessor from series to object during unpickling |
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, | ||
JSON | 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. |
JSON | Substitute for nlohmann::json. Templated to avoid including nlohmann::json in a .hpp file. |
std::shared_ptr< AbstractIOHandler > openPMD::createIOHandler | ( | std::string | path, |
Access | access, | ||
Format | format, | ||
JSON | options = JSON() |
||
) |
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. |
JSON | Substitute for nlohmann::json. Templated to avoid including nlohmann::json in a .hpp file. |
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::vector< hsize_t > openPMD::getOptimalChunkDims | ( | std::vector< hsize_t > const | dims, |
size_t const | typeSize | ||
) |
Computes the chunk dimensions for a dataset.
Chunk dimensions are selected to create chunks sizes between 64KByte and 4MB. Smaller chunk sizes are inefficient due to overhead, larger chunks do not map well to file system blocks and striding.
Chunk dimensions are less or equal to dataset dimensions and do not need to be a factor of the respective dataset dimension.
[in] | dims | dimensions of dataset to get chunk dims for |
[in] | typeSize | size of each element in bytes |
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. |
auto openPMD::switchAdios2AttributeType | ( | Datatype | dt, |
Action | action, | ||
Args &&... | args | ||
) | -> decltype( action. template operator () < char > ( std::forward< 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()>(). Considers only types that are eligible for an ADIOS2 attribute.
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. |
auto openPMD::switchAdios2VariableType | ( | Datatype | dt, |
Action | action, | ||
Args &&... | args | ||
) | -> decltype( action. template operator () < char > ( std::forward< 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()>(). Considers only types that are eligible for an ADIOS2 variable (excluding STRING. Use switchAdios2AttributeType() for that).
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. |
auto openPMD::switchNonVectorType | ( | Datatype | dt, |
Action | action, | ||
Args &&... | args | ||
) | -> decltype( action. template operator () < char > ( std::forward< 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()>(). Ignores vector and array types.
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. |
auto openPMD::switchType | ( | Datatype | dt, |
Action | action, | ||
Args &&... | args | ||
) | -> decltype( action. template operator () < char > ( std::forward< 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 |