OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
olb::ConcreteBlockCommunicator< BLOCK >::RecvTask Class Reference

Wrapper for a non-blocking block propagation receive request. More...

#include <blockCommunicator.hh>

+ Collaboration diagram for olb::ConcreteBlockCommunicator< BLOCK >::RecvTask:

Classes

class  ref
 Manual replacement for std::reference_wrapper<RecvTask> More...
 

Public Member Functions

 RecvTask (MPI_Comm comm, int tag, int rank, const std::vector< std::type_index > &fields, const std::vector< CellID > &cells, BLOCK &block)
 
bool operator< (const RecvTask &rhs) const
 
void receive ()
 
bool isDone ()
 
void unpack ()
 

Detailed Description

template<typename BLOCK>
class olb::ConcreteBlockCommunicator< BLOCK >::RecvTask

Wrapper for a non-blocking block propagation receive request.

Definition at line 78 of file blockCommunicator.hh.

Constructor & Destructor Documentation

◆ RecvTask()

template<typename BLOCK >
olb::ConcreteBlockCommunicator< BLOCK >::RecvTask::RecvTask ( MPI_Comm comm,
int tag,
int rank,
const std::vector< std::type_index > & fields,
const std::vector< CellID > & cells,
BLOCK & block )
inline

Definition at line 115 of file blockCommunicator.hh.

118 :
119 _tag(tag),
120 _rank(rank),
121 _cells(cells),
122 _target(block, fields),
123 _buffer(new std::uint8_t[_target.size(_cells)] { }),
124 _request(_buffer.get(), _target.size(_cells),
125 _rank, _tag, comm)
126 { }
std::size_t size(ConstSpan< CellID > indices) const override
Get serialized size for data at locations indices

Member Function Documentation

◆ isDone()

template<typename BLOCK >
bool olb::ConcreteBlockCommunicator< BLOCK >::RecvTask::isDone ( )
inline

Definition at line 139 of file blockCommunicator.hh.

140 {
141 return _request.isDone();
142 }

References olb::MpiRequest::isDone().

+ Here is the call graph for this function:

◆ operator<()

template<typename BLOCK >
bool olb::ConcreteBlockCommunicator< BLOCK >::RecvTask::operator< ( const RecvTask & rhs) const
inline

Definition at line 128 of file blockCommunicator.hh.

129 {
130 return _rank < rhs._rank
131 || (_rank == rhs._rank && _tag < rhs._tag);
132 }

◆ receive()

template<typename BLOCK >
void olb::ConcreteBlockCommunicator< BLOCK >::RecvTask::receive ( )
inline

Definition at line 134 of file blockCommunicator.hh.

135 {
136 _request.start();
137 };

References olb::MpiRequest::start().

+ Here is the call graph for this function:

◆ unpack()

template<typename BLOCK >
void olb::ConcreteBlockCommunicator< BLOCK >::RecvTask::unpack ( )
inline

Definition at line 144 of file blockCommunicator.hh.

145 {
146 _target.deserialize(_cells, _buffer.get());
147 }
std::size_t deserialize(ConstSpan< CellID > indices, const std::uint8_t *buffer) override
Deserialize data at locations indices to buffer

References olb::MultiConcreteCommunicatable< COMMUNICATEE >::deserialize().

+ Here is the call graph for this function:

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