Skip to content

Commit 604283e

Browse files
committed
Fix ADIOS2
1 parent 6498347 commit 604283e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/IO/ADIOS/ADIOS2File.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "openPMD/IO/AbstractIOHandler.hpp"
2727
#include "openPMD/IterationEncoding.hpp"
2828
#include "openPMD/auxiliary/Environment.hpp"
29+
#include "openPMD/auxiliary/Memory_internal.hpp"
2930
#include "openPMD/auxiliary/StringManip.hpp"
3031

3132
#include <cstdint>
@@ -114,7 +115,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
114115
}
115116
else if constexpr (std::is_same_v<
116117
ptr_type,
117-
UniquePtrWithLambda<void>>)
118+
std::shared_ptr<UniquePtrWithLambda<void>>>)
118119
{
119120
BufferedUniquePtrPut bput;
120121
bput.name = std::move(bp.name);
@@ -128,7 +129,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
128129
* (ptr_type does not work for this case).
129130
*/
130131
// clang-format off
131-
bput.data = std::move(arg); // NOLINT(bugprone-move-forwarding-reference)
132+
bput.data = std::move(*arg); // NOLINT(bugprone-move-forwarding-reference)
132133
// clang-format on
133134
bput.dtype = bp.param.dtype;
134135
ba.m_uniquePtrPuts.push_back(std::move(bput));
@@ -139,7 +140,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
139140
always_false_v<ptr_type>, "Unhandled std::variant branch");
140141
}
141142
},
142-
bp.param.data.m_buffer);
143+
bp.param.data.as_variant<auxiliary::WriteBufferTypes>());
143144
}
144145

145146
template <int n, typename... Params>

0 commit comments

Comments
 (0)