Skip to content

Commit 3b5c07f

Browse files
committed
CI fixes
1 parent ca61e51 commit 3b5c07f

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

include/openPMD/IO/HDF5/ParallelHDF5IOHandler.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ class ParallelHDF5IOHandler : public AbstractIOHandler
4444
#else
4545
ParallelHDF5IOHandler(
4646
internal::AbstractIOHandlerInitFrom &&initialize_from,
47-
std::string const &path,
48-
Access,
4947
json::TracingJSON config);
5048
#endif
5149
~ParallelHDF5IOHandler() override;

include/openPMD/RecordComponent.tpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,41 @@ RecordComponent::storeChunk(Offset o, Extent e, F &&createBuffer)
8282
.enqueueStore<T>(std::forward<F>(createBuffer));
8383
}
8484

85+
namespace detail
86+
{
87+
template <typename T>
88+
struct pointer_as_void;
89+
90+
template <typename T>
91+
struct pointer_as_void<std::shared_ptr<T>>
92+
{
93+
static auto call(std::shared_ptr<T> const &ptr)
94+
-> std::shared_ptr<void const>
95+
{
96+
return std::static_pointer_cast<void const>(ptr);
97+
}
98+
};
99+
100+
template <typename T>
101+
struct pointer_as_void<std::unique_ptr<T>>
102+
{
103+
static auto call(std::unique_ptr<T> &&ptr) -> UniquePtrWithLambda<void>
104+
{
105+
return UniquePtrWithLambda<void>(std::move(ptr));
106+
}
107+
};
108+
template <typename T>
109+
struct pointer_as_void<std::unique_ptr<T[]>>
110+
{
111+
static auto call(std::unique_ptr<T[]> &&ptr)
112+
-> UniquePtrWithLambda<void>
113+
{
114+
return UniquePtrWithLambda<T[]>(std::move(ptr))
115+
.template static_cast_<void>();
116+
}
117+
};
118+
} // namespace detail
119+
85120
template <typename T, typename F>
86121
inline DynamicMemoryView<T> RecordComponent::storeChunkSpanCreateBuffer_impl(
87122
internal::LoadStoreConfig cfg, F &&createBuffer)
@@ -131,11 +166,13 @@ inline DynamicMemoryView<T> RecordComponent::storeChunkSpanCreateBuffer_impl(
131166
// note that data might have either
132167
// type shared_ptr<T> or shared_ptr<T[]>
133168
auto data = std::forward<F>(createBuffer)(size);
169+
using ptr_type = decltype(data);
134170
out.ptr = static_cast<void *>(data.get());
135171
internal::LoadStoreConfigWithBuffer ls_cfg{
136172
std::move(o), std::move(e), std::nullopt};
137173
storeChunk_impl(
138-
auxiliary::WriteBuffer(std::move(data)),
174+
auxiliary::WriteBuffer(
175+
detail::pointer_as_void<ptr_type>::call(std::move(data))),
139176
getBufferView.dtype,
140177
std::move(ls_cfg),
141178
/*flush_immediately=*/false);

src/IO/ADIOS/ADIOS2IOHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ ADIOS2IOHandler::ADIOS2IOHandler(
26362636
: AbstractIOHandler(std::move(initialize_from), std::move(config))
26372637
{}
26382638

2639-
std::future<void> ADIOS2IOHandler::flush(internal::ParsedFlushParams &)
2639+
std::future<void> ADIOS2IOHandler::flush_impl(internal::ParsedFlushParams &)
26402640
{
26412641
return std::future<void>();
26422642
}

0 commit comments

Comments
 (0)