KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::struct_type< T > Struct Template Reference

Constructs a MPI_Datatype for a struct-like type. More...

#include <mpi_datatype.hpp>

Static Public Member Functions

static MPI_Datatype data_type ()
 The MPI_Datatype corresponding to the type.
 

Static Public Attributes

static constexpr TypeCategory category = TypeCategory::struct_like
 The category of the type.
 
static constexpr bool has_to_be_committed = category_has_to_be_committed(category)
 Whether the type has to be committed before it can be used in MPI calls.
 

Detailed Description

template<typename T>
struct kamping::struct_type< T >

Constructs a MPI_Datatype for a struct-like type.

Template Parameters
TThe type to construct the MPI_Datatype for.

This requires that T is a std::pair, std::tuple or a type that is reflectable with pfr. If you do not agree with PFR's decision if a type is implicitly reflectable, you can override it by providing a specialization of pfr::is_reflectable with the tag kamping_tag.

See also
https://apolukhin.github.io/pfr_non_boost/pfr/is_reflectable.html https://www.boost.org/doc/libs/master/doc/html/reference_section_of_pfr.htmlfor details
Note
Reflection support for arbitrary struct types is only suppported when KaMPIng is compiled with PFR.

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