KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::RequestBase< RequestType > Class Template Reference

Base class for request wrappers. More...

#include <request.hpp>

Public Member Functions

 RequestBase (RequestBase const &)=delete
 Copy constructor is deleted because requests should only be moved.
 
RequestBaseoperator= (RequestBase const &)=delete
 Copy assignment operator is deleted because requests should only be moved.
 
 RequestBase (RequestBase &&)=default
 Move constructor.
 
RequestBaseoperator= (RequestBase &&)=default
 Move assignment operator.
 
template<typename StatusParamObjectType = decltype(status(ignore<>))>
auto wait (StatusParamObjectType status_param=kamping::status(ignore<>))
 Returns when the operation defined by the underlying request completes. If the underlying request was initialized by a non-blocking communication call, it is set to MPI_REQUEST_NULL.
 
bool is_null () const
 
template<typename StatusParamObjectType = decltype(status(ignore<>))>
auto test (StatusParamObjectType status_param=kamping::status(ignore<>))
 Tests for completion of the underlying request. If the underlying request was initialized by a non-blocking communication call and completes, it is set to MPI_REQUEST_NULL.
 
MPI_Requestmpi_request ()
 
MPI_Request constmpi_request () const
 
template<typename T >
bool operator== (RequestBase< T > const &other) const
 
template<typename T >
bool operator!= (RequestBase< T > const &other) const
 

Detailed Description

template<typename RequestType>
class kamping::RequestBase< RequestType >

Base class for request wrappers.

This class provides the common interface for all request wrappers. It is not intended to be used directly. Instead, use kamping::Request or kamping::PooledRequest or define your own request type, which must implement request_ptr().

Template Parameters
RequestTypeThe derived type.

Member Function Documentation

◆ is_null()

template<typename RequestType >
bool kamping::RequestBase< RequestType >::is_null ( ) const
inline
Returns
True if this request is equal to MPI_REQUEST_NULL.

◆ mpi_request() [1/2]

template<typename RequestType >
MPI_Request & kamping::RequestBase< RequestType >::mpi_request ( )
inline
Returns
A reference to the underlying MPI_Request handle.

◆ mpi_request() [2/2]

template<typename RequestType >
MPI_Request const & kamping::RequestBase< RequestType >::mpi_request ( ) const
inline
Returns
A reference to the underlying MPI_Request handle.

◆ operator!=()

template<typename RequestType >
template<typename T >
bool kamping::RequestBase< RequestType >::operator!= ( RequestBase< T > const & other) const
inline
Returns
Returns true if the other request wrapper points to a different request.

◆ operator==()

template<typename RequestType >
template<typename T >
bool kamping::RequestBase< RequestType >::operator== ( RequestBase< T > const & other) const
inline
Returns
Returns true if the other request wrapper points to the same request.

◆ test()

template<typename RequestType >
template<typename StatusParamObjectType = decltype(status(ignore<>))>
auto kamping::RequestBase< RequestType >::test ( StatusParamObjectType status_param = kamping::status(ignore<>))
inline

Tests for completion of the underlying request. If the underlying request was initialized by a non-blocking communication call and completes, it is set to MPI_REQUEST_NULL.

Parameters
status_paramA parameter created by kamping::status() or kamping::status_out(). Defaults to kamping::status(ignore<>).
Returns
Returns true if the underlying request is complete. If status is kamping::status_out() and owning, returns an std::optional encapsulating the status in case of completion, std::nullopt otherwise.

◆ wait()

template<typename RequestType >
template<typename StatusParamObjectType = decltype(status(ignore<>))>
auto kamping::RequestBase< RequestType >::wait ( StatusParamObjectType status_param = kamping::status(ignore<>))
inline

Returns when the operation defined by the underlying request completes. If the underlying request was initialized by a non-blocking communication call, it is set to MPI_REQUEST_NULL.

Parameters
status_paramA parameter created by kamping::status() or kamping::status_out(). Defaults to kamping::status(ignore<>).
Returns
The status object, if status is kamping::status_out(), otherwise nothing.

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