KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
result.hpp File Reference

Some functions and types simplifying/enabling the development of wrapped MPI calls in KaMPIng. More...

#include <optional>
#include <tuple>
#include <utility>
#include "kamping/has_member.hpp"
#include "kamping/named_parameter_check.hpp"
#include "kamping/named_parameter_filtering.hpp"
#include "kamping/named_parameter_selection.hpp"
#include "kamping/named_parameter_types.hpp"
#include "kamping/named_parameters_detail/status_parameters.hpp"

Go to the source code of this file.

Classes

struct  kamping::internal::ResultCategoryNotUsed
 Use this type if one of the template parameters of MPIResult is not used for a specific wrapped MPI call. More...
 
class  kamping::MPIResult< Args >
 MPIResult contains the result of a MPI call wrapped by KaMPIng. More...
 
struct  std::tuple_size< kamping::MPIResult< Args... > >
 Specialization of the std::tuple_size for kamping::MPIResult. Part of the structured binding machinery. More...
 
struct  std::tuple_element< index, kamping::MPIResult< Args... > >
 Specialization of the std::tuple_element for kamping::MPIResult. Part of the structured binding machinery. More...
 
class  kamping::NonBlockingResult< MPIResultType, RequestDataBuffer >
 NonBlockingResult contains the result of a non-blocking MPI call wrapped by KaMPIng. It encapsulates a kamping::MPIResult and a kamping::Request. More...
 
struct  kamping::internal::PredicateForResultObject
 Predicate to check whether a buffer provided to make_mpi_result() shall be discard or returned in the result object. More...
 
struct  kamping::internal::DiscardSerializationBuffers
 Predicate to check whether a buffer provided to make_mpi_result() shall be discard or returned in the result object, including a hotfix for serialization. More...
 
struct  kamping::internal::PrependParameterType< ptype, Tuple >
 Template class to prepend the ParameterTypeEntry<ParameterType::ptype> type to a given std::tuple. More...
 

Namespaces

namespace  kamping::internal
 Internal namespace marking the code that is not user-facing.
 
namespace  std
 STL namespace.
 

Typedefs

using kamping::internal::parameter_types_to_ignore_for_result_object
 List of parameter type (entries) which should not be included in the result object.
 

Functions

template<typename CallerProvidedOwningOutBuffers >
constexpr bool kamping::internal::return_recv_or_send_recv_buffer_only ()
 Determines whether only the recv (send_recv) buffer or multiple different buffers will be returned.
 
template<typename CallerProvidedOwningOutBuffers >
constexpr bool kamping::internal::return_send_buf_out_only ()
 Determines whether only the send buffer should be returned. This may happen if ownership of the send buffer is transfered to the call.
 
template<typename... Buffers>
constexpr ParameterType kamping::internal::determine_recv_buffer_type ()
 Checks whether a buffer with parameter type recv_buf or a buffer with type send_recv_buf is present and returns the found parameter type. Note that we require that either a recv_buf or a send_recv_buf is present.
 
template<typename... Buffers>
constexpr bool kamping::internal::has_recv_or_send_recv_buf ()
 Returns True iff only a recv or send_recv buffer is present. Communicator::ibarrier()).
 
template<typename CallerProvidedArgs , typename... Buffers>
auto kamping::internal::make_mpi_result (Buffers &&... buffers)
 Construct result object for a wrapped MPI call. Four different cases are handled: a) The recv_buffer owns its underlying data (i.e. the received data has to be returned via the result object):
 
template<typename CallerProvidedArgsInTuple , typename... Args>
auto kamping::internal::make_nonblocking_result (Args... args)
 Factory for creating a kamping::NonBlockingResult.
 

Variables

template<typename T >
constexpr bool kamping::internal::has_extract_v = has_member_extract_v<T>
 has_extract_v is true iff type T has a member function extract().
 
template<typename Buffer >
constexpr bool kamping::internal::is_extractable = Buffer::is_owning&& Buffer::is_out_buffer
 Helper for implementing the extract_* functions in MPIResult. Is true if the passed buffer type owns its underlying storage and is an output buffer.
 
template<typename >
constexpr bool kamping::is_mpi_result_v = false
 Trait for checking whether a type is an MPIResult.
 
template<typename... Args>
constexpr bool kamping::is_mpi_result_v< MPIResult< Args... > > = true
 Trait for checking whether a type is an MPIResult.
 
template<typename T >
constexpr bool kamping::is_result_empty_v = false
 Primary template for result trait indicates whether the result object is empty.
 
template<typename... Args>
constexpr bool kamping::is_result_empty_v< MPIResult< Args... > > = MPIResult<Args...>::is_empty
 Template specialization for result trait indicates whether the result object is empty.
 
template<>
constexpr bool kamping::is_result_empty_v< void > = true
 Template specialization for result trait indicates whether the result object is empty.
 
template<typename , typename = void>
constexpr bool kamping::internal::has_data_buffer_type_member = false
 Helper to check if a type T has a member type T::DataBufferType.
 

Detailed Description

Some functions and types simplifying/enabling the development of wrapped MPI calls in KaMPIng.