KaMPIng 0.2.1
(Near) zero-overhead MPI wrapper for C++
Loading...
Searching...
No Matches
kamping::types::struct_type< T, Lookup > Struct Template Reference

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

#include <struct_type.hpp>

Inheritance diagram for kamping::types::struct_type< T, Lookup >:

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, typename Lookup = type_dispatcher_lookup>
struct kamping::types::struct_type< T, Lookup >

Constructs an MPI_Datatype for a struct-like type.

Template Parameters
TThe type to construct the MPI_Datatype for.
LookupThe lookup policy used to resolve the MPI_Datatype for each field of T. Defaults to type_dispatcher_lookup, which uses kamping::types::mpi_type_traits.

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.


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