@@ -59,6 +59,11 @@ enum class FlushLevel
5959 * This mode defines a flush point (see docs/source/usage/workflow.rst.rst).
6060 */
6161 UserFlush,
62+ /* *
63+ * Flush triggered by storeChunk in immediate flush mode.
64+ * Must not perform storeChunk operations of the Span API.
65+ */
66+ ImmediateFlush,
6267 /* *
6368 * Default mode, used when flushes are triggered internally, e.g. during
6469 * parsing to read attributes. Does not trigger a flush point.
@@ -81,6 +86,66 @@ enum class FlushLevel
8186 CreateOrOpenFiles
8287};
8388
89+ namespace flush_level
90+ {
91+ inline constexpr auto global_flushpoint (FlushLevel fl)
92+ {
93+ switch (fl)
94+ {
95+ case FlushLevel::UserFlush:
96+ return true ;
97+ case FlushLevel::ImmediateFlush:
98+ case FlushLevel::InternalFlush:
99+ case FlushLevel::SkeletonOnly:
100+ case FlushLevel::CreateOrOpenFiles:
101+ return false ;
102+ }
103+ return false ; // unreachable
104+ }
105+ inline constexpr auto write_datasets (FlushLevel fl)
106+ {
107+ switch (fl)
108+ {
109+ case FlushLevel::UserFlush:
110+ case FlushLevel::ImmediateFlush:
111+ return true ;
112+ case FlushLevel::InternalFlush:
113+ case FlushLevel::SkeletonOnly:
114+ case FlushLevel::CreateOrOpenFiles:
115+ return false ;
116+ }
117+ return false ; // unreachable
118+ }
119+ inline constexpr auto write_attributes (FlushLevel fl)
120+ {
121+ switch (fl)
122+ {
123+ case FlushLevel::UserFlush:
124+ case FlushLevel::ImmediateFlush:
125+ case FlushLevel::InternalFlush:
126+ return true ;
127+ case FlushLevel::SkeletonOnly:
128+ case FlushLevel::CreateOrOpenFiles:
129+ return false ;
130+ }
131+ return false ; // unreachable
132+ }
133+ inline constexpr auto flush_hierarchy (FlushLevel fl)
134+ {
135+ switch (fl)
136+ {
137+ case FlushLevel::UserFlush:
138+ case FlushLevel::ImmediateFlush:
139+ case FlushLevel::InternalFlush:
140+ case FlushLevel::SkeletonOnly:
141+ return true ;
142+ case FlushLevel::CreateOrOpenFiles:
143+ return false ;
144+ }
145+ return false ; // unreachable
146+ }
147+ } // namespace flush_level
148+
84149enum class OpenpmdStandard
85150{
86151 v_1_0_0,
0 commit comments