openPMD-api
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
openPMD Namespace Reference

Public definitions of openPMD-api. More...

Namespaces

 internal
 Writing side of the streaming API.
 

Classes

class  UniquePtrWithLambda
 Unique Pointer class that uses a dynamic destructor type. More...
 
class  Attributable
 Layer to manage storage of attributes associated with file objects. More...
 
class  Attribute
 Variant datatype supporting at least all formats for attributes specified in the openPMD standard. More...
 
class  BaseRecord
 Base class for any type of record (e.g. More...
 
class  BaseRecordComponent
 
class  Container
 Map-like container that enforces openPMD requirements and handles IO. More...
 
class  MeshRecordComponent
 
class  PatchRecord
 
class  PatchRecordComponent
 
class  AbstractIOHandlerImplCommon
 
class  Span
 Subset of C++20 std::span class template. More...
 
class  Writable
 Layer to mirror structure of logical data and persistent data in file. More...
 
class  BlockSlicer
 Abstract class to associate a thread with its local cuboid in the total cuboid. More...
 
class  DatasetFiller
 An abstract class to create one iteration of data per thread. More...
 
class  SimpleDatasetFillerProvider
 
class  MPIBenchmark
 Class representing a benchmark. More...
 
struct  MPIBenchmarkReport
 The report for a single benchmark produced by <openPMD/benchmark/mpi/MPIBenchmark>. More...
 
class  OneDimensionalBlockSlicer
 
class  RandomDatasetFiller
 
struct  ChunkInfo
 Represents the meta info around a chunk in a dataset. More...
 
struct  WrittenChunkInfo
 Represents the meta info around a chunk that has been written by some data producing application. More...
 
class  Dataset
 
struct  decay_equiv
 Fundamental equivalence check for two given types T and U. More...
 
class  Error
 Base class for all openPMD-specific error types. More...
 
class  AbstractFilePosition
 
class  AbstractIOHandler
 Interface for communicating between logical and physically persistent data. More...
 
class  AbstractIOHandlerImpl
 
struct  ADIOS2FilePosition
 
class  ADIOS2IOHandlerImpl
 
class  ADIOS2IOHandler
 
class  DummyIOHandler
 Dummy handler without any IO operations. More...
 
struct  GetH5DataType
 
struct  HDF5FilePosition
 
class  HDF5IOHandler
 
class  HDF5IOHandlerImpl
 
class  ParallelHDF5IOHandler
 
class  ParallelHDF5IOHandlerImpl
 
struct  InvalidatableFile
 Wrapper around a shared pointer to: More...
 
struct  AbstractParameter
 
struct  Parameter
 Typesafe description of all required arguments for a specified Operation. More...
 
struct  Parameter< Operation::CREATE_FILE >
 
struct  Parameter< Operation::CHECK_FILE >
 
struct  Parameter< Operation::OPEN_FILE >
 
struct  Parameter< Operation::CLOSE_FILE >
 
struct  Parameter< Operation::DELETE_FILE >
 
struct  Parameter< Operation::CREATE_PATH >
 
struct  Parameter< Operation::CLOSE_PATH >
 
struct  Parameter< Operation::OPEN_PATH >
 
struct  Parameter< Operation::DELETE_PATH >
 
struct  Parameter< Operation::LIST_PATHS >
 
struct  Parameter< Operation::CREATE_DATASET >
 
struct  Parameter< Operation::EXTEND_DATASET >
 
struct  Parameter< Operation::OPEN_DATASET >
 
struct  Parameter< Operation::DELETE_DATASET >
 
struct  Parameter< Operation::WRITE_DATASET >
 
struct  Parameter< Operation::READ_DATASET >
 
struct  Parameter< Operation::LIST_DATASETS >
 
struct  Parameter< Operation::GET_BUFFER_VIEW >
 
struct  Parameter< Operation::DELETE_ATT >
 
struct  Parameter< Operation::WRITE_ATT >
 
struct  Parameter< Operation::READ_ATT >
 
struct  Parameter< Operation::LIST_ATTS >
 
struct  Parameter< Operation::ADVANCE >
 
struct  Parameter< Operation::AVAILABLE_CHUNKS >
 
struct  Parameter< Operation::DEREGISTER >
 
class  IOTask
 Self-contained description of a single IO operation. More...
 
struct  JSONFilePosition
 
class  JSONIOHandler
 
struct  File
 
class  JSONIOHandlerImpl
 
class  Iteration
 Logical compilation of data from one snapshot (e.g. More...
 
class  IndexedIteration
 Subclass of Iteration that knows its own index withing the containing Series. More...
 
class  Mesh
 Container for N-dimensional, homogeneous Records. More...
 
class  ParticlePatches
 
class  ParticleSpecies
 
class  SeriesIterator
 
class  ReadIterations
 Reading side of the streaming API. More...
 
class  Record
 
class  DynamicMemoryView
 A view into a buffer that might be reallocated at some points and thus has changing base pointers over time. More...
 
class  RecordComponent
 
class  Series
 Implementation for the root level of the openPMD hierarchy. More...
 
class  WriteIterations
 Writing side of the streaming API. More...
 

Typedefs

using AcceptedEndingsForEngine = std::map< std::string, std::string >
 
using FlushTarget = adios_defs::FlushTarget
 
using iterator_t = Container< Iteration, Iteration::IterationIndex_t >::iterator
 
using ChunkTable = std::vector< WrittenChunkInfo >
 
using Extent = std::vector< std::uint64_t >
 
using Offset = std::vector< std::uint64_t >
 
using dataset_types = detail::variant_tail_t< detail::bottom OPENPMD_FOREACH_DATASET_DATATYPE(OPENPMD_ENUMERATE_TYPES)>
 
using non_vector_types = detail::variant_tail_t< detail::bottom OPENPMD_FOREACH_NONVECTOR_DATATYPE(OPENPMD_ENUMERATE_TYPES)>
 
using attribute_types = detail::variant_tail_t< detail::bottom OPENPMD_FOREACH_DATATYPE(OPENPMD_ENUMERATE_TYPES)>
 
using no_such_file_error = error::ReadError
 Backward-compatibility alias for no_such_file_error.
 
using unsupported_data_error = error::OperationUnsupportedInBackend
 Backward-compatibility alias for unsupported_data_error.
 
using no_such_attribute_error = error::NoSuchAttribute
 Backward-compatibility alias for no_such_attribute_error.
 
typedef Access AccessType
 

Enumerations

enum class  Datatype : int {
  CHAR , UCHAR , SCHAR , 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_SCHAR , VEC_STRING ,
  ARR_DBL_7 , BOOL , UNDEFINED
}
 Concrete datatype of an object available at runtime.
 
enum class  FlushLevel { UserFlush , InternalFlush , SkeletonOnly , CreateOrOpenFiles }
 Determine what items should be flushed upon Series::flush() More...
 
enum class  Access {
  READ_ONLY , READ_RANDOM_ACCESS = READ_ONLY , READ_LINEAR , READ_WRITE ,
  CREATE , APPEND
}
 File access mode to use during IO. More...
 
enum class  GroupOrDataset { GROUP , DATASET }
 
enum class  Format {
  HDF5 , ADIOS2_BP , ADIOS2_BP4 , ADIOS2_BP5 ,
  ADIOS2_SST , ADIOS2_SSC , JSON , TOML ,
  GENERIC , DUMMY
}
 File format to use during IO.
 
enum class  IterationEncoding { fileBased , groupBased , variableBased }
 Encoding scheme of an Iterations Series'. More...
 
enum class  AdvanceStatus : unsigned char { OK , OVER , RANDOMACCESS }
 In step-based mode (i.e. More...
 
enum class  AdvanceMode : unsigned char { BEGINSTEP , ENDSTEP }
 In step-based mode (i.e. More...
 
enum class  StepStatus : unsigned char { DuringStep , NoStep }
 Used in step-based mode (i.e. More...
 
enum class  UnitDimension : uint8_t {
  L = 0 , M , T , I ,
  theta , N , 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 (const std::string &s)
 
std::string datatypeToString (openPMD::Datatype dt)
 
std::vector< DatatypeopenPMD_Datatypes ()
 All openPMD datatypes defined in Datatype, listed in order in a vector.
 
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::unique_ptr< AbstractIOHandlercreateIOHandler< json::TracingJSON > (std::string path, Access access, Format format, std::string originalExtension, MPI_Comm comm, json::TracingJSON options, std::string const &pathAsItWasSpecifiedInTheConstructor)
 
template<>
std::unique_ptr< AbstractIOHandlercreateIOHandler< json::TracingJSON > (std::string path, Access access, Format format, std::string originalExtension, json::TracingJSON options, std::string const &pathAsItWasSpecifiedInTheConstructor)
 
std::unique_ptr< AbstractIOHandlercreateIOHandler (std::string path, Access access, Format format, std::string originalExtension)
 
std::optional< size_t > joinedDimension (adios2::Dims const &dims)
 
WritablegetWritable (Attributable *a)
 
template<typename Map , typename... Args>
py::class_< Map, std::unique_ptr< Map >, Args... > declare_container (py::handle scope, std::string const &name)
 
template<typename Map , typename Class_ >
Class_ finalize_container (Class_ cl)
 
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 (T &&val)
 Determine datatype of passed value. More...
 
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...
 
constexpr bool isChar (Datatype d)
 Determines if d represents a char type. More...
 
template<typename T_Char >
constexpr bool isSameChar (Datatype d)
 Determines if d and T_Char are char types of same representation. More...
 
bool isSame (openPMD::Datatype const d, openPMD::Datatype const e)
 Comparison for two Datatypes. More...
 
template<typename Action , typename... Args>
constexpr auto switchType (Datatype dt, Args &&...args) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
 Generalizes switching over an openPMD datatype. More...
 
template<typename Action , typename... Args>
constexpr auto switchNonVectorType (Datatype dt, Args &&...args) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
 Generalizes switching over an openPMD datatype. More...
 
template<typename Action , typename... Args>
constexpr auto switchDatasetType (Datatype dt, Args &&...args) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
 Generalizes switching over an openPMD datatype. More...
 
template<typename JSON >
std::unique_ptr< AbstractIOHandlercreateIOHandler (std::string path, Access access, Format format, std::string originalExtension, MPI_Comm comm, JSON options, std::string const &pathAsItWasSpecifiedInTheConstructor)
 Construct an appropriate specific IOHandler for the desired IO mode that may be MPI-aware. More...
 
template<typename JSON >
std::unique_ptr< AbstractIOHandlercreateIOHandler (std::string path, Access access, Format format, std::string originalExtension, JSON options, std::string const &pathAsItWasSpecifiedInTheConstructor)
 Construct an appropriate specific IOHandler for the desired IO mode. More...
 
template<typename Action , typename... Args>
auto switchAdios2AttributeType (Datatype dt, Args &&...args) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
 Generalizes switching over an openPMD datatype. More...
 
template<typename Action , typename... Args>
auto switchAdios2VariableType (Datatype dt, Args &&...args) -> decltype(Action::template call< 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

template<typename T , typename U >
constexpr bool decay_equiv_v = decay_equiv<T, U>::value
 

Detailed Description

Public definitions of openPMD-api.

Enumeration Type Documentation

◆ Access

enum openPMD::Access
strong

File access mode to use during IO.

Enumerator
READ_ONLY 

Open Series as read-only, fails if Series is not found.

When to use READ_ONLY or READ_LINEAR:

  • When intending to use Series::readIterations() (i.e. step-by-step reading of iterations, e.g. in streaming), then Access::READ_LINEAR is preferred and always supported. Data is parsed inside Series::readIterations(), no data is available right after opening the Series.
  • Otherwise (i.e. for random-access workflows), Access::READ_ONLY is required, but works only in backends that support random access. Data is parsed and available right after opening the Series.

In both modes, parsing of iterations can be deferred with the JSON/TOML option defer_iteration_parsing.

Detailed rules:

  1. In backends that have no notion of IO steps (all except ADIOS2), Access::READ_ONLY can always be used.
  2. In backends that can be accessed either in random-access or step-by-step, the chosen access mode decides which approach is used. Examples are the BP4 and BP5 engines of ADIOS2.
  3. In streaming backends, random-access is not possible. When using such a backend, the access mode will be coerced automatically to Access::READ_LINEAR. Use of Series::readIterations() is mandatory for access.
  4. Reading a variable-based Series is only fully supported with Access::READ_LINEAR. If using Access::READ_ONLY, the dataset will be considered to only have one single step. If the dataset only has one single step, this is guaranteed to work as expected. Otherwise, it is undefined which step's data is returned.
READ_RANDOM_ACCESS 

more explicit alias for READ_ONLY

READ_WRITE 

Open existing Series as writable.

Read mode corresponds with Access::READ_RANDOM_ACCESS.

CREATE 

create new series and truncate existing (files)

APPEND 

write new iterations to an existing series without reading

◆ AdvanceMode

enum openPMD::AdvanceMode : unsigned char
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.

◆ AdvanceStatus

enum openPMD::AdvanceStatus : unsigned char
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).

Enumerator
OK 

stream goes on

OVER 

stream is over

RANDOMACCESS 

there is no stream, it will never be over

◆ FlushLevel

enum openPMD::FlushLevel
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.

CreateOrOpenFiles 

Only creates/opens files, nothing more.

◆ IterationEncoding

◆ StepStatus

enum openPMD::StepStatus : unsigned char
strong

Used in step-based mode (i.e.

when using the Streaming API) to determine whether a step is currently active or not.

◆ UnitDimension

enum openPMD::UnitDimension : uint8_t
strong

Physical dimension of a record.

Dimensional base quantities of the international system of quantities

Enumerator

length

mass

time

electric current

theta 

thermodynamic temperature

amount of substance

luminous intensity

Function Documentation

◆ add_pickle()

template<typename... T_Args, typename T_SeriesAccessor >
void openPMD::add_pickle ( pybind11::class_< T_Args... > &  cl,
T_SeriesAccessor &&  seriesAccessor 
)
inline

Helper to Pickle Attributable Classes.

Template Parameters
T_Argsthe types in pybind11::class_ - the first type will be pickled
T_SeriesAccessorDuring unpickle, this accesses the object inside a newly constructed series
Parameters
clthe pybind11 class that gets the pickle methods defined
seriesAccessoraccessor from series to object during unpickling

◆ basicDatatype()

Datatype openPMD::basicDatatype ( Datatype  dt)

basicDatatype Strip openPMD Datatype of std::vector, std::array et.

al.

Parameters
dtThe "full" Datatype.
Returns
The "inner" Datatype.

◆ createIOHandler() [1/2]

template<typename JSON >
std::unique_ptr<AbstractIOHandler> openPMD::createIOHandler ( std::string  path,
Access  access,
Format  format,
std::string  originalExtension,
JSON  options,
std::string const &  pathAsItWasSpecifiedInTheConstructor 
)

Construct an appropriate specific IOHandler for the desired IO mode.

Parameters
pathPath to root folder for all operations associated with the desired handler.
accessAccess describing desired operations and permissions of the desired handler.
formatFormat describing the IO backend of the desired handler.
originalExtensionThe filename extension as it was originally specified by the user.
optionsJSON-formatted option string, to be interpreted by the backend.
pathAsItWasSpecifiedInTheConstructorFor error messages.
Template Parameters
JSONSubstitute for nlohmann::json. Templated to avoid including nlohmann::json in a .hpp file.
Returns
Smart pointer to created IOHandler.

◆ createIOHandler() [2/2]

template<typename JSON >
std::unique_ptr<AbstractIOHandler> openPMD::createIOHandler ( std::string  path,
Access  access,
Format  format,
std::string  originalExtension,
MPI_Comm  comm,
JSON  options,
std::string const &  pathAsItWasSpecifiedInTheConstructor 
)

Construct an appropriate specific IOHandler for the desired IO mode that may be MPI-aware.

Parameters
pathPath to root folder for all operations associated with the desired handler.
accessAccess mode describing desired operations and permissions of the desired handler.
formatFormat describing the IO backend of the desired handler.
originalExtensionThe filename extension as it was originally specified by the user.
commMPI communicator used for IO.
optionsJSON-formatted option string, to be interpreted by the backend.
pathAsItWasSpecifiedInTheConstructorFor error messages.
Template Parameters
JSONSubstitute for nlohmann::json. Templated to avoid including nlohmann::json in a .hpp file.
Returns
Smart pointer to created IOHandler.

◆ determineDatatype()

template<typename T >
constexpr Datatype openPMD::determineDatatype ( T &&  val)
inlineconstexpr

Determine datatype of passed value.

Parameters
valValue whose type to evaluate
Template Parameters
TType of the passed value
Returns
If T is of a pointer type, then the type of the contained value. Otherwise, a compile-time error detailing the use of this function.

◆ determineFormat()

Format openPMD::determineFormat ( std::string const &  filename)

Determine the storage format of a Series from the used filename extension.

Parameters
filenamestring containing the filename.
Returns
Format that best fits the filename extension.

◆ getFileExtensions()

std::vector< std::string > openPMD::getFileExtensions ( )

Return the file extensions supported in this variant of the openPMD-api library (run-time)

Returns
std::vector< std::string > with file extensions

◆ getOptimalChunkDims()

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.

Parameters
[in]dimsdimensions of dataset to get chunk dims for
[in]typeSizesize of each element in bytes
Returns
array for resulting chunk dimensions

◆ getStandard()

std::string openPMD::getStandard ( )

Return the maximum supported version of the openPMD standard (read & write, run-time)

Returns
std::string openPMD standard version (dot separated)

◆ getStandardMinimum()

std::string openPMD::getStandardMinimum ( )

Return the minimum supported version of the openPMD standard (read, run-time)

Returns
std::string minimum openPMD standard version (dot separated)

◆ getVariants()

std::map< std::string, bool > openPMD::getVariants ( )

Return the feature variants of the openPMD-api library (run-time)

Returns
std::map< std::string, bool > with variants such as backends

◆ getVersion()

std::string openPMD::getVersion ( )

Return the version of the openPMD-api library (run-time)

Returns
std::string API version (dot separated)

◆ isChar()

constexpr bool openPMD::isChar ( Datatype  d)
constexpr

Determines if d represents a char type.

Parameters
dAn openPMD datatype.
Returns
true If d is a scalar char, signed char or unsigned char.
false Otherwise.

◆ isComplexFloatingPoint() [1/2]

template<typename T >
bool openPMD::isComplexFloatingPoint ( )
inline

Compare if a type is a complex floating point type.

Like isFloatingPoint but for complex floats

Template Parameters
Ttype to test
Returns
true if complex floating point, otherwise false

◆ isComplexFloatingPoint() [2/2]

bool openPMD::isComplexFloatingPoint ( Datatype  d)
inline

Compare if a Datatype is a complex floating point type.

Includes our vector types

Parameters
dDatatype to test
Returns
true if complex floating point, otherwise false

◆ isFloatingPoint() [1/2]

template<typename T >
bool openPMD::isFloatingPoint ( )
inline

Compare if a type is a floating point type.

Just std::is_floating_point but also valid for std::vector< > types

Template Parameters
Ttype to test
Returns
true if floating point, otherwise false

◆ isFloatingPoint() [2/2]

bool openPMD::isFloatingPoint ( Datatype  d)
inline

Compare if a Datatype is a floating point type.

Equivalent to std::is_floating_point including our vector types

Parameters
dDatatype to test
Returns
true if floating point, otherwise false

◆ isInteger() [1/2]

template<typename T >
std::tuple<bool, bool> openPMD::isInteger ( )
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

Template Parameters
Ttype to test
Returns
std::tuple<bool, bool> with isInteger and isSigned result

◆ isInteger() [2/2]

std::tuple<bool, bool> openPMD::isInteger ( Datatype  d)
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

Parameters
dDatatype to test
Returns
std::tuple<bool, bool> with isInteger and isSigned result

◆ isSame()

bool openPMD::isSame ( openPMD::Datatype const  d,
openPMD::Datatype const  e 
)
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.

◆ isSameChar()

template<typename T_Char >
constexpr bool openPMD::isSameChar ( Datatype  d)
constexpr

Determines if d and T_Char are char types of same representation.

Same representation means that on platforms with signed char type, char and signed char are considered to be eqivalent, similarly on platforms with unsigned char type.

Template Parameters
T_CharA type, as template parameter.
Parameters
dA type, as openPMD datatype.
Returns
true If both types are chars of the same representation.
false Otherwise.

◆ isSameComplexFloatingPoint()

template<typename T_CFP >
bool openPMD::isSameComplexFloatingPoint ( Datatype  d)
inline

Compare if a Datatype is equivalent to a complex floating point type.

Template Parameters
T_CFPcomplex floating point type to compare
Parameters
dDatatype to compare
Returns
true if both types are complex floating point and same bitness, else false

◆ isSameFloatingPoint()

template<typename T_FP >
bool openPMD::isSameFloatingPoint ( Datatype  d)
inline

Compare if a Datatype is equivalent to a floating point type.

Template Parameters
T_FPfloating point type to compare
Parameters
dDatatype to compare
Returns
true if both types are floating point and same bitness, else false

◆ isSameInteger()

template<typename T_Int >
bool openPMD::isSameInteger ( Datatype  d)
inline

Compare if a Datatype is equivalent to an integer type.

Template Parameters
T_Intsigned or unsigned integer type to compare
Parameters
dDatatype to compare
Returns
true if both types are integers, same signed and same bitness, else false

◆ isVector()

bool openPMD::isVector ( Datatype  d)
inline

Compare if a Datatype is a vector type.

Parameters
dDatatype to test
Returns
true if vector type, else false

◆ OPENPMDAPI_EXPORT_ENUM_CLASS()

openPMD::OPENPMDAPI_EXPORT_ENUM_CLASS ( Operation  )

Type of IO operation between logical and persistent data.

< Query chunks that can be loaded in a dataset

< Inform the backend that an object has been deleted.

◆ shareRaw()

template<typename T >
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).

Warning
this is a helper function to bypass the shared-pointer API for storing data behind raw pointers. Using it puts the responsibility of buffer-consistency between stores and flushes to the users side without an indication via reference counting.

◆ suffix()

std::string openPMD::suffix ( Format  f)

Determine the default filename suffix for a given storage format.

Parameters
fFile format to determine suffix for.
Returns
String containing the default filename suffix

◆ switchAdios2AttributeType()

template<typename Action , typename... Args>
auto openPMD::switchAdios2AttributeType ( Datatype  dt,
Args &&...  args 
) -> decltype(Action::template call<char>(std::forward<Args>(args)...))

Generalizes switching over an openPMD datatype.

Will call the function template found at Action::call< T >(), instantiating T with the C++ internal datatype corresponding to the openPMD datatype. Considers only types that are eligible for an ADIOS2 attribute.

Template Parameters
ReturnTypeThe function template's return type.
ActionThe struct containing the function template.
ArgsThe function template's argument types.
Parameters
dtThe openPMD datatype.
argsThe function template's arguments.
Returns
Passes on the result of invoking the function template with the given arguments and with the template parameter specified by dt.

◆ switchAdios2VariableType()

template<typename Action , typename... Args>
auto openPMD::switchAdios2VariableType ( Datatype  dt,
Args &&...  args 
) -> decltype(Action::template call<char>(std::forward<Args>(args)...))

Generalizes switching over an openPMD datatype.

Will call the function template found at Action::call< T >(), instantiating T with the C++ internal datatype corresponding to the openPMD datatype. Considers only types that are eligible for an ADIOS2 variable (excluding STRING. Use switchAdios2AttributeType() for that).

Template Parameters
ReturnTypeThe function template's return type.
ActionThe struct containing the function template.
ArgsThe function template's argument types.
Parameters
dtThe openPMD datatype.
argsThe function template's arguments.
Returns
Passes on the result of invoking the function template with the given arguments and with the template parameter specified by dt.

◆ switchDatasetType()

template<typename Action , typename... Args>
constexpr auto openPMD::switchDatasetType ( Datatype  dt,
Args &&...  args 
) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
constexpr

Generalizes switching over an openPMD datatype.

Will call the function template found at Action::call< T >(), instantiating T with the C++ internal datatype corresponding to the openPMD datatype. Specializes only on those types that can occur in a dataset.

Template Parameters
ReturnTypeThe function template's return type.
ActionThe struct containing the function template.
ArgsThe function template's argument types.
Parameters
dtThe openPMD datatype.
argsThe function template's arguments.
Returns
Passes on the result of invoking the function template with the given arguments and with the template parameter specified by dt.

◆ switchNonVectorType()

template<typename Action , typename... Args>
constexpr auto openPMD::switchNonVectorType ( Datatype  dt,
Args &&...  args 
) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
constexpr

Generalizes switching over an openPMD datatype.

Will call the function template found at Action::call< T >(), instantiating T with the C++ internal datatype corresponding to the openPMD datatype. Ignores vector and array types.

Template Parameters
ReturnTypeThe function template's return type.
ActionThe struct containing the function template.
ArgsThe function template's argument types.
Parameters
dtThe openPMD datatype.
argsThe function template's arguments.
Returns
Passes on the result of invoking the function template with the given arguments and with the template parameter specified by dt.

◆ switchType()

template<typename Action , typename... Args>
constexpr auto openPMD::switchType ( Datatype  dt,
Args &&...  args 
) -> decltype(Action::template call< char >(std::forward< Args >(args)...))
constexpr

Generalizes switching over an openPMD datatype.

Will call the function template found at Action::call< T >(), instantiating T with the C++ internal datatype corresponding to the openPMD datatype.

Template Parameters
ReturnTypeThe function template's return type.
ActionThe struct containing the function template.
ArgsThe function template's argument types.
Parameters
dtThe openPMD datatype.
argsThe function template's arguments.
Returns
Passes on the result of invoking the function template with the given arguments and with the template parameter specified by dt.

◆ toBits()

size_t openPMD::toBits ( Datatype  d)
inline

Return number of bits representing a Datatype.

Parameters
dDatatype
Returns
number of bits

◆ toBytes()

size_t openPMD::toBytes ( Datatype  d)
inline

Return number of bytes representing a Datatype.

Parameters
dDatatype
Returns
number of bytes