LAMA
|
#include <GPIInterface.hpp>
Public Member Functions | |
GPIInterface () | |
virtual | ~GPIInterface () |
virtual void * | allocate (size_t size) const |
virtual void | free (void *ptr, const size_t size) const |
virtual void | syncronizeAll () const |
virtual bool | isPinned (const void *const ptr) const |
virtual PGASSyncToken * | getSyncToken (int arg1) const |
virtual PartitionId | getRank () const |
virtual PartitionId | getSize () const |
virtual PGASCommunicationKind | getPreferredCommunicationKind () const |
virtual void | get (void *dst, const void *src, size_t length, int srcpe) const |
virtual void | put (void *dst, const void *src, size_t length, int srcpe) const |
virtual void | writeAt (std::ostream &stream) const |
Writes some Information about this to the passed stream. | |
virtual std::auto_ptr< SyncToken > | getAsync (void *dst, const void *src, size_t length, int srcPE) const |
virtual std::auto_ptr< SyncToken > | putAsync (void *dst, const void *src, size_t length, int srcPE) const |
virtual std::auto_ptr< SyncToken > | shift (void *dst, const void *src, size_t size, PartitionId destRank, PartitionId srcRank) const |
virtual std::auto_ptr< SyncToken > | broadcast (void *dst, const void *src, size_t length, int srcPE) const |
virtual std::auto_ptr< SyncToken > | all2all (void *dst, const void *src, size_t elemSize) const |
virtual double | max (const double val, const PartitionId root) const |
virtual float | max (const float val, const PartitionId root) const |
virtual int | max (const int val, const PartitionId root) const |
virtual size_t | max (const size_t val, const PartitionId root) const |
virtual double | min (const double val, const PartitionId root) const |
virtual float | min (const float val, const PartitionId root) const |
virtual int | min (const int val, const PartitionId root) const |
virtual double | sum (const double val, const PartitionId root) const |
virtual float | sum (const float val, const PartitionId root) const |
virtual int | sum (const int val, const PartitionId root) const |
virtual size_t | sum (const size_t val, const PartitionId root) const |
virtual double | maxToAll (const double val) const |
virtual float | maxToAll (const float val) const |
virtual int | maxToAll (const int val) const |
virtual size_t | maxToAll (const size_t val) const |
virtual double | minToAll (const double val) const |
virtual float | minToAll (const float val) const |
virtual int | minToAll (const int val) const |
virtual double | sumToAll (const double val) const |
virtual float | sumToAll (const float val) const |
virtual int | sumToAll (const int val) const |
virtual size_t | sumToAll (const size_t val) const |
virtual void | maxloc (double &d, int &loc, PartitionId root) const |
virtual void | maxloc (float &d, int &loc, PartitionId root) const |
virtual void | maxloc (int &d, int &loc, PartitionId root) const |
virtual void | swap (void *val, const size_t n, const PartitionId partner) const |
virtual void | scatter (void *myvals, const size_t partSize, const PartitionId root, const void *allvals) const |
virtual void | scatter (void *myvals, const size_t elemSize, const PartitionId root, const void *allvals, const IndexType sizes[]) const |
virtual void | gather (void *allvals, const size_t partSize, const PartitionId root, const void *myvals) const |
virtual void | gather (void *allvals, const size_t elemSize, const PartitionId root, const void *myvals, const IndexType sizes[]) const |
virtual void | parallelReduction (PGASFunctor &reduction, PartitionId root) const |
Static Public Member Functions | |
static const PGASInterface * | getInstance () |
Data Fields | |
PartitionId | mRank |
PartitionId | mSize |
PGASAllocator * | mAllocator |
Private Member Functions | |
LAMA_LOG_DECL_STATIC_LOGGER (logger) | |
Private Attributes | |
long * | pSync |
void * | pWork |
Static Private Attributes | |
static long | mAllocated |
static long | mBarrierNum |
References lama::LAMAArguments::getArgc(), lama::LAMAArguments::getArgv(), LAMA_ASSERT, mAllocator, mRank, and mSize.
lama::GPIInterface::~GPIInterface | ( | ) | [virtual] |
References mAllocator, and syncronizeAll().
std::auto_ptr< SyncToken > lama::PGASInterface::all2all | ( | void * | dst, |
const void * | src, | ||
size_t | elemSize | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::getAsync(), lama::PGASInterface::getRank(), and lama::PGASInterface::getSize().
Referenced by lama::PGASCommunicator::all2all().
void * lama::GPIInterface::allocate | ( | size_t | size | ) | const [virtual] |
Implements lama::PGASInterface.
References lama::PGASAllocator::allocate(), lama::PGASAllocator::getOffset(), getRank(), LAMA_ASSERT, mAllocated, and mAllocator.
std::auto_ptr< SyncToken > lama::PGASInterface::broadcast | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::getPreferredCommunicationKind(), lama::PGASInterface::getRank(), lama::PGASInterface::getSize(), lama::PGASget, and lama::PGASInterface::put().
Referenced by lama::PGASCommunicator::bcast(), lama::PGASCommunicator::gather(), lama::PGASInterface::maxToAllImpl(), lama::PGASInterface::minToAllImpl(), and lama::PGASInterface::sumToAllImpl().
void lama::GPIInterface::free | ( | void * | ptr, |
const size_t | size | ||
) | const [virtual] |
Implements lama::PGASInterface.
References lama::PGASAllocator::free(), lama::PGASAllocator::getOffset(), getRank(), mAllocated, and mAllocator.
void lama::PGASInterface::gather | ( | void * | allvals, |
const size_t | partSize, | ||
const PartitionId | root, | ||
const void * | myvals | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::getPreferredCommunicationKind(), lama::PGASInterface::getRank(), lama::PGASInterface::getSize(), lama::PGASput, and lama::PGASInterface::put().
Referenced by lama::PGASCommunicator::gather(), and lama::PGASCommunicator::gatherImpl().
void lama::PGASInterface::gather | ( | void * | allvals, |
const size_t | elemSize, | ||
const PartitionId | root, | ||
const void * | myvals, | ||
const IndexType | sizes[] | ||
) | const [virtual, inherited] |
void lama::GPIInterface::get | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcpe | ||
) | const [virtual] |
Implements lama::PGASInterface.
References lama::PGASAllocator::getOffset(), getRank(), LAMA_ASSERT, mAllocated, and mAllocator.
std::auto_ptr< SyncToken > lama::PGASInterface::getAsync | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
Referenced by lama::PGASInterface::all2all(), lama::PGASCommunicator::exchangeByPlanAsyncImpl(), and lama::PGASInterface::shift().
const PGASInterface * lama::PGASInterface::getInstance | ( | ) | [static, inherited] |
References lama::PGASInterface::init(), and lama::PGASInterface::sInstance.
Referenced by lama::PGASContext::allocate(), lama::PGASContext::free(), lama::PGASCommunicatorManager::init(), and lama::PGASSyncToken::wait().
PGASCommunicationKind lama::GPIInterface::getPreferredCommunicationKind | ( | ) | const [virtual] |
Implements lama::PGASInterface.
References lama::PGASget.
PartitionId lama::GPIInterface::getRank | ( | ) | const [virtual] |
Implements lama::PGASInterface.
References mRank.
Referenced by allocate(), free(), get(), isPinned(), put(), and syncronizeAll().
PartitionId lama::GPIInterface::getSize | ( | ) | const [virtual] |
Implements lama::PGASInterface.
References mSize.
PGASSyncToken * lama::GPIInterface::getSyncToken | ( | int | arg1 | ) | const [virtual] |
Implements lama::PGASInterface.
bool lama::GPIInterface::isPinned | ( | const void *const | ptr | ) | const [virtual] |
Implements lama::PGASInterface.
References getRank(), lama::PGASAllocator::isAllocated(), and mAllocator.
lama::GPIInterface::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
Reimplemented from lama::PGASInterface.
double lama::PGASInterface::max | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
References lama::PGASMaxFunctor< T >::getResult(), and lama::PGASInterface::parallelReduction().
Referenced by lama::PGASInterface::maxToAllImpl().
float lama::PGASInterface::max | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
int lama::PGASInterface::max | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
size_t lama::PGASInterface::max | ( | const size_t | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
void lama::PGASInterface::maxloc | ( | double & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual, inherited] |
void lama::PGASInterface::maxloc | ( | float & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual, inherited] |
void lama::PGASInterface::maxloc | ( | int & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual, inherited] |
double lama::PGASInterface::maxToAll | ( | const double | val | ) | const [virtual, inherited] |
References lama::PGASInterface::maxToAllImpl().
Referenced by lama::PGASCommunicator::max().
float lama::PGASInterface::maxToAll | ( | const float | val | ) | const [virtual, inherited] |
References lama::PGASInterface::maxToAllImpl().
int lama::PGASInterface::maxToAll | ( | const int | val | ) | const [virtual, inherited] |
References lama::PGASInterface::maxToAllImpl().
size_t lama::PGASInterface::maxToAll | ( | const size_t | val | ) | const [virtual, inherited] |
References lama::PGASInterface::maxToAllImpl().
double lama::PGASInterface::min | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
References lama::PGASMinFunctor< T >::getResult(), and lama::PGASInterface::parallelReduction().
Referenced by lama::PGASInterface::minToAllImpl().
float lama::PGASInterface::min | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
int lama::PGASInterface::min | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
double lama::PGASInterface::minToAll | ( | const double | val | ) | const [virtual, inherited] |
References lama::PGASInterface::minToAllImpl().
Referenced by lama::PGASCommunicator::min().
float lama::PGASInterface::minToAll | ( | const float | val | ) | const [virtual, inherited] |
References lama::PGASInterface::minToAllImpl().
int lama::PGASInterface::minToAll | ( | const int | val | ) | const [virtual, inherited] |
References lama::PGASInterface::minToAllImpl().
void lama::PGASInterface::parallelReduction | ( | PGASFunctor & | reduction, |
PartitionId | root | ||
) | const [virtual, inherited] |
void lama::GPIInterface::put | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcpe | ||
) | const [virtual] |
Implements lama::PGASInterface.
References lama::PGASAllocator::getOffset(), getRank(), LAMA_ASSERT, mAllocated, and mAllocator.
std::auto_ptr< SyncToken > lama::PGASInterface::putAsync | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::put().
Referenced by lama::PGASInterface::shift().
void lama::PGASInterface::scatter | ( | void * | myvals, |
const size_t | partSize, | ||
const PartitionId | root, | ||
const void * | allvals | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::getPreferredCommunicationKind(), lama::PGASInterface::getRank(), lama::PGASInterface::getSize(), lama::PGASget, and lama::PGASInterface::put().
Referenced by lama::PGASCommunicator::scatterImpl().
void lama::PGASInterface::scatter | ( | void * | myvals, |
const size_t | elemSize, | ||
const PartitionId | root, | ||
const void * | allvals, | ||
const IndexType | sizes[] | ||
) | const [virtual, inherited] |
std::auto_ptr< SyncToken > lama::PGASInterface::shift | ( | void * | dst, |
const void * | src, | ||
size_t | size, | ||
PartitionId | destRank, | ||
PartitionId | srcRank | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::getAsync(), lama::PGASInterface::getPreferredCommunicationKind(), lama::PGASInterface::getRank(), LAMA_ASSERT_ERROR, lama::PGASget, and lama::PGASInterface::putAsync().
Referenced by lama::PGASCommunicator::shiftAsyncImpl().
double lama::PGASInterface::sum | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
References lama::PGASSumFunctor< T >::getResult(), and lama::PGASInterface::parallelReduction().
Referenced by lama::PGASInterface::sumToAllImpl().
float lama::PGASInterface::sum | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
int lama::PGASInterface::sum | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
size_t lama::PGASInterface::sum | ( | const size_t | val, |
const PartitionId | root | ||
) | const [virtual, inherited] |
double lama::PGASInterface::sumToAll | ( | const double | val | ) | const [virtual, inherited] |
References lama::PGASInterface::sumToAllImpl().
Referenced by lama::PGASCommunicator::sum().
float lama::PGASInterface::sumToAll | ( | const float | val | ) | const [virtual, inherited] |
References lama::PGASInterface::sumToAllImpl().
int lama::PGASInterface::sumToAll | ( | const int | val | ) | const [virtual, inherited] |
References lama::PGASInterface::sumToAllImpl().
size_t lama::PGASInterface::sumToAll | ( | const size_t | val | ) | const [virtual, inherited] |
References lama::PGASInterface::sumToAllImpl().
void lama::PGASInterface::swap | ( | void * | val, |
const size_t | n, | ||
const PartitionId | partner | ||
) | const [virtual, inherited] |
Reimplemented in lama::PGASCheckInterface.
References lama::PGASInterface::allocate(), lama::PGASInterface::free(), lama::PGASInterface::getPreferredCommunicationKind(), lama::PGASget, lama::PGASInterface::put(), and lama::PGASInterface::syncronizeAll().
Referenced by lama::PGASCommunicator::swapImpl().
void lama::GPIInterface::syncronizeAll | ( | ) | const [virtual] |
Implements lama::PGASInterface.
References getRank(), and mBarrierNum.
Referenced by ~GPIInterface().
void lama::GPIInterface::writeAt | ( | std::ostream & | stream | ) | const [virtual] |
Writes some Information about this to the passed stream.
If a deriving class does not overrides writeAt, typeid(this).name() is written to stream.
[out] | stream | the stream to write to. |
Implements lama::PGASInterface.
long lama::GPIInterface::mAllocated [static, private] |
Referenced by allocate(), free(), get(), and put().
Referenced by allocate(), free(), get(), GPIInterface(), isPinned(), put(), and ~GPIInterface().
long lama::GPIInterface::mBarrierNum [static, private] |
Referenced by syncronizeAll().
Referenced by getRank(), and GPIInterface().
Referenced by getSize(), and GPIInterface().
long* lama::GPIInterface::pSync [private] |
void* lama::GPIInterface::pWork [private] |