MADNESS  0.10.1
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
madness::WorldObject< Derived > Class Template Reference

Implements most parts of a globally addressable object (via unique ID). More...

#include <world_object.h>

Inheritance diagram for madness::WorldObject< Derived >:
Inheritance graph
[legend]
Collaboration diagram for madness::WorldObject< Derived >:
Collaboration graph
[legend]

Public Types

typedef WorldObject< Derived > objT
 

Public Member Functions

 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
 
template<typename memfnT >
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn) const
 
template<typename memfnT , typename a1T >
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1) const
 
template<typename memfnT , typename a1T , typename a2T >
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const
 
template<typename memfnT , typename a1T , typename a2T , typename a3T >
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T >
detail::task_result_type< memfnT >::futureT send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T >
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
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T >
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
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T >
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
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T >
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
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
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
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T >
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...
 
template<typename memfnT , typename a1T , typename a2T , typename a3T >
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...
 
template<typename memfnT , typename a1T , typename a2T >
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...
 
template<typename memfnT , typename a1T >
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...
 
template<typename memfnT >
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
 

Protected Member Functions

void process_pending ()
 To be called from derived constructor to process pending messages. More...
 

Private Types

typedef std::list< detail::PendingMsgpendingT
 
typedef detail::voidT voidT
 

Private Member Functions

volatile std::list< detail::PendingMsgpending
 
volatile std::list< detail::PendingMsgpending
 
Spinlock pending_mutex (0)
 
Spinlock pending_mutex (0)
 
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
detail::task_result_type< memfnT >::futureT send_am (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
 
template<typename taskT , typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
taskT::futureT send_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) const
 

Static Private Member Functions

template<typename T >
static const Tam_arg (const Future< T > &f)
 
template<typename T >
static const Tam_arg (const T &t)
 
template<typename memfnT , typename arg1T , typename arg2T , typename arg3T , typename arg4T , typename arg5T , typename arg6T , typename arg7T , typename arg8T , typename arg9T >
static void handler (const AmArg &arg)
 Handler for an incoming AM. More...
 
static bool is_ready (const uniqueidT &id, objT *&obj, const AmArg &arg, am_handlerT ptr)
 
template<typename taskT >
static void spawn_remote_task_handler (const AmArg &arg)
 Handler for remote arguments. More...
 

Private Attributes

ProcessID me
 Rank of self. More...
 
uniqueidT objid
 Sense of self. More...
 
volatile bool ready
 True if ready to rock 'n roll. More...
 
Worldworld
 The World this object belongs to. (Think globally, act locally). More...
 

Static Private Attributes

static volatile pendingT pending
 Buffer for pending messages. More...
 
static Spinlock pending_mutex
 

Detailed Description

template<class Derived>
class madness::WorldObject< Derived >

Implements most parts of a globally addressable object (via unique ID).

This class is deliberately not default constructible and does not support assignment or copying. This ensures that each instance is unique. Have a look at madness::WorldContainer for an example of wrapping this using the PIMPL idiom and a shared pointer.

When deriving classes:

  1. Derived class has WorldObject<Derived> as a public base class.
  2. Derived constructor:
    1. invokes WorldObject<Derived>(world) constructor.
    2. invokes process_pending().
  3. Derived destructor must either be deferred or preceeded by gop.fence().
  4. Derived class must have at least one virtual function for serialization of derived class pointers to be cast to the appropriate type.

Note that world is exposed for convenience as a public data member.

Template Parameters
DerivedThe derived class. WorldObject is a curiously recurring template pattern.

Member Typedef Documentation

◆ objT

template<class Derived >
typedef WorldObject<Derived> madness::WorldObject< Derived >::objT
Todo:
Description needed.

◆ pendingT

template<class Derived >
typedef std::list<detail::PendingMsg> madness::WorldObject< Derived >::pendingT
private
Todo:
Description needed.

◆ voidT

template<class Derived >
typedef detail::voidT madness::WorldObject< Derived >::voidT
private
Todo:
Description needed.

Constructor & Destructor Documentation

◆ WorldObject() [1/2]

template<class Derived >
madness::WorldObject< Derived >::WorldObject ( const WorldObject< Derived > &  other)
inline

◆ WorldObject() [2/2]

template<class Derived >
madness::WorldObject< Derived >::WorldObject ( World world)
inline

Constructor that associates an object (via the derived class) with a globally unique ID.

Attention
The derived class MUST call process_pending from its constructor to both
  1. process any messages that arrived prior to construction.
  2. to enable processing of future messages.
Parameters
[in,out]worldThe World encapsulating the "global" domain.

◆ ~WorldObject()

template<class Derived >
virtual madness::WorldObject< Derived >::~WorldObject ( )
inlinevirtual

Member Function Documentation

◆ am_arg() [1/2]

