Skip to content

Commit

Permalink
Fix CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed May 22, 2024
1 parent e46bbea commit fea6696
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
6 changes: 5 additions & 1 deletion include/openPMD/RecordComponent.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ RecordComponent::loadChunkAllocate_impl(internal::LoadStoreConfig cfg)
(defined(__apple_build_version__) && __clang_major__ < 14)
auto newData =
std::shared_ptr<T>(new T[numPoints], [](T *p) { delete[] p; });
loadChunk(newData, offset, extent);
prepareLoadStore()
.offset(std::move(o))
.extent(std::move(e))
.fromSharedPtr(newData)
.enqueueLoad();
return newData;
#else
auto newData = std::shared_ptr<T[]>(new T[numPoints]);
Expand Down
36 changes: 23 additions & 13 deletions src/LoadStoreChunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ auto ConfigureLoadStore<ChildClass>::storeChunkConfig()
template <typename ChildClass>
auto ConfigureLoadStore<ChildClass>::extent(Extent extent) -> return_type &
{
m_extent = std::move(extent);
m_extent = std::make_optional<Extent>(std::move(extent));
return *static_cast<return_type *>(this);
}

template <typename ChildClass>
auto ConfigureLoadStore<ChildClass>::offset(Offset offset) -> return_type &
{
m_offset = std::move(offset);
m_offset = std::make_optional<Offset>(std::move(offset));
return *static_cast<return_type *>(this);
}

Expand Down Expand Up @@ -215,23 +215,33 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE)

#undef INSTANTIATE_METHOD_TEMPLATES_FOR_BASE

/*
* In the following macro, we replace `dtype` with `std::remove_cv_t<dtype
* const>` since otherwise clang-tidy won't understand it's a type and we cannot
* surround it with parentheses. The type names are surrounded with angle
* brackets, so the warning is useless.
*/

#define INSTANTIATE_STORE_CHUNK_FROM_BUFFER(dtype) \
template class ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>; \
template class ConfigureLoadStoreFromBuffer< \
std::shared_ptr<std::remove_cv_t<dtype const>>>; \
template class ConfigureStoreChunkFromBuffer< \
std::shared_ptr<dtype>, \
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
template class ConfigureLoadStore< \
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
ConfigureLoadStoreFromBuffer< \
std::shared_ptr<std::remove_cv_t<dtype const>>>>; \
template class ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
std::shared_ptr<std::remove_cv_t<dtype const>>>>; \
INSTANTIATE_METHOD_TEMPLATES( \
ConfigureLoadStore< \
ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>, \
ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
std::shared_ptr<std::remove_cv_t<dtype const>>>>, \
dtype) \
template class ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>; \
template class ConfigureLoadStore< \
ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>; \
template class ConfigureStoreChunkFromBuffer< \
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>; \
template class ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>>; \
INSTANTIATE_METHOD_TEMPLATES( \
ConfigureLoadStore< \
ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>, \
ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
UniquePtrWithLambda<std::remove_cv_t<dtype const>>>>, \
dtype) \
template class ConfigureStoreChunkFromBuffer< \
std::shared_ptr<dtype const>>; \
Expand Down
2 changes: 0 additions & 2 deletions test/SerialIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#include <unistd.h>
#endif

#include <execinfo.h>

using namespace openPMD;

struct BackendSelection
Expand Down

0 comments on commit fea6696

Please sign in to comment.