Skip to content

Commit fea6696

Browse files
committed
Fix CI issues
1 parent e46bbea commit fea6696

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

include/openPMD/RecordComponent.tpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ RecordComponent::loadChunkAllocate_impl(internal::LoadStoreConfig cfg)
9696
(defined(__apple_build_version__) && __clang_major__ < 14)
9797
auto newData =
9898
std::shared_ptr<T>(new T[numPoints], [](T *p) { delete[] p; });
99-
loadChunk(newData, offset, extent);
99+
prepareLoadStore()
100+
.offset(std::move(o))
101+
.extent(std::move(e))
102+
.fromSharedPtr(newData)
103+
.enqueueLoad();
100104
return newData;
101105
#else
102106
auto newData = std::shared_ptr<T[]>(new T[numPoints]);

src/LoadStoreChunk.cpp

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ auto ConfigureLoadStore<ChildClass>::storeChunkConfig()
108108
template <typename ChildClass>
109109
auto ConfigureLoadStore<ChildClass>::extent(Extent extent) -> return_type &
110110
{
111-
m_extent = std::move(extent);
111+
m_extent = std::make_optional<Extent>(std::move(extent));
112112
return *static_cast<return_type *>(this);
113113
}
114114

115115
template <typename ChildClass>
116116
auto ConfigureLoadStore<ChildClass>::offset(Offset offset) -> return_type &
117117
{
118-
m_offset = std::move(offset);
118+
m_offset = std::make_optional<Offset>(std::move(offset));
119119
return *static_cast<return_type *>(this);
120120
}
121121

@@ -215,23 +215,33 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE)
215215

216216
#undef INSTANTIATE_METHOD_TEMPLATES_FOR_BASE
217217

218+
/*
219+
* In the following macro, we replace `dtype` with `std::remove_cv_t<dtype
220+
* const>` since otherwise clang-tidy won't understand it's a type and we cannot
221+
* surround it with parentheses. The type names are surrounded with angle
222+
* brackets, so the warning is useless.
223+
*/
224+
218225
#define INSTANTIATE_STORE_CHUNK_FROM_BUFFER(dtype) \
219-
template class ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>; \
226+
template class ConfigureLoadStoreFromBuffer< \
227+
std::shared_ptr<std::remove_cv_t<dtype const>>>; \
220228
template class ConfigureStoreChunkFromBuffer< \
221229
std::shared_ptr<dtype>, \
222-
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
223-
template class ConfigureLoadStore< \
224-
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
230+
ConfigureLoadStoreFromBuffer< \
231+
std::shared_ptr<std::remove_cv_t<dtype const>>>>; \
232+
template class ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
233+
std::shared_ptr<std::remove_cv_t<dtype const>>>>; \
225234
INSTANTIATE_METHOD_TEMPLATES( \
226-
ConfigureLoadStore< \
227-
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>, \
235+
ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
236+
std::shared_ptr<std::remove_cv_t<dtype const>>>>, \
228237
dtype) \
229-
template class ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>; \
230-
template class ConfigureLoadStore< \
231-
ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>; \
238+
template class ConfigureStoreChunkFromBuffer< \
239+
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>; \
240+
template class ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
241+
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>>; \
232242
INSTANTIATE_METHOD_TEMPLATES( \
233-
ConfigureLoadStore< \
234-
ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>, \
243+
ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
244+
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>>, \
235245
dtype) \
236246
template class ConfigureStoreChunkFromBuffer< \
237247
std::shared_ptr<dtype const>>; \

test/SerialIOTest.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
#include <unistd.h>
4141
#endif
4242

43-
#include <execinfo.h>
44-
4543
using namespace openPMD;
4644

4745
struct BackendSelection

0 commit comments

Comments
 (0)