Skip to content

Commit

Permalink
world.gop.reduce can only work for trivially-copyable types
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Sep 17, 2024
1 parent 0d87255 commit c62de40
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/madness/world/worldgop.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,8 @@ namespace madness {
/// Optimizations can be added for long messages and to reduce the memory footprint
template <typename T, class opT>
void reduce(T* buf, std::size_t nelem, opT op) {
static_assert(std::is_trivially_copyable_v<T>, "T must be trivially copyable");

ProcessID parent, child0, child1;
world_.mpi.binary_tree_info(0, parent, child0, child1);
const std::size_t nelem_per_maxmsg =
Expand Down

0 comments on commit c62de40

Please sign in to comment.