Skip to content

Commit e04f76d

Browse files
committed
Fix after rebase
1 parent 748ffdf commit e04f76d

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

include/openPMD/IO/ADIOS/macros.hpp

+16-13
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,28 @@
2121
#define openPMD_HAVE_ADIOS2_BP5 0
2222
#endif
2323

24-
namespace detail
25-
{
26-
template <typename Variable, typename SFINAE = void>
27-
struct CanTheMemorySelectionBeReset
24+
namespace openPMD
2825
{
29-
static constexpr bool value = false;
30-
};
31-
32-
template <typename Variable>
33-
struct CanTheMemorySelectionBeReset<
34-
Variable,
35-
decltype(std::declval<Variable>().SetMemorySelection())>
26+
namespace detail
3627
{
37-
static constexpr bool value = true;
38-
};
28+
template <typename Variable, typename SFINAE = void>
29+
struct CanTheMemorySelectionBeReset
30+
{
31+
static constexpr bool value = false;
32+
};
33+
34+
template <typename Variable>
35+
struct CanTheMemorySelectionBeReset<
36+
Variable,
37+
decltype(std::declval<Variable>().SetMemorySelection())>
38+
{
39+
static constexpr bool value = true;
40+
};
3941
} // namespace detail
4042

4143
constexpr bool CanTheMemorySelectionBeReset =
4244
detail::CanTheMemorySelectionBeReset<adios2::Variable<int>>::value;
45+
} // namespace openPMD
4346

4447
#else
4548

src/IO/ADIOS/ADIOS2File.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
115115
ba.getEngine().Put(var, ptr);
116116
if (bp.param.memorySelection.has_value())
117117
{
118-
if constexpr (CanTheMemorySelectionBeReset)
118+
if constexpr (openPMD::CanTheMemorySelectionBeReset)
119119
{
120120
var.SetMemorySelection();
121121
}
@@ -197,7 +197,7 @@ struct RunUniquePtrPut
197197
ba.getEngine().Put(var, ptr);
198198
if (bufferedPut.memorySelection.has_value())
199199
{
200-
if constexpr (CanTheMemorySelectionBeReset)
200+
if constexpr (openPMD::CanTheMemorySelectionBeReset)
201201
{
202202
var.SetMemorySelection();
203203
}

test/Files_ParallelIO/read_variablebased_randomaccess.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <catch2/catch.hpp>
99

10-
#if openPMD_HAVE_ADIOS2 && openPMD_HAVE_MPI && openPMD_HAS_ADIOS_2_9
10+
#if openPMD_HAVE_ADIOS2 && openPMD_HAVE_MPI
1111
#include <adios2.h>
1212
#include <mpi.h>
1313

0 commit comments

Comments
 (0)