Skip to content

Commit

Permalink
Do not rely on type deduction
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot authored and tpadioleau committed Nov 24, 2023
1 parent cb8fcc3 commit 3a24510
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions include/ddc/pdi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,16 @@ class PdiEvent
static_assert(
!(access & PDI_IN) || (chunk_default_access_v<BorrowedChunk> & PDI_IN),
"Invalid access for constant data");
auto allocator = std::pmr::polymorphic_allocator<size_t>(&m_metadata);
auto extents = detail::array(data.domain().extents());
size_t& rank = *std::pmr::polymorphic_allocator<size_t>(&m_metadata).allocate(1);
size_t& rank = *allocator.allocate(1);
rank = data.domain().extents().size();
PDI_share((name + "_rank").c_str(), &rank, PDI_OUT);
m_names.push_back(name + "_rank");
PDI_share(
(name + "_extents").c_str(),
std::
vector(extents.begin(),
extents.end(),
std::pmr::polymorphic_allocator<size_t>(&m_metadata))
.data(),
std::vector<size_t, decltype(allocator)>(extents.begin(), extents.end(), allocator)
.data(),
PDI_OUT);
m_names.push_back(name + "_extents");
PDI_share(
Expand Down

0 comments on commit 3a24510

Please sign in to comment.