KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Empty buffer that can be used as default argument for optional buffer parameters. More...
#include <data_buffer.hpp>
Public Types | |
using | value_type = Data |
Value type of the buffer. | |
Public Member Functions | |
size_t | size () const |
Get the number of elements in the underlying storage. | |
value_type const * | data () const |
Get a nullptr. | |
Span< value_type > | get () const |
Returns a span containing a nullptr. | |
template<typename SizeFunc > | |
void | resize_if_requested (SizeFunc &&compute_required_size) |
Resizes the underlying container if the buffer the buffer's resize policy allows and resizing is necessary. Does nothing for an empty buffer. | |
Static Public Attributes | |
static constexpr ParameterType | parameter_type = type |
The type of parameter this buffer represents. | |
static constexpr bool | is_modifiable |
This pseudo buffer is not modifiable since it represents no actual buffer. | |
static constexpr BufferType | buffer_type |
The type of the buffer, usually ignore for this special buffer. | |
static constexpr BufferResizePolicy | resize_policy = no_resize |
An empty buffer can not be resized. | |
static constexpr bool | is_out_buffer = false |
An empty buffer is never output. | |
static constexpr bool | is_lib_allocated = false |
An empty buffer is not allocated. | |
static constexpr bool | is_single_element = false |
An empty buffer contains no elements. | |
static constexpr bool | is_owning = false |
An empty buffer does not own anything. | |
Empty buffer that can be used as default argument for optional buffer parameters.
ParameterType | Parameter type represented by this pseudo buffer. |
|
inline |
Get a nullptr.
|
inline |
Returns a span containing a nullptr.
|
inline |
Resizes the underlying container if the buffer the buffer's resize policy allows and resizing is necessary. Does nothing for an empty buffer.
SizeFunc | Type of the functor which computes the required buffer size. |
compute_required_size | Functor which is used to compute the required buffer size. compute_required_size() is not called if the buffer's resize policy is BufferResizePolicy::no_resize. |
|
inline |
Get the number of elements in the underlying storage.
|
staticconstexpr |
The type of the buffer, usually ignore for this special buffer.
|
staticconstexpr |
This pseudo buffer is not modifiable since it represents no actual buffer.