Skip to content

Commit 17e757f

Browse files
Refactor: Extract ADIOS2 BufferedActions struct to own file, rename to 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
1 parent 3a8a220 commit 17e757f

9 files changed

Lines changed: 1969 additions & 1873 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ set(IO_SOURCE
482482
src/IO/JSON/JSONIOHandlerImpl.cpp
483483
src/IO/JSON/JSONFilePosition.cpp
484484
src/IO/ADIOS/ADIOS2IOHandler.cpp
485+
src/IO/ADIOS/ADIOS2File.cpp
485486
src/IO/ADIOS/ADIOS2Auxiliary.cpp
486487
src/IO/InvalidatableFile.cpp)
487488

include/openPMD/IO/ADIOS/ADIOS2Auxiliary.hpp

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,47 @@ enum class GroupOrDataset
4646
DATASET
4747
};
4848

49+
namespace adios_defs
50+
{
51+
enum class FlushTarget : unsigned char
52+
{
53+
Buffer,
54+
Buffer_Override,
55+
Disk,
56+
Disk_Override
57+
};
58+
59+
using FlushTarget = adios_defs::FlushTarget;
60+
FlushTarget flushTargetFromString(std::string const &str);
61+
62+
enum class UseGroupTable
63+
{
64+
Yes,
65+
No
66+
};
67+
} // namespace adios_defs
68+
69+
/*
70+
* The following strings are used during parsing of the JSON configuration
71+
* string for the ADIOS2 backend.
72+
*/
73+
namespace adios_defaults
74+
{
75+
using const_str = char const *const;
76+
constexpr const_str str_engine = "engine";
77+
constexpr const_str str_type = "type";
78+
constexpr const_str str_params = "parameters";
79+
constexpr const_str str_usesteps = "usesteps";
80+
constexpr const_str str_flushtarget = "preferred_flush_target";
81+
constexpr const_str str_usesstepsAttribute = "__openPMD_internal/useSteps";
82+
constexpr const_str str_adios2Schema =
83+
"__openPMD_internal/openPMD2_adios2_schema";
84+
constexpr const_str str_isBoolean = "__is_boolean__";
85+
constexpr const_str str_activeTablePrefix = "__openPMD_groups";
86+
constexpr const_str str_groupBasedWarning =
87+
"__openPMD_internal/warning_bugprone_groupbased_encoding";
88+
} // namespace adios_defaults
89+
4990
#if openPMD_HAVE_ADIOS2
5091
namespace detail
5192
{

0 commit comments

Comments
 (0)