MADNESS  0.10.1
Public Types | Public Member Functions | Private Attributes | List of all members
madness::ScalarResult< T > Class Template Reference

helper class for returning the result of a task, which is not a madness Function, but a simple scalar More...

#include <macrotaskq.h>

Inheritance diagram for madness::ScalarResult< T >:
Inheritance graph
[legend]
Collaboration diagram for madness::ScalarResult< T >:
Collaboration graph
[legend]

Public Types

typedef T value_type
 
- Public Types inherited from madness::WorldObject< ScalarResult< double > >
typedef WorldObject< ScalarResult< double > > objT
 

Public Member Functions

 ScalarResult (const ScalarResult< T > &other)=delete
 Disable the default copy constructor. More...
 
 ScalarResult (ScalarResult< T > &&)=default
 
 ScalarResult (World &world)
 
 ~ScalarResult ()
 
void gaxpy (const double a, const T &right, double b, const bool fence=true)
 accumulate, optional fence More...
 
T get ()
 after completion of the taskq get the final value More...
 
T get_local () const
 
ScalarResult< T > & operator+= (const T &x)
 
ScalarResult< T > & operator= (const ScalarResult< T > &other)=delete
 disable assignment operator More...
 
ScalarResult< T > & operator= (const T &x)
 simple assignment of the scalar value More...
 
ScalarResult< T > & operator= (ScalarResult< T > &&)=default
 
template<typename Archive >
void serialize (Archive &ar)
 
- Public Member Functions inherited from madness::WorldObject< ScalarResult< double > >
 WorldObject (const WorldObject &other)
 
 WorldObject (World &world)
 Constructor that associates an object (via the derived class) with a globally unique ID. More...
 
virtual ~WorldObject ()
 
Worldget_world () const
 Returns a reference to the world. More...
 
const uniqueidTid () const
 Returns the globally unique object ID. More...
 
WorldObjectoperator= (const WorldObject &)=delete
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8) const
 
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9) const
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2,a3). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1,a2). More...
 
detail::task_result_type< memfnT >::futureT task (ProcessID dest, memfnT memfn, const a1T &a1, const TaskAttributes &attr=TaskAttributes()) const
 Sends task to derived class method returnT (this->*memfn)(a1). More...
 
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)(). More...
 
- Public Member Functions inherited from madness::WorldObjectBase
virtual ~WorldObjectBase ()=default
 

Private Attributes

T value =T()
 the scalar value More...
 

Additional Inherited Members

- Protected Member Functions inherited from madness::WorldObject< ScalarResult< double > >
void process_pending ()
 To be called from derived constructor to process pending messages. More...
 

Detailed Description

template<typename T = double>
class madness::ScalarResult< T >

helper class for returning the result of a task, which is not a madness Function, but a simple scalar

the result value is accumulated via gaxpy in universe rank=0, after completion of the taskq the final value can be obtained via get(), which includes a broadcast of the final value to all processes

Member Typedef Documentation

◆ value_type

template<typename T = double>
typedef T madness::ScalarResult< T >::value_type

Constructor & Destructor Documentation

◆ ScalarResult() [1/3]

template<typename T = double>
madness::ScalarResult< T >::ScalarResult ( World world)
inline

◆ ScalarResult() [2/3]

template<typename T = double>
madness::ScalarResult< T >::ScalarResult ( const ScalarResult< T > &  other)
delete

Disable the default copy constructor.

◆ ScalarResult() [3/3]

template<typename T = double>
madness::ScalarResult< T >::ScalarResult ( ScalarResult< T > &&  )
default

◆ ~ScalarResult()

template<typename T = double>
madness::ScalarResult< T >::~ScalarResult ( )
inline

Member Function Documentation

◆ gaxpy()

template<typename T = double>
void madness::ScalarResult< T >::gaxpy ( const double  a,
const T right,
double  b,
const bool  fence = true 
)
inline

◆ get()

template<typename T = double>
T madness::ScalarResult< T >::get ( )
inline

◆ get_local()

template<typename T = double>
T madness::ScalarResult< T >::get_local ( ) const
inline

get the local value of this rank, which might differ for different ranks for the final value use get()

References madness::ScalarResult< T >::value.

◆ operator+=()

template<typename T = double>
ScalarResult<T>& madness::ScalarResult< T >::operator+= ( const T x)
inline

◆ operator=() [1/3]

template<typename T = double>
ScalarResult<T>& madness::ScalarResult< T >::operator= ( const ScalarResult< T > &  other)
delete

disable assignment operator

◆ operator=() [2/3]

template<typename T = double>
ScalarResult<T>& madness::ScalarResult< T >::operator= ( const T x)
inline

simple assignment of the scalar value

References madness::ScalarResult< T >::value.

◆ operator=() [3/3]

template<typename T = double>
ScalarResult<T>& madness::ScalarResult< T >::operator= ( ScalarResult< T > &&  )
default

◆ serialize()

template<typename T = double>
template<typename Archive >
void madness::ScalarResult< T >::serialize ( Archive &  ar)
inline

Member Data Documentation

◆ value

template<typename T = double>
T madness::ScalarResult< T >::value =T()
private

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