openPMD-api
macros.hpp
1 #pragma once
2 
3 #include "openPMD/config.hpp"
4 
5 #if openPMD_HAVE_ADIOS2
6 
7 #include <adios2.h>
8 
9 /*
10  * ADIOS2 v2.8 brings mode::ReadRandomAccess
11  */
12 #define openPMD_HAS_ADIOS_2_8 \
13  (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 208)
14 /*
15  * ADIOS2 v2.9 brings modifiable attributes (technically already in v2.8, but
16  * there are too many bugs, so we only support it beginning with v2.9).
17  * Group table feature requires ADIOS2 v2.9.
18  */
19 #define openPMD_HAS_ADIOS_2_9 \
20  (ADIOS2_VERSION_MAJOR * 100 + ADIOS2_VERSION_MINOR >= 209)
21 
22 #if defined(ADIOS2_HAVE_BP5) || openPMD_HAS_ADIOS_2_9
23 // ADIOS2 v2.10 no longer defines this
24 #define openPMD_HAVE_ADIOS2_BP5 1
25 #else
26 #define openPMD_HAVE_ADIOS2_BP5 0
27 #endif
28 
29 #else
30 
31 #define openPMD_HAS_ADIOS_2_8 0
32 #define openPMD_HAS_ADIOS_2_9 0
33 
34 #endif