FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Global::SynchScalarTicket< DT_ > Class Template Reference

Ticket class for asynchronous global operations on scalars. More...

#include <synch_scal.hpp>

Public Member Functions

 SynchScalarTicket ()
 standard constructor More...
 
 SynchScalarTicket (const SynchScalarTicket &)=delete
 Unwanted copy constructor: Do not implement!
 
 SynchScalarTicket (DT_ x, const Dist::Comm &comm, const Dist::Operation &op, bool sqrt=false)
 Constructor. More...
 
 SynchScalarTicket (SynchScalarTicket &&other)
 move constructor More...
 
 ~SynchScalarTicket ()
 Destructor. More...
 
SynchScalarTicketoperator= (const SynchScalarTicket &)=delete
 Unwanted copy assignment operator: Do not implement!
 
SynchScalarTicketoperator= (SynchScalarTicket &&other)
 move-assign operator More...
 
DT_ wait ()
 wait method More...
 

Protected Attributes

bool _finished
 signals, whether wait was already called More...
 
double _mpi_exec
 holds our mpi execution toe More...
 
double _mpi_wait
 holds our mpi reduction wait toe More...
 
DT_ _r
 buffer containing the received data More...
 
Dist::Request _req
 Our request for the corresponding iallreduce mpi call. More...
 
bool _sqrt
 should we compute the sqrt of the result More...
 
DT_ _x
 buffer containing the send data More...
 

Detailed Description

template<typename DT_>
class FEAT::Global::SynchScalarTicket< DT_ >

Ticket class for asynchronous global operations on scalars.

Internally a cpp thread is used to process the mpi call and ensure proper processing by calling MPI_Wait ahead of the actual tickets wait call.

Author
Dirk Ribbrock, Peter Zajac

Definition at line 30 of file synch_scal.hpp.

Constructor & Destructor Documentation

◆ SynchScalarTicket() [1/3]

template<typename DT_ >
FEAT::Global::SynchScalarTicket< DT_ >::SynchScalarTicket ( )
inline

standard constructor

Definition at line 63 of file synch_scal.hpp.

◆ SynchScalarTicket() [2/3]

template<typename DT_ >
FEAT::Global::SynchScalarTicket< DT_ >::SynchScalarTicket ( DT_  x,
const Dist::Comm comm,
const Dist::Operation op,
bool  sqrt = false 
)
inlineexplicit

Constructor.

Parameters
[in]xThe value to be synchronized.
[in]commThe communicator to be used for synchronization.
[in]opThe reduction operation to be applied.
[in]sqrtSpecifies whether to apply the square-root onto the reduction result.

Definition at line 99 of file synch_scal.hpp.

References FEAT::Global::SynchScalarTicket< DT_ >::_r, FEAT::Global::SynchScalarTicket< DT_ >::_req, FEAT::Global::SynchScalarTicket< DT_ >::_x, FEAT::TimeStamp::elapsed_now(), and FEAT::Dist::Comm::iallreduce().

◆ SynchScalarTicket() [3/3]

template<typename DT_ >
FEAT::Global::SynchScalarTicket< DT_ >::SynchScalarTicket ( SynchScalarTicket< DT_ > &&  other)
inline

move constructor

Definition at line 139 of file synch_scal.hpp.

References XASSERTM.

◆ ~SynchScalarTicket()

template<typename DT_ >
FEAT::Global::SynchScalarTicket< DT_ >::~SynchScalarTicket ( )
inline

Destructor.

Definition at line 218 of file synch_scal.hpp.

References FEAT::Global::SynchScalarTicket< DT_ >::_finished, and XASSERT.

Member Function Documentation

◆ operator=()

◆ wait()

Member Data Documentation

◆ _finished

template<typename DT_ >
bool FEAT::Global::SynchScalarTicket< DT_ >::_finished
protected

◆ _mpi_exec

template<typename DT_ >
double FEAT::Global::SynchScalarTicket< DT_ >::_mpi_exec
protected

holds our mpi execution toe

Definition at line 40 of file synch_scal.hpp.

Referenced by FEAT::Global::SynchScalarTicket< DT_ >::operator=(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().

◆ _mpi_wait

template<typename DT_ >
double FEAT::Global::SynchScalarTicket< DT_ >::_mpi_wait
protected

holds our mpi reduction wait toe

Definition at line 42 of file synch_scal.hpp.

Referenced by FEAT::Global::SynchScalarTicket< DT_ >::operator=(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().

◆ _r

template<typename DT_ >
DT_ FEAT::Global::SynchScalarTicket< DT_ >::_r
protected

◆ _req

template<typename DT_ >
Dist::Request FEAT::Global::SynchScalarTicket< DT_ >::_req
protected

◆ _sqrt

template<typename DT_ >
bool FEAT::Global::SynchScalarTicket< DT_ >::_sqrt
protected

should we compute the sqrt of the result

Definition at line 38 of file synch_scal.hpp.

Referenced by FEAT::Global::SynchScalarTicket< DT_ >::operator=(), and FEAT::Global::SynchScalarTicket< DT_ >::wait().

◆ _x

template<typename DT_ >
DT_ FEAT::Global::SynchScalarTicket< DT_ >::_x
protected

buffer containing the send data

Definition at line 36 of file synch_scal.hpp.

Referenced by FEAT::Global::SynchScalarTicket< DT_ >::SynchScalarTicket(), and FEAT::Global::SynchScalarTicket< DT_ >::operator=().


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