Object returned by plugin::GridCommunicator::make_grid_communicator() representing a grid communicator which enables alltoall communication with a latency in sqrt(p)
where p is the size of the original communicator.
More...
#include <alltoall_grid.hpp>
template<
template< typename... >
typename DefaultContainerType>
class kamping::plugin::grid::GridCommunicator< DefaultContainerType >
Object returned by plugin::GridCommunicator::make_grid_communicator() representing a grid communicator which enables alltoall communication with a latency in sqrt(p)
where p is the size of the original communicator.
- Template Parameters
-
DefaultContainerType | Container type of the original communicator. |
◆ GridCommunicator()
Creates a two dimensional grid by splitting the given communicator of size p
into a row and a column communicator each of size about sqrt(p)
.
- Template Parameters
-
Comm | Type of the communicator. |
- Parameters
-
◆ alltoallv()
template<typename... Args>
Indirect two dimensional grid based personalized alltoall exchange. The following parameters are required:
- kamping::send_buf() containing the data that is sent to each rank. The size of this buffer has to be at least the sum of the send_counts argument.
- kamping::send_counts() containing the number of elements to send to each rank.
The following parameters are optional:
- kamping::send_displs() containing the offsets of the messages in send_buf. The
send_counts[i]
elements starting at send_buf[send_displs[i]]
will be sent to rank i
. If omitted, this is calculated as the exclusive prefix-sum of send_counts
.
- kamping::recv_counts() containing the number of elements to receive from each rank.
- kamping::recv_buf() containing a buffer for the output. Afterwards, this buffer will contain
the data received as specified for send_buf. The buffer will be resized according to the buffer's kamping::BufferResizePolicy. If resize policy is kamping::BufferResizePolicy::no_resize, the buffer's underlying storage must be large enough to store all received elements.
Internally, alltoallv_with_envelope() is called.
- Template Parameters
-
envelope_level | Determines the contents of the envelope of each returned element (no_envelope = use the actual data type of an exchanged element, source = augment the actual data type with the source PE, source_and_destination = argument the actual data type with the source and destination PE). |
Args | Automatically deducted template parameters. |
- Parameters
-
args | All required and any number of the optional buffers described above. |
- Returns
- Result type wrapping the output buffer and recv_counts (if requested).
◆ alltoallv_with_envelope()
Indirect two dimensional grid based personalized alltoall exchange. The following parameters are required:
The following parameters are optional:
- kamping::send_displs() containing the offsets of the messages in send_buf. The
send_counts[i]
elements starting at send_buf[send_displs[i]]
will be sent to rank i
. If omitted, this is calculated as the exclusive prefix-sum of send_counts
.
Internally, each element in the send buffer is wrapped in an envelope to facilitate the indirect routing. The envelope consists at least of the destination PE of each element but can be extended to also hold the source PE of the element. The caller can specify whether they want to keep this information also in the output via the
- Template Parameters
-
envelope_level. | |
envelope_level | Determines the contents of the envelope of each returned element (no_envelope = use the actual data type of an exchanged element, source = augment the actual data type with the source PE, source_and_destination = argument the actual data type with the source and destination PE). |
Args | Automatically deducted template parameters. |
- Parameters
-
args | All required and any number of the optional buffers described above. |
- Returns
The documentation for this class was generated from the following file: