MADNESS 0.10.1
madness::FinalizeReducer< T, NDIM > Class Template Reference

Receiving end of the exchange finalize, living in the world the transfer rides on. More...

#include <exchangeoperator.h>

Inheritance diagram for madness::FinalizeReducer< T, NDIM >:
Collaboration diagram for madness::FinalizeReducer< T, NDIM >:

Public Types

typedef FunctionImpl< T, NDIM > implT
typedef FinalizeNodeRec< T, NDIM > recT
Public Types inherited from madness::WorldObject< FinalizeReducer< T, NDIM > >
typedef WorldObject< FinalizeReducer< T, NDIM > > objT

Public Member Functions

 FinalizeReducer (World &world)
void accumulate_chunk (const std::vector< recT > &recs)
void set_targets (std::vector< implT * > dests, T beta)
 point at the destinations for the next drain; local, called by every rank
Public Member Functions inherited from madness::WorldObject< FinalizeReducer< T, NDIM > >
 WorldObject (const WorldObject &other)
virtual ~WorldObject ()
WorldObject & operator= (const WorldObject &)=delete
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn) const
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)().
Public Member Functions inherited from madness::WorldObjectBase
virtual ~WorldObjectBase ()
World & get_world () const
World & get_world_noexcept () const noexcept
 Get the world to which this object belongs, without risking a throw.
const uniqueidT & id () const
 Returns the globally unique object ID.
bool world_is_alive () const noexcept
 Reports whether the world to which this object belongs still exists.

Private Attributes

T beta_ = T(1.0)
std::vector< implT * > dests_

Additional Inherited Members

Protected Member Functions inherited from madness::WorldObject< FinalizeReducer< T, NDIM > >
void process_pending ()
 To be called from derived constructor to process pending messages.
Protected Member Functions inherited from madness::WorldObjectBase
 WorldObjectBase (const WorldObjectBase &other)
 Copy constructor; produces an unregistered object.
 WorldObjectBase (World &w)
 Construct a new WorldObjectBase.
World & get_world_unchecked () const noexcept
 Unchecked access to the memoized world reference.
template<typename DerivedT>
void register_self (DerivedT *this_ptr)
 Registers this object with its world, making it globally addressable.

Detailed Description

template<typename T, std::size_t NDIM>
class madness::FinalizeReducer< T, NDIM >

Receiving end of the exchange finalize, living in the world the transfer rides on.

Sources push bulk chunks here with task(), so deserializing and accumulating happens on a worker and never on the communication thread. The arithmetic is the same as FunctionNode::gaxpy_inplace; the accessor write lock is what serializes two senders that reach the same key at once.

Member Typedef Documentation

◆ implT

template<typename T, std::size_t NDIM>
typedef FunctionImpl<T, NDIM> madness::FinalizeReducer< T, NDIM >::implT

◆ recT

template<typename T, std::size_t NDIM>
typedef FinalizeNodeRec<T, NDIM> madness::FinalizeReducer< T, NDIM >::recT

Constructor & Destructor Documentation

◆ FinalizeReducer()

Member Function Documentation

◆ accumulate_chunk()

template<typename T, std::size_t NDIM>
void madness::FinalizeReducer< T, NDIM >::accumulate_chunk ( const std::vector< recT > & recs)
inline

References beta_, dests_, and MADNESS_CHECK_THROW.

Referenced by madness::coalesced_gaxpy().

◆ set_targets()

template<typename T, std::size_t NDIM>
void madness::FinalizeReducer< T, NDIM >::set_targets ( std::vector< implT * > dests,
T beta )
inline

point at the destinations for the next drain; local, called by every rank

References beta, beta_, and dests_.

Referenced by madness::coalesced_gaxpy().

Member Data Documentation

◆ beta_

template<typename T, std::size_t NDIM>
T madness::FinalizeReducer< T, NDIM >::beta_ = T(1.0)
private

Referenced by accumulate_chunk(), and set_targets().

◆ dests_

template<typename T, std::size_t NDIM>
std::vector<implT*> madness::FinalizeReducer< T, NDIM >::dests_
private

Referenced by accumulate_chunk(), and set_targets().


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