KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::ScopedDatatype Class Reference

A scoped MPI_Datatype that commits the type on construction and frees it on destruction. This is useful for RAII-style management of MPI_Datatype objects. More...

#include <mpi_datatype.hpp>

Public Member Functions

 ScopedDatatype (MPI_Datatype type=MPI_DATATYPE_NULL)
 Construct a new scoped MPI_Datatype and commits it. If no type is provided, default to MPI_DATATYPE_NULL and does not commit or free anything.
 
 ScopedDatatype (ScopedDatatype const &)=delete
 Deleted copy constructor.
 
ScopedDatatypeoperator= (ScopedDatatype const &)=delete
 Deleted copy assignment.
 
 ScopedDatatype (ScopedDatatype &&other) noexcept
 Move constructor.
 
ScopedDatatypeoperator= (ScopedDatatype &&other) noexcept
 Move assignment.
 
MPI_Datatype constdata_type () const
 Get the MPI_Datatype.
 
 ~ScopedDatatype ()
 Free the MPI_Datatype.
 

Detailed Description

A scoped MPI_Datatype that commits the type on construction and frees it on destruction. This is useful for RAII-style management of MPI_Datatype objects.


The documentation for this class was generated from the following file: