KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
A more generic version of a DataBuffer which stores an object of type. More...
#include <data_buffer.hpp>
Public Types | |
using | value_type = MemberType |
Value type of the buffer. | |
using | MemberTypeWithConst |
using | MemberTypeWithConstAndRef |
Public Member Functions | |
template<bool enabled = ownership == BufferOwnership::referencing, std::enable_if_t< enabled, bool > = true> | |
GenericDataBuffer (MemberTypeWithConst &container) | |
Constructor for referencing GenericDataBuffer. | |
template<bool enabled = ownership == BufferOwnership::owning, std::enable_if_t< enabled, bool > = true> | |
GenericDataBuffer (MemberType container) | |
Constructor for owning GenericDataBuffer. | |
MemberType const & | underlying () const |
Provides access to the underlying data. | |
template<bool enabled = modifiability == BufferModifiability::modifiable, std::enable_if_t< enabled, bool > = true> | |
MemberType & | underlying () |
Provides access to the underlying data. | |
template<bool enabled = is_owning, std::enable_if_t< enabled, bool > = true> | |
MemberTypeWithConst | extract () |
Extract the underlying container. This will leave the DataBuffer in an unspecified state. | |
Static Public Attributes | |
static constexpr TParameterType | parameter_type |
The type of parameter this buffer represents. | |
static constexpr BufferType | buffer_type = buffer_type_param |
The type of the buffer, i.e., in, out, or in_out. | |
static constexpr bool | is_out_buffer |
true if the buffer is an out or in/out buffer that results will be written to and false otherwise. | |
static constexpr bool | is_owning |
Indicates whether the buffer owns its underlying storage. | |
static constexpr bool | is_modifiable |
Indicates whether the underlying storage is modifiable. | |
A more generic version of a DataBuffer which stores an object of type.
MemberType | with its associcated |
ParameterType. | In difference to DataBuffer, GenericDataBuffer does not require the wrapped object to expose neither data() , resize() nor value_type . |
MemberType | Type of the wrapped object. |
TParameterType | Type of the parameter_type_param (required for parameter selection within plugins). |
parameter_type_param | Parameter type represented by this buffer. |
modifiability | modifiable if a KaMPIng operation is allowed to modify the underlying container. constant otherwise. |
ownership | owning if the buffer should hold the object. referencing if only a reference to an existing object should be held. |
buffer_type_param | Type of buffer, i.e., in_buffer , out_buffer , or in_out_buffer . |
using kamping::internal::GenericDataBuffer< MemberType, TParameterType, parameter_type_param, modifiability, ownership, buffer_type_param >::MemberTypeWithConst |
The ContainerType as const or non-const depending on modifiability.
using kamping::internal::GenericDataBuffer< MemberType, TParameterType, parameter_type_param, modifiability, ownership, buffer_type_param >::MemberTypeWithConstAndRef |
The ContainerType as const or non-const (see ContainerTypeWithConst) and reference or non-reference depending on ownership.
|
inline |
Constructor for referencing GenericDataBuffer.
container | Container holding the actual data. |
|
inline |
Constructor for owning GenericDataBuffer.
container | Container holding the actual data. |
|
inline |
Extract the underlying container. This will leave the DataBuffer in an unspecified state.
|
inline |
Provides access to the underlying data.
|
inline |
Provides access to the underlying data.
|
staticconstexpr |
Indicates whether the underlying storage is modifiable.
|
staticconstexpr |
true
if the buffer is an out or in/out buffer that results will be written to and false
otherwise.
|
staticconstexpr |
Indicates whether the buffer owns its underlying storage.
|
staticconstexpr |
The type of parameter this buffer represents.