Grappa  r3821, hash 22cd626d567a91ead5b23302066d1e9469f45c66
Communication

Namespaces

 Grappa::SharedMessagePool
 

Classes

class  Grappa::Message< T >
 A standard message. More...
 
class  Grappa::PayloadMessage< T >
 A message with dynamic payload. More...
 
class  Grappa::MessagePoolStatic< Bytes >
 
class  Grappa::MessagePool
 
class  Grappa::ReuseMessage< T >
 message to be used in message pools. adds itself to a list after being sent More...
 
class  Grappa::ReuseMessageList< T >
 Reuse list of messages. More...
 

Functions

const Core Grappa::cores ()
 How many cores are there in this job? More...
 
const Core Grappa::mycore ()
 What's my core ID in this job? More...
 
const Core Grappa::locale_cores ()
 How many cores are in my shared memory domain? More...
 
const Core Grappa::locale_mycore ()
 What's my core ID within my shared memory domain? More...
 
const Locale Grappa::locales ()
 How many shared memory domains are in this job? More...
 
const Locale Grappa::mylocale ()
 What's my shared memory domain ID within this job? More...
 
const Locale Grappa::locale_of (Core c)
 What shared memory domain does core c belong to? More...
 
const char * Grappa::hostname ()
 What name does MPI think this node has? More...
 
template<typename T >
Grappa::Message Grappa::impl::MessageBase Grappa::__attribute__ ((aligned(64)))
 
template<typename T >
Message< T > Grappa::message (Core dest, T t)
 Construct a message allocated on the stack. More...
 
template<typename T >
PayloadMessage< T > Grappa::message (Core dest, T t, void *payload, size_t payload_size)
 Message with payload. More...
 
template<typename T >
Message< T > Grappa::send_message (Core dest, T t)
 Same as message, but immediately enqueued to be sent. More...
 
template<typename T >
PayloadMessage< T > Grappa::send_message (Core dest, T t, void *payload, size_t payload_size)
 Message with payload, immediately enqueued to be sent. More...
 
void Grappa::SharedMessagePool::init ()
 set up shared pool for basic message sizes More...
 
void Grappa::SharedMessagePool::activate ()
 
size_t Grappa::SharedMessagePool::estimate_footprint ()
 
size_t Grappa::SharedMessagePool::adjust_footprint (size_t target)
 
void * Grappa::SharedMessagePool::alloc (size_t sz)
 
void Grappa::SharedMessagePool::free (impl::MessageBase *m, size_t sz)
 
template<typename T >
Message< T > * Grappa::heap_message (Core dest, T t)
 
template<typename T >
PayloadMessage< T > * Grappa::heap_message (Core dest, T t, void *payload, size_t payload_size)
 Message with payload, allocated on heap. More...
 
template<typename T >
Message< T > * Grappa::send_heap_message (Core dest, T t)
 Same as message, but allocated on heap and immediately enqueued to be sent. More...
 
template<typename T >
PayloadMessage< T > * Grappa::send_heap_message (Core dest, T t, void *payload, size_t payload_size)
 Message with payload, allocated on heap and immediately enqueued to be sent. More...
 

Detailed Description

Function Documentation

template<typename T >
Grappa::Message Grappa::impl::MessageBase Grappa::__attribute__ ( (aligned(64))  )
void Grappa::SharedMessagePool::activate ( )

Definition at line 100 of file SharedMessagePool.cpp.

size_t Grappa::SharedMessagePool::adjust_footprint ( size_t  target)

Definition at line 81 of file SharedMessagePool.cpp.

void * Grappa::SharedMessagePool::alloc ( size_t  sz)

Definition at line 117 of file SharedMessagePool.cpp.

const Core Grappa::cores ( )
inline

How many cores are there in this job?

Definition at line 313 of file Communicator.hpp.

size_t Grappa::SharedMessagePool::estimate_footprint ( )

Definition at line 77 of file SharedMessagePool.cpp.

void Grappa::SharedMessagePool::free ( impl::MessageBase m,
size_t  sz 
)

Definition at line 136 of file SharedMessagePool.cpp.

template<typename T >
Message<T>* Grappa::heap_message ( Core  dest,
t 
)
inline

Definition at line 61 of file SharedMessagePool.hpp.

template<typename T >
PayloadMessage<T>* Grappa::heap_message ( Core  dest,
t,
void *  payload,
size_t  payload_size 
)
inline

Message with payload, allocated on heap.

Definition at line 69 of file SharedMessagePool.hpp.

const char* Grappa::hostname ( )
inline

What name does MPI think this node has?

Definition at line 334 of file Communicator.hpp.

void Grappa::SharedMessagePool::init ( )

set up shared pool for basic message sizes

Definition at line 90 of file SharedMessagePool.cpp.

const Core Grappa::locale_cores ( )
inline

How many cores are in my shared memory domain?

Definition at line 319 of file Communicator.hpp.

const Core Grappa::locale_mycore ( )
inline

What's my core ID within my shared memory domain?

Definition at line 322 of file Communicator.hpp.

const Locale Grappa::locale_of ( Core  c)
inline

What shared memory domain does core c belong to?

Definition at line 331 of file Communicator.hpp.

const Locale Grappa::locales ( )
inline

How many shared memory domains are in this job?

Definition at line 325 of file Communicator.hpp.

template<typename T >
Message<T> Grappa::message ( Core  dest,
t 
)
inline

Construct a message allocated on the stack.

Can be used with lambdas, functors, or function pointers. Example:

// using a lambda
auto m1 = Grappa::message( destination, [] { blah(); } );
// using a functor
class Functor { ... };
auto m2 = Grappa::message( destination, Functor( args ) );
// using a function pointer (via std::bind functor)
void foo( int bar, double baz ) { blah(); }
auto m3 = Grappa::message( destination, std::bind( &foo, 1, 2.3 ) );
Parameters
destCore to which message will be delivered
tFunctor or function pointer that will be called on destination core
Returns
Message object

Definition at line 356 of file Message.hpp.

template<typename T >
PayloadMessage<T> Grappa::message ( Core  dest,
t,
void *  payload,
size_t  payload_size 
)
inline

Message with payload.

Definition at line 362 of file Message.hpp.

const Core Grappa::mycore ( )
inline

What's my core ID in this job?

Definition at line 316 of file Communicator.hpp.

const Locale Grappa::mylocale ( )
inline

What's my shared memory domain ID within this job?

Definition at line 328 of file Communicator.hpp.

template<typename T >
Message<T>* Grappa::send_heap_message ( Core  dest,
t 
)
inline

Same as message, but allocated on heap and immediately enqueued to be sent.

Definition at line 78 of file SharedMessagePool.hpp.

template<typename T >
PayloadMessage<T>* Grappa::send_heap_message ( Core  dest,
t,
void *  payload,
size_t  payload_size 
)
inline

Message with payload, allocated on heap and immediately enqueued to be sent.

Definition at line 87 of file SharedMessagePool.hpp.

template<typename T >
Message<T> Grappa::send_message ( Core  dest,
t 
)
inline

Same as message, but immediately enqueued to be sent.

Definition at line 373 of file Message.hpp.

template<typename T >
PayloadMessage<T> Grappa::send_message ( Core  dest,
t,
void *  payload,
size_t  payload_size 
)
inline

Message with payload, immediately enqueued to be sent.

Definition at line 381 of file Message.hpp.