openPMD-api
 
Loading...
Searching...
No Matches
openPMD::detail::PreloadAdiosAttributes Class Reference

Class that is responsible for buffering loaded openPMD attributes from ADIOS2. More...

#include <ADIOS2PreloadAttributes.hpp>

Classes

struct  AttributeLocation
 Meta information on a buffered attribute. More...
 

Public Member Functions

 PreloadAdiosAttributes (PreloadAdiosAttributes const &other)=delete
 
PreloadAdiosAttributesoperator= (PreloadAdiosAttributes const &other)=delete
 
 PreloadAdiosAttributes (PreloadAdiosAttributes &&other)=default
 
PreloadAdiosAttributesoperator= (PreloadAdiosAttributes &&other)=default
 
void preloadAttributes (adios2::IO &IO)
 Load attributes from the current step into the buffer.
 
template<typename T>
AttributeWithShape< TgetAttribute (std::string const &name) const
 Get an attribute that has been buffered previously.
 
Datatype attributeType (std::string const &name) const
 
std::map< std::string, AttributeLocation > const & availableAttributes () const
 

Detailed Description

Class that is responsible for buffering loaded openPMD attributes from ADIOS2.

This is used for reading variable-encoded files in random-access mode. Random-access mode in ADIOS2 has the restriction that modifiable attributes can only be recovered in normal non-random-access read mode, so we open the file first in that mode, store all attribute metadata in this class and only then continue in random-access mode.

Member Function Documentation

◆ getAttribute()

template<typename T>
AttributeWithShape< T > openPMD::detail::PreloadAdiosAttributes::getAttribute ( std::string const & name) const

Get an attribute that has been buffered previously.

Template Parameters
TThe underlying primitive datatype of the attribute. Will fail if the type found in ADIOS does not match.
Parameters
nameThe full name of the attribute.
Returns
Pointer to the buffered attribute along with information on the attribute's shape. Valid only until any non-const member of PreloadAdiosAttributes is called.

◆ preloadAttributes()

void openPMD::detail::PreloadAdiosAttributes::preloadAttributes ( adios2::IO & IO)

Load attributes from the current step into the buffer.

Parameters
IO

The documentation for this class was generated from the following files: