Skip to content

Commit

Permalink
Refactor: Extract ADIOS2 BufferedActions struct to own file, rename t…
Browse files Browse the repository at this point in the history
…o ADIOS2File (#1577)

* Move BufferedActions struct to own file ADIOS2File.hpp

* Move BufferedActions impl to ADIOS2File.cpp

* Guard against non-ADIOS2 compilation

* Rename BufferedActions -> ADIOS2File

* Unify naming scheme for helper namespaces
  • Loading branch information
franzpoeschel authored Jan 23, 2024
1 parent 3a8a220 commit 17e757f
Show file tree
Hide file tree
Showing 9 changed files with 1,969 additions and 1,873 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ set(IO_SOURCE
src/IO/JSON/JSONIOHandlerImpl.cpp
src/IO/JSON/JSONFilePosition.cpp
src/IO/ADIOS/ADIOS2IOHandler.cpp
src/IO/ADIOS/ADIOS2File.cpp
src/IO/ADIOS/ADIOS2Auxiliary.cpp
src/IO/InvalidatableFile.cpp)

Expand Down
41 changes: 41 additions & 0 deletions include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,47 @@ enum class GroupOrDataset
DATASET
};

namespace adios_defs
{
enum class FlushTarget : unsigned char
{
Buffer,
Buffer_Override,
Disk,
Disk_Override
};

using FlushTarget = adios_defs::FlushTarget;
FlushTarget flushTargetFromString(std::string const &str);

enum class UseGroupTable
{
Yes,
No
};
} // namespace adios_defs

/*
* The following strings are used during parsing of the JSON configuration
* string for the ADIOS2 backend.
*/
namespace adios_defaults
{
using const_str = char const *const;
constexpr const_str str_engine = "engine";
constexpr const_str str_type = "type";
constexpr const_str str_params = "parameters";
constexpr const_str str_usesteps = "usesteps";
constexpr const_str str_flushtarget = "preferred_flush_target";
constexpr const_str str_usesstepsAttribute = "__openPMD_internal/useSteps";
constexpr const_str str_adios2Schema =
"__openPMD_internal/openPMD2_adios2_schema";
constexpr const_str str_isBoolean = "__is_boolean__";
constexpr const_str str_activeTablePrefix = "__openPMD_groups";
constexpr const_str str_groupBasedWarning =
"__openPMD_internal/warning_bugprone_groupbased_encoding";
} // namespace adios_defaults

#if openPMD_HAVE_ADIOS2
namespace detail
{
Expand Down
Loading

0 comments on commit 17e757f

Please sign in to comment.