gko::experimental::mpi::contiguous_type#
Move-only RAII wrapper around a contiguous MPI_Datatype. The
wrapper builds the datatype via MPI_Type_contiguous, commits it,
and frees it on destruction.
gko::experimental::mpi::contiguous_type t{3, MPI_DOUBLE};
// t.get() is a committed MPI_Datatype representing 3 doubles
Used internally by the distributed kernels to ship multi-vector
columns as a single typed message rather than as one MPI_Send per
column.
-
class contiguous_type#
A move-only wrapper for a contiguous MPI_Datatype.
The underlying MPI_Datatype is automatically created and committed when an object of this type is constructed, and freed when it is destructed.
Public Functions
-
inline contiguous_type(int count, MPI_Datatype old_type)#
Constructs a wrapper for a contiguous MPI_Datatype.
- Parameters:
count – the number of old_type elements the new datatype contains.
old_type – the MPI_Datatype that is contained.
-
inline contiguous_type()#
Constructs empty wrapper with MPI_DATATYPE_NULL.
-
contiguous_type(const contiguous_type&) = delete#
Disallow copying of wrapper type.
-
contiguous_type &operator=(const contiguous_type&) = delete#
Disallow copying of wrapper type.
-
inline contiguous_type(contiguous_type &&other) noexcept#
Move constructor, leaves other with MPI_DATATYPE_NULL.
- Parameters:
other – to be moved from object.
-
inline contiguous_type &operator=(contiguous_type &&other) noexcept#
Move assignment, leaves other with MPI_DATATYPE_NULL.
- Parameters:
other – to be moved from object.
- Returns:
this object.
-
inline ~contiguous_type()#
Destructs object by freeing wrapped MPI_Datatype.
-
inline MPI_Datatype get() const#
Access the underlying MPI_Datatype.
- Returns:
the underlying MPI_Datatype.
-
inline contiguous_type(int count, MPI_Datatype old_type)#