openPMD-api
|
Class that is responsible for scheduling and buffering openPMD attribute loads from ADIOS2, if using ADIOS variables to store openPMD attributes. More...
#include <ADIOS2PreloadAttributes.hpp>
Classes | |
struct | AttributeLocation |
Internally used struct to store meta information on a buffered attribute. More... | |
Public Member Functions | |
PreloadAdiosAttributes (PreloadAdiosAttributes const &other)=delete | |
PreloadAdiosAttributes & | operator= (PreloadAdiosAttributes const &other)=delete |
PreloadAdiosAttributes (PreloadAdiosAttributes &&other)=default | |
PreloadAdiosAttributes & | operator= (PreloadAdiosAttributes &&other)=default |
void | preloadAttributes (adios2::IO &IO, adios2::Engine &engine) |
Schedule attributes for preloading. More... | |
template<typename T > | |
AttributeWithShape< T > | getAttribute (std::string const &name) const |
Get an attribute that has been buffered previously. More... | |
Datatype | attributeType (std::string const &name) const |
Class that is responsible for scheduling and buffering openPMD attribute loads from ADIOS2, if using ADIOS variables to store openPMD attributes.
Reasoning: ADIOS variables can be of any shape and size, and ADIOS cannot know which variables to buffer. While it will preload and buffer scalar variables, openPMD also stores vector-type attributes which are not preloaded. Since in Streaming setups, every variable load requires full communication back to the writer, this can quickly become very expensive. Hence, do this manually.
AttributeWithShape< T > openPMD::detail::PreloadAdiosAttributes::getAttribute | ( | std::string const & | name | ) | const |
Get an attribute that has been buffered previously.
T | The underlying primitive datatype of the attribute. Will fail if the type found in ADIOS does not match. |
name | The full name of the attribute. |
void openPMD::detail::PreloadAdiosAttributes::preloadAttributes | ( | adios2::IO & | IO, |
adios2::Engine & | engine | ||
) |
Schedule attributes for preloading.
This will invalidate all previously buffered attributes. This will not flush the scheduled loads. This way, attributes can be loaded along with the next adios2::Engine flush.
IO | |
engine |