Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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...
 
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 89 of file SharedMessagePool.cpp.

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

Definition at line 70 of file SharedMessagePool.cpp.

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

Definition at line 106 of file SharedMessagePool.cpp.

const Core Grappa::cores ( )
inline

How many cores are there in this job?

Definition at line 297 of file Communicator.hpp.

size_t Grappa::SharedMessagePool::estimate_footprint ( )

Definition at line 66 of file SharedMessagePool.cpp.

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

Definition at line 125 of file SharedMessagePool.cpp.

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

Definition at line 50 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 58 of file SharedMessagePool.hpp.

void Grappa::SharedMessagePool::init ( )

set up shared pool for basic message sizes

Definition at line 79 of file SharedMessagePool.cpp.

const Core Grappa::locale_cores ( )
inline

How many cores are in my shared memory domain?

Definition at line 303 of file Communicator.hpp.

const Core Grappa::locale_mycore ( )
inline

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

Definition at line 306 of file Communicator.hpp.

const Locale Grappa::locale_of ( Core  c)
inline

What shared memory domain does core c belong to?

Definition at line 315 of file Communicator.hpp.

const Locale Grappa::locales ( )
inline

How many shared memory domains are in this job?

Definition at line 309 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 345 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 351 of file Message.hpp.

const Core Grappa::mycore ( )
inline

What's my core ID in this job?

Definition at line 300 of file Communicator.hpp.

const Locale Grappa::mylocale ( )
inline

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

Definition at line 312 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 67 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 76 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 362 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 370 of file Message.hpp.