Skip to main content

template <typename Void>
constexpr std::tuple<Void*, communicator::stride>
normalize_strided_pointer(
    Void* ptr,
    communicator::stride stride)

Description

Strides that only differ e.g. in their dim0 allocation size are equivalent when adjusting the base pointer. This not only improves mpi_communicator type cache efficiency, but is in fact necessary to make sure all boxes that instruction_graph_generator emits for send instructions and inbound pilots are representable in the 32-bit integer world of MPI.

Template Parameters

Void
Either `void` or `const void`.

Parameters

Void* ptr
communicator::stride stride