template<class Derived >
template<typename T >
static const T& madness::WorldObject< Derived >::am_arg ( const Future< T > &  f)
inlinestaticprivate
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
TDescription needed.
Parameters
[in]fDescription needed.
Returns
Description needed.

References madness::f, and MADNESS_ASSERT.

Referenced by madness::WorldObject< Derived >::send(), and madness::WorldObject< Derived >::task().

◆ am_arg() [2/2]

template<class Derived >
template<typename T >
static const T& madness::WorldObject< Derived >::am_arg ( const T t)
inlinestaticprivate
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
TDescription needed.
Parameters
[in]tDescription needed.
Returns
Description needed.

◆ get_world()

template<class Derived >
World& madness::WorldObject< Derived >::get_world ( ) const
inline

Returns a reference to the world.

References madness::WorldObject< Derived >::world.

Referenced by madness::SeparatedConvolution< Q, NDIM >::combine().

◆ handler()

template<class Derived >
template<typename memfnT , typename arg1T , typename arg2T , typename arg3T , typename arg4T , typename arg5T , typename arg6T , typename arg7T , typename arg8T , typename arg9T >
static void madness::WorldObject< Derived >::handler ( const AmArg arg)
inlinestaticprivate

Handler for an incoming AM.

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
arg1TType of argument 1.
arg2TType of argument 2.
arg3TType of argument 3.
arg4TType of argument 4.
arg5TType of argument 5.
arg6TType of argument 6.
arg7TType of argument 7.
arg8TType of argument 8.
arg9TType of argument 9.
Parameters
[in]argDescription needed.

References madness::arg(), madness::WorldObject< Derived >::is_ready(), MADNESS_PRAGMA_CLANG, madness::detail::info_base< memfunT >::memfun(), madness::detail::peek(), madness::pop(), madness::detail::info< memfunT >::ref, and madness::detail::run_function().

◆ id()

template<class Derived >
const uniqueidT& madness::WorldObject< Derived >::id ( ) const
inline

◆ is_ready()

template<class Derived >
static bool madness::WorldObject< Derived >::is_ready ( const uniqueidT id,
objT *&  obj,
const AmArg arg,
am_handlerT  ptr 
)
inlinestaticprivate
Todo:
Complete: Determine if [unknown] is ready (for ...).

The slightly convoluted logic is to ensure ordering when processing pending messages. If a new message arrives while processing incoming messages it must be queued.

  • If the object does not exist —> not ready.
  • If the object exists and is ready —> ready.
  • If the object exists and is not ready then
    • if we are doing a queued/pending message --> ready.
    • else this is a new message --> not ready.
Parameters
[in]idDescription needed.
[in,out]objDescription needed.
[in]argDescription needed.
[in,out]ptrDescription needed.
Returns
Description needed.
Todo:
Parameter/return descriptions needed.

References madness::arg(), MADNESS_ASSERT, MADNESS_PRAGMA_CLANG, madness::WorldObject< Derived >::pending, madness::WorldObject< Derived >::pending_mutex, madness::pop(), and madness::WorldObject< Derived >::ready.

Referenced by madness::WorldObject< Derived >::handler(), and madness::WorldObject< Derived >::spawn_remote_task_handler().

◆ operator=()

template<class Derived >
WorldObject& madness::WorldObject< Derived >::operator= ( const WorldObject< Derived > &  )
delete

◆ pending() [1/2]

volatile std::list< detail::PendingMsg > madness::WorldObject< MacroTaskQ >::pending
private

◆ pending() [2/2]

volatile std::list< detail::PendingMsg > madness::WorldObject< WorldContainerImpl< long, std::vector< unsigned char >, madness::Hash< long > > >::pending
private

◆ pending_mutex() [1/2]

Spinlock madness::WorldObject< MacroTaskQ >::pending_mutex ( )
private

◆ pending_mutex() [2/2]

Spinlock madness::WorldObject< WorldContainerImpl< long, std::vector< unsigned char >, madness::Hash< long > > >::pending_mutex ( )
private

◆ process_pending()

template<class Derived >
void madness::WorldObject< Derived >::process_pending ( )
inlineprotected

To be called from derived constructor to process pending messages.

Cannot call this from the WorldObject constructor since the derived class would not yet be fully constructed.

Attention
No incoming messages are processed until this routine is invoked; the derived class may rely upon a well defined state until this routine is invoked.

References madness::Spinlock::lock(), MADNESS_PRAGMA_CLANG, madness::WorldObject< Derived >::objid, p(), madness::WorldObject< Derived >::pending, madness::WorldObject< Derived >::pending_mutex, madness::pop(), madness::WorldObject< Derived >::ready, and madness::Spinlock::unlock().

◆ send() [1/10]

template<class Derived >
template<typename memfnT >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
Returns
Description needed.

References madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [2/10]

template<class Derived >
template<typename memfnT , typename a1T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
Returns
Description needed.

References a1, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [3/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [4/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [5/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3,
const a4T &  a4 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [6/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3,
const a4T &  a4,
const a5T &  a5 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [7/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3,
const a4T &  a4,
const a5T &  a5,
const a6T &  a6 
) const
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [8/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [9/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::send_am(), and madness::Future< void >::value.

◆ send() [10/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
a9TType of argument 9.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
a9Argument 9.
Returns
Description needed.

References a1, a2, madness::WorldObject< Derived >::am_arg(), and madness::WorldObject< Derived >::send_am().

◆ send_am()

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::send_am ( 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
inlineprivate
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
a9TType of argument 9.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
a9Argument 9.
Returns
Description needed.

References a1, a2, madness::World::am, madness::WorldObject< Derived >::me, madness::new_am_arg(), madness::WorldObject< Derived >::objid, madness::Future< T >::remote_ref(), madness::detail::run_function(), madness::WorldAmInterface::send(), and madness::WorldObject< Derived >::world.

Referenced by madness::WorldObject< Derived >::send().

◆ send_task()

template<class Derived >
template<typename taskT , typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
taskT::futureT madness::WorldObject< Derived >::send_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 
) const
inlineprivate
Todo:
Brief description needed.
Todo:
Descriptions needed.
Template Parameters
taskTDescription needed.
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
a9TType of argument 9.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
a9Argument 9.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::World::am, madness::RMI::ATTR_UNORDERED, madness::WorldObject< Derived >::me, madness::new_am_arg(), madness::WorldObject< Derived >::objid, madness::WorldAmInterface::send(), and madness::WorldObject< Derived >::world.

◆ spawn_remote_task_handler()

template<class Derived >
template<typename taskT >
static void madness::WorldObject< Derived >::spawn_remote_task_handler ( const AmArg arg)
inlinestaticprivate

◆ task() [1/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T , typename a9T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
a9TType of argument 9.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
a9Argument 9.
attrDescription needed.
Returns
Description needed.
Todo:
Could we use variadic templates to eliminate a lot of this code duplication?

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, and madness::WorldObject< Derived >::world.

◆ task() [2/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T , typename a8T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
a8TType of argument 8.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
a8Argument 8.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [3/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T , typename a7T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
a7TType of argument 7.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
a7Argument 7.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [4/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T , typename a6T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
a6TType of argument 6.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
a6Argument 6.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [5/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T , typename a5T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::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
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
a5TType of argument 5.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
a5Argument 5.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [6/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T , typename a4T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::task ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3,
const a4T &  a4,
const TaskAttributes attr = TaskAttributes() 
) const
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
a4TType of argument 4.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
a4Argument 4.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [7/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T , typename a3T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::task ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const a3T &  a3,
const TaskAttributes attr = TaskAttributes() 
) const
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2,a3).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
a3TType of argument 3.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
a3Argument 3.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [8/10]

template<class Derived >
template<typename memfnT , typename a1T , typename a2T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::task ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const a2T &  a2,
const TaskAttributes attr = TaskAttributes() 
) const
inline

Sends task to derived class method returnT (this->*memfn)(a1,a2).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
a2TType of argument 2.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
a2Argument 2.
attrDescription needed.
Returns
Description needed.

References a1, a2, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [9/10]

template<class Derived >
template<typename memfnT , typename a1T >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::task ( ProcessID  dest,
memfnT  memfn,
const a1T &  a1,
const TaskAttributes attr = TaskAttributes() 
) const
inline

Sends task to derived class method returnT (this->*memfn)(a1).

Todo:
Descriptions needed.
Template Parameters
memfnTVerify: Signature of the member function in the derived class to be invoked for the task.
a1TType of argument 1.
Parameters
destDescription needed.
memfnVerify: The member function to be invoked for the task.
a1Argument 1.
attrDescription needed.
Returns
Description needed.

References a1, madness::WorldTaskQueue::add(), madness::WorldObject< Derived >::am_arg(), madness::WorldObject< Derived >::me, madness::World::taskq, madness::Future< void >::value, and madness::WorldObject< Derived >::world.

◆ task() [10/10]

template<class Derived >
template<typename memfnT >
detail::task_result_type<memfnT>::futureT madness::WorldObject< Derived >::task ( ProcessID  dest,
memfnT  memfn,
const TaskAttributes attr = TaskAttributes() 
) const
inline

Member Data Documentation

◆ me

template<class Derived >
ProcessID madness::WorldObject< Derived >::me
private

◆ objid

template<class Derived >
uniqueidT madness::WorldObject< Derived >::objid
private

◆ pending

template<class Derived >
volatile pendingT madness::WorldObject< Derived >::pending
inlinestaticprivate

◆ pending_mutex

template<class Derived >
Spinlock madness::WorldObject< Derived >::pending_mutex
inlinestaticprivate

◆ ready

template<class Derived >
volatile bool madness::WorldObject< Derived >::ready
private

◆ world

template<class Derived >
World& madness::WorldObject< Derived >::world
private

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