KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
Loading...
Searching...
No Matches
kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType > Struct Template Reference

Parameter object representing a data buffer. This is an intermediate object which only holds the data and parameters. The actual buffer is created by calling the construct_buffer_or_rebind() method. More...

#include <parameter_objects.hpp>

Public Types

using DataBufferType
 The type of the constructed data buffer.
 
using value_type = typename DataBufferType::value_type
 The constructed data buffer's value type.
 

Public Member Functions

template<typename Data_ >
 DataBufferBuilder (Data_ &&data)
 Constructor for DataBufferBuilder.
 
template<template< typename... > typename RebindContainerType = UnusedRebindContainer, typename Flag = void>
auto construct_buffer_or_rebind ()
 Constructs the data buffer.
 
size_t size () const
 The size of the underlying container.
 

Static Public Attributes

static constexpr ParameterType parameter_type = parameter_type_param
 The parameter type.
 
static constexpr bool is_out_buffer
 
static constexpr bool is_owning
 Indicates whether the buffer owns its underlying storage.
 
static constexpr bool is_lib_allocated
 Indicates whether the buffer is allocated by KaMPIng.
 
static constexpr bool is_single_element
 Indicated whether the buffer is a single element buffer.
 

Detailed Description

template<typename Data, ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
struct kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >

Parameter object representing a data buffer. This is an intermediate object which only holds the data and parameters. The actual buffer is created by calling the construct_buffer_or_rebind() method.

Template Parameters
DataThe data type.
parameter_type_paramThe parameter type.
modifiabilityThe modifiability of the buffer.
buffer_typeThe type of the buffer.
buffer_resize_policyThe resize policy of the buffer.
ValueTypeThe value type of the buffer. Defaults to default_value_type_tag, indicating that this buffer does not enforce a specific value type.

Member Typedef Documentation

◆ DataBufferType

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
using kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::DataBufferType
Initial value:
decltype(make_data_buffer<
modifiability,
buffer_type,
buffer_resize_policy,
ValueType>(std::forward<Data>(data_)))
ParameterType
Each input parameter to one of the MPI calls wrapped by KaMPIng needs to has one of the following tag...
Definition named_parameter_types.hpp:33
auto make_data_buffer(Data &&data)
Creates a user allocated DataBuffer containing the supplied data (a container or a single element)
Definition data_buffer.hpp:798
static constexpr ParameterType parameter_type
The parameter type.
Definition parameter_objects.hpp:54

The type of the constructed data buffer.

Constructor & Destructor Documentation

◆ DataBufferBuilder()

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
template<typename Data_ >
kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::DataBufferBuilder ( Data_ && data)
inline

Constructor for DataBufferBuilder.

Parameters
dataThe container to build a databuffer for
Template Parameters
Data_The type of the container.

Member Function Documentation

◆ construct_buffer_or_rebind()

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
template<template< typename... > typename RebindContainerType = UnusedRebindContainer, typename Flag = void>
auto kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::construct_buffer_or_rebind ( )
inline

Constructs the data buffer.

Template Parameters
RebindContainerTypeThe container to use for the data buffer (has no effect here).
FlagA tag type indicating special behavior, e.g., serialization support (
See also
serialization_support_tag). Defaults to void.

Member Data Documentation

◆ is_lib_allocated

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
constexpr bool kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::is_lib_allocated
staticconstexpr
Initial value:
=
DataBufferType::is_lib_allocated

Indicates whether the buffer is allocated by KaMPIng.

◆ is_out_buffer

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
constexpr bool kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::is_out_buffer
staticconstexpr
Initial value:
=
DataBufferType::is_out_buffer

true if the buffer is an out or in/out buffer that results will be written to and false otherwise.

◆ is_owning

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
constexpr bool kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::is_owning
staticconstexpr
Initial value:
=
DataBufferType::is_owning

Indicates whether the buffer owns its underlying storage.

◆ is_single_element

template<typename Data , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy, typename ValueType = default_value_type_tag>
constexpr bool kamping::internal::DataBufferBuilder< Data, parameter_type_param, modifiability, buffer_type, buffer_resize_policy, ValueType >::is_single_element
staticconstexpr
Initial value:
=
DataBufferType::is_single_element

Indicated whether the buffer is a single element buffer.


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