KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::internal::RankDataBuffer< RankType::value, type > Class Template Referencefinal

Encapsulates the rank of a PE. This is needed for p2p communication and rooted MPI collectives like MPI_Gather. More...

#include <parameter_objects.hpp>

Inheritance diagram for kamping::internal::RankDataBuffer< RankType::value, type >:
kamping::internal::DataBuffer< size_t, ParameterType, type, BufferModifiability::modifiable, BufferOwnership::owning, BufferType::in_buffer, BufferResizePolicy::no_resize, BufferAllocation::user_allocated >

Public Member Functions

 RankDataBuffer (size_t rank)
 Constructor for Rank.
 
 RankDataBuffer (int rank)
 Constructor for Rank.
 
int rank_signed () const
 Returns the rank as int.
 
RankDataBuffer< rank_type, parameter_typeclone ()
 Get a copy of this RankDataBuffer.
 

Static Public Attributes

static constexpr ParameterType parameter_type = type
 The type of parameter this object encapsulates.
 
static constexpr RankType rank_type = RankType::value
 The rank type.
 

Detailed Description

template<ParameterType type>
class kamping::internal::RankDataBuffer< RankType::value, type >

Encapsulates the rank of a PE. This is needed for p2p communication and rooted MPI collectives like MPI_Gather.

This is a specialized DataBuffer. Its main functionality is to provide ease-of-use functionality in the form of the methods rank() and rank_signed(), which return the encapsulated rank and are easier to read in the code.

Constructor & Destructor Documentation

◆ RankDataBuffer() [1/2]

template<ParameterType type>
kamping::internal::RankDataBuffer< RankType::value, type >::RankDataBuffer ( size_t rank)
inline

Constructor for Rank.

Parameters
rankRank of the PE.

◆ RankDataBuffer() [2/2]

template<ParameterType type>
kamping::internal::RankDataBuffer< RankType::value, type >::RankDataBuffer ( int rank)
inline

Constructor for Rank.

Parameters
rankRank of the PE.

Member Function Documentation

◆ clone()

Get a copy of this RankDataBuffer.

Returns
A copy of this RankDataBuffer.

◆ rank_signed()

template<ParameterType type>
int kamping::internal::RankDataBuffer< RankType::value, type >::rank_signed ( ) const
inline

Returns the rank as int.

Returns
Rank as int.

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