MADNESS  0.10.1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
madness::AmArg Class Reference

World active message that extends an RMI message. More...

#include <worldam.h>

Public Member Functions

 AmArg ()
 
unsigned char * buf () const
 Returns a pointer to the user's payload (aligned in same way as AmArg) More...
 
ProcessID get_src () const
 For incoming AM gives the source process. More...
 
Worldget_world () const
 For incoming AM gives the associated world. More...
 
std::uint64_t get_worldid () const
 Return the world id. More...
 
template<typename T >
archive::BufferOutputArchive operator& (const T &t) const
 Used to serialize arguments into outgoing message. More...
 
template<typename T >
archive::BufferInputArchive operator& (T &t) const
 Used to deserialize arguments from incoming message. More...
 
std::size_t size () const
 Returns the size of the user's payload. More...
 

Private Member Functions

 AmArg (const AmArg &)
 
void clear_flags ()
 
am_handlerT get_func () const
 
bool is_pending () const
 
archive::BufferInputArchive make_input_arch () const
 
archive::BufferOutputArchive make_output_arch () const
 
AmArgoperator= (const AmArg &)
 
void set_func (am_handlerT handler)
 
void set_pending ()
 
void set_size (std::size_t numbyte)
 
void set_src (ProcessID source)
 
void set_worldid (unsigned long id)
 

Private Attributes

unsigned int flags
 
std::ptrdiff_t func
 
unsigned char header [RMI::HEADER_LEN]
 
std::size_t nbyte
 
ProcessID src
 
std::uint64_t worldid
 

Friends

AmArgalloc_am_arg (std::size_t nbyte)
 Allocates a new AmArg with nbytes of user data ... delete with free_am_arg. More...
 
class WorldAmInterface
 
template<class Derived >
class WorldObject
 

Detailed Description

World active message that extends an RMI message.

Constructor & Destructor Documentation

◆ AmArg() [1/2]

madness::AmArg::AmArg ( const AmArg )
private

◆ AmArg() [2/2]

madness::AmArg::AmArg ( )
inline

Member Function Documentation

◆ buf()

unsigned char* madness::AmArg::buf ( ) const
inline

Returns a pointer to the user's payload (aligned in same way as AmArg)

Referenced by make_input_arch(), and make_output_arch().

◆ clear_flags()

void madness::AmArg::clear_flags ( )
inlineprivate

References flags.

Referenced by madness::WorldAmInterface::send().

◆ get_func()

am_handlerT madness::AmArg::get_func ( ) const
inlineprivate

References func.

◆ get_src()

ProcessID madness::AmArg::get_src ( ) const
inline

For incoming AM gives the source process.

References src.

◆ get_world()

World* madness::AmArg::get_world ( ) const
inline

For incoming AM gives the associated world.

References madness::World::world_from_id(), and worldid.

◆ get_worldid()

std::uint64_t madness::AmArg::get_worldid ( ) const
inline

Return the world id.

References worldid.

◆ is_pending()

bool madness::AmArg::is_pending ( ) const
inlineprivate

References flags.

◆ make_input_arch()

archive::BufferInputArchive madness::AmArg::make_input_arch ( ) const
inlineprivate

References buf(), and size().

Referenced by operator&().

◆ make_output_arch()

archive::BufferOutputArchive madness::AmArg::make_output_arch ( ) const
inlineprivate

References buf(), and size().

Referenced by operator&().

◆ operator&() [1/2]

template<typename T >
archive::BufferOutputArchive madness::AmArg::operator& ( const T t) const
inline

Used to serialize arguments into outgoing message.

References make_output_arch().

◆ operator&() [2/2]

template<typename T >
archive::BufferInputArchive madness::AmArg::operator& ( T t) const
inline

Used to deserialize arguments from incoming message.

References make_input_arch().

◆ operator=()

AmArg& madness::AmArg::operator= ( const AmArg )
private

◆ set_func()

void madness::AmArg::set_func ( am_handlerT  handler)
inlineprivate

◆ set_pending()

void madness::AmArg::set_pending ( )
inlineprivate

References flags.

◆ set_size()

void madness::AmArg::set_size ( std::size_t  numbyte)
inlineprivate

References nbyte.

◆ set_src()

void madness::AmArg::set_src ( ProcessID  source)
inlineprivate

References source(), and src.

Referenced by madness::WorldAmInterface::send().

◆ set_worldid()

void madness::AmArg::set_worldid ( unsigned long  id)
inlineprivate

References worldid.

Referenced by madness::WorldAmInterface::send().

◆ size()

std::size_t madness::AmArg::size ( ) const
inline

Returns the size of the user's payload.

References nbyte.

Referenced by make_input_arch(), and make_output_arch().

Friends And Related Function Documentation

◆ alloc_am_arg

AmArg* alloc_am_arg ( std::size_t  nbyte)
friend

Allocates a new AmArg with nbytes of user data ... delete with free_am_arg.

◆ WorldAmInterface

friend class WorldAmInterface
friend

◆ WorldObject

template<class Derived >
friend class WorldObject
friend

Member Data Documentation

◆ flags

unsigned int madness::AmArg::flags
private

◆ func

std::ptrdiff_t madness::AmArg::func
private

Referenced by get_func(), and set_func().

◆ header

unsigned char madness::AmArg::header[RMI::HEADER_LEN]
private

◆ nbyte

std::size_t madness::AmArg::nbyte
private

Referenced by set_size(), and size().

◆ src

ProcessID madness::AmArg::src
private

Referenced by get_src(), and set_src().

◆ worldid

std::uint64_t madness::AmArg::worldid
private

Referenced by get_world(), get_worldid(), and set_worldid().


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