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

Parameter object representing a data buffer to be allocated by KaMPIng. This is a specialization of DataBufferBuilder for buffer allocation tags, such as alloc_new, alloc_new_using and alloc_container_of. This is an intermediate object not holding any data. The actual buffer is constructed by calling the construct_buffer_or_rebind() method. More...

#include <parameter_objects.hpp>

Public Types

using DataBufferType
 The type of the constructed data buffer (potentially rebinded to std::vector).
 
using value_type = typename DataBufferType::value_type
 The constructed data buffer's value type.
 

Public Member Functions

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 AllocType, typename ValueType, ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy>
struct kamping::internal::AllocNewDataBufferBuilder< AllocType, ValueType, parameter_type_param, modifiability, buffer_type, buffer_resize_policy >

Parameter object representing a data buffer to be allocated by KaMPIng. This is a specialization of DataBufferBuilder for buffer allocation tags, such as alloc_new, alloc_new_using and alloc_container_of. This is an intermediate object not holding any data. The actual buffer is constructed by calling the construct_buffer_or_rebind() method.

This type should be constructed using the factory methods make_data_buffer_builder.

Template Parameters
AllocTypeA tag type indicating what kind of buffer should be allocated. see alloc_new, alloc_new_using and alloc_container_of.

Member Typedef Documentation

◆ DataBufferType

Initial value:
decltype(make_data_buffer<
modifiability,
buffer_type,
buffer_resize_policy,
ValueType>(
std::conditional_t<
is_alloc_container_of_v<AllocType>,
AllocNewT<std::vector<ValueType>>,
AllocType>{}
))
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:137

The type of the constructed data buffer (potentially rebinded to std::vector).

Member Function Documentation

◆ construct_buffer_or_rebind()

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

Constructs the data buffer.

Template Parameters
RebindContainerTypeThe container to use for constructing the data buffer. This parameter is ignored if the buffer allocation trait is alloc_new or alloc_new_using. In case of alloc_container_of<U>, the created data buffer encapsulated a RebindContainerType<U>.
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 AllocType , typename ValueType , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy>
constexpr bool kamping::internal::AllocNewDataBufferBuilder< AllocType, ValueType, parameter_type_param, modifiability, buffer_type, buffer_resize_policy >::is_lib_allocated
staticconstexpr
Initial value:
=
DataBufferType::is_lib_allocated

Indicates whether the buffer is allocated by KaMPIng.

◆ is_out_buffer

template<typename AllocType , typename ValueType , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy>
constexpr bool kamping::internal::AllocNewDataBufferBuilder< AllocType, ValueType, parameter_type_param, modifiability, buffer_type, buffer_resize_policy >::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 AllocType , typename ValueType , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy>
constexpr bool kamping::internal::AllocNewDataBufferBuilder< AllocType, ValueType, parameter_type_param, modifiability, buffer_type, buffer_resize_policy >::is_owning
staticconstexpr
Initial value:
=
DataBufferType::is_owning

Indicates whether the buffer owns its underlying storage.

◆ is_single_element

template<typename AllocType , typename ValueType , ParameterType parameter_type_param, BufferModifiability modifiability, BufferType buffer_type, BufferResizePolicy buffer_resize_policy>
constexpr bool kamping::internal::AllocNewDataBufferBuilder< AllocType, ValueType, parameter_type_param, modifiability, buffer_type, buffer_resize_policy >::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: