LAMA
|
#include <PGASInterface.hpp>
Public Member Functions | |
virtual void * | allocate (size_t size) const =0 |
virtual void | free (void *ptr, const size_t size) const =0 |
virtual void | syncronizeAll () const =0 |
virtual bool | isPinned (const void *const ptr) const =0 |
virtual PGASSyncToken * | getSyncToken (int arg1) const =0 |
virtual PGASCommunicationKind | getPreferredCommunicationKind () const =0 |
virtual void | get (void *dst, const void *src, size_t length, int srcpe) const =0 |
virtual void | put (void *dst, const void *src, size_t length, int srcpe) const =0 |
virtual PartitionId | getRank () const =0 |
virtual PartitionId | getSize () const =0 |
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 |
PGASInterface () | |
virtual | ~PGASInterface () |
Static Public Member Functions | |
static const PGASInterface * | getInstance () |
Protected Member Functions | |
virtual void | writeAt (std::ostream &stream) const =0 |
Writes some Information about this to the passed stream. | |
Private Member Functions | |
template<typename T > | |
T | maxToAllImpl (const T val) const |
template<typename T > | |
T | minToAllImpl (const T val) const |
template<typename T > | |
T | sumToAllImpl (const T val) const |
LAMA_LOG_DECL_STATIC_LOGGER (logger) | |
Static Private Member Functions | |
static PGASInterface * | init () |
Static Private Attributes | |
static std::auto_ptr < PGASInterface > | sInstance |
lama::PGASInterface::~PGASInterface | ( | ) | [virtual] |
std::auto_ptr< SyncToken > lama::PGASInterface::all2all | ( | void * | dst, |
const void * | src, | ||
size_t | elemSize | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References getAsync(), getRank(), and getSize().
Referenced by lama::PGASCommunicator::all2all().
virtual void* lama::PGASInterface::allocate | ( | size_t | size | ) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
Referenced by lama::PGASContext::allocate(), lama::PGASCommunicator::exchangeByPlanAsyncImpl(), lama::PGASCommunicator::gather(), maxToAllImpl(), minToAllImpl(), lama::PGASMaxFunctor< T >::PGASMaxFunctor(), lama::PGASMaxLocFunctor< T >::PGASMaxLocFunctor(), lama::PGASMinFunctor< T >::PGASMinFunctor(), lama::PGASSumFunctor< T >::PGASSumFunctor(), sumToAllImpl(), and swap().
std::auto_ptr< SyncToken > lama::PGASInterface::broadcast | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References getPreferredCommunicationKind(), getRank(), getSize(), lama::PGASget, and put().
Referenced by lama::PGASCommunicator::bcast(), lama::PGASCommunicator::gather(), maxToAllImpl(), minToAllImpl(), and sumToAllImpl().
virtual void lama::PGASInterface::free | ( | void * | ptr, |
const size_t | size | ||
) | const [pure virtual] |
void lama::PGASInterface::gather | ( | void * | allvals, |
const size_t | partSize, | ||
const PartitionId | root, | ||
const void * | myvals | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References getPreferredCommunicationKind(), getRank(), getSize(), lama::PGASput, and 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] |
Reimplemented in lama::PGASCheckInterface.
References getPreferredCommunicationKind(), getRank(), getSize(), lama::PGASput, and put().
virtual void lama::PGASInterface::get | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcpe | ||
) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
std::auto_ptr< SyncToken > lama::PGASInterface::getAsync | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
Referenced by all2all(), lama::PGASCommunicator::exchangeByPlanAsyncImpl(), and shift().
const PGASInterface * lama::PGASInterface::getInstance | ( | ) | [static] |
References init(), and sInstance.
Referenced by lama::PGASContext::allocate(), lama::PGASContext::free(), lama::PGASCommunicatorManager::init(), and lama::PGASSyncToken::wait().
virtual PGASCommunicationKind lama::PGASInterface::getPreferredCommunicationKind | ( | ) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
Referenced by broadcast(), gather(), scatter(), shift(), and swap().
virtual PartitionId lama::PGASInterface::getRank | ( | ) | const [pure virtual] |
Implemented in lama::PGASCheckInterface, lama::GPIInterface, lama::OpenShMemInterface, and lama::PGASNoInterface.
Referenced by all2all(), broadcast(), gather(), lama::PGASCommunicator::getRank(), maxloc(), parallelReduction(), lama::PGASMaxLocFunctor< T >::PGASMaxLocFunctor(), scatter(), shift(), lama::PGASCommunicator::swapImpl(), and lama::PGASCommunicator::writeAt().
virtual PartitionId lama::PGASInterface::getSize | ( | ) | const [pure virtual] |
Implemented in lama::PGASCheckInterface, lama::GPIInterface, lama::OpenShMemInterface, and lama::PGASNoInterface.
Referenced by all2all(), broadcast(), gather(), lama::PGASCommunicator::gather(), lama::PGASCommunicator::getSize(), parallelReduction(), scatter(), and lama::PGASCommunicator::writeAt().
virtual PGASSyncToken* lama::PGASInterface::getSyncToken | ( | int | arg1 | ) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
Referenced by lama::PGASCommunicator::exchangeByPlanAsyncImpl().
PGASInterface * lama::PGASInterface::init | ( | ) | [static, private] |
Referenced by getInstance().
virtual bool lama::PGASInterface::isPinned | ( | const void *const | ptr | ) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
lama::PGASInterface::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
Reimplemented in lama::OpenShMemInterface, and lama::GPIInterface.
double lama::PGASInterface::max | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMaxFunctor< T >::getResult(), and parallelReduction().
Referenced by maxToAllImpl().
float lama::PGASInterface::max | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMaxFunctor< T >::getResult(), and parallelReduction().
int lama::PGASInterface::max | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMaxFunctor< T >::getResult(), and parallelReduction().
size_t lama::PGASInterface::max | ( | const size_t | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMaxFunctor< T >::getResult(), and parallelReduction().
void lama::PGASInterface::maxloc | ( | double & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual] |
References lama::PGASMaxLocFunctor< T >::getLoc(), getRank(), lama::PGASMaxLocFunctor< T >::getResult(), and parallelReduction().
Referenced by lama::PGASCommunicator::maxlocImpl().
void lama::PGASInterface::maxloc | ( | float & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual] |
void lama::PGASInterface::maxloc | ( | int & | d, |
int & | loc, | ||
PartitionId | root | ||
) | const [virtual] |
double lama::PGASInterface::maxToAll | ( | const double | val | ) | const [virtual] |
References maxToAllImpl().
Referenced by lama::PGASCommunicator::max().
float lama::PGASInterface::maxToAll | ( | const float | val | ) | const [virtual] |
References maxToAllImpl().
int lama::PGASInterface::maxToAll | ( | const int | val | ) | const [virtual] |
References maxToAllImpl().
size_t lama::PGASInterface::maxToAll | ( | const size_t | val | ) | const [virtual] |
References maxToAllImpl().
T lama::PGASInterface::maxToAllImpl | ( | const T | val | ) | const [private] |
References allocate(), broadcast(), free(), max(), and syncronizeAll().
Referenced by maxToAll().
double lama::PGASInterface::min | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMinFunctor< T >::getResult(), and parallelReduction().
Referenced by minToAllImpl().
float lama::PGASInterface::min | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMinFunctor< T >::getResult(), and parallelReduction().
int lama::PGASInterface::min | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASMinFunctor< T >::getResult(), and parallelReduction().
double lama::PGASInterface::minToAll | ( | const double | val | ) | const [virtual] |
References minToAllImpl().
Referenced by lama::PGASCommunicator::min().
float lama::PGASInterface::minToAll | ( | const float | val | ) | const [virtual] |
References minToAllImpl().
int lama::PGASInterface::minToAll | ( | const int | val | ) | const [virtual] |
References minToAllImpl().
T lama::PGASInterface::minToAllImpl | ( | const T | val | ) | const [private] |
References allocate(), broadcast(), free(), min(), and syncronizeAll().
Referenced by minToAll().
void lama::PGASInterface::parallelReduction | ( | PGASFunctor & | reduction, |
PartitionId | root | ||
) | const [virtual] |
References getRank(), getSize(), lama::PGASFunctor::iteration(), and syncronizeAll().
virtual void lama::PGASInterface::put | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcpe | ||
) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
Referenced by broadcast(), gather(), putAsync(), scatter(), and swap().
std::auto_ptr< SyncToken > lama::PGASInterface::putAsync | ( | void * | dst, |
const void * | src, | ||
size_t | length, | ||
int | srcPE | ||
) | const [virtual] |
void lama::PGASInterface::scatter | ( | void * | myvals, |
const size_t | partSize, | ||
const PartitionId | root, | ||
const void * | allvals | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References getPreferredCommunicationKind(), getRank(), getSize(), lama::PGASget, and 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] |
Reimplemented in lama::PGASCheckInterface.
References getPreferredCommunicationKind(), getRank(), getSize(), lama::PGASget, and put().
std::auto_ptr< SyncToken > lama::PGASInterface::shift | ( | void * | dst, |
const void * | src, | ||
size_t | size, | ||
PartitionId | destRank, | ||
PartitionId | srcRank | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References getAsync(), getPreferredCommunicationKind(), getRank(), LAMA_ASSERT_ERROR, lama::PGASget, and putAsync().
Referenced by lama::PGASCommunicator::shiftAsyncImpl().
double lama::PGASInterface::sum | ( | const double | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASSumFunctor< T >::getResult(), and parallelReduction().
Referenced by sumToAllImpl().
float lama::PGASInterface::sum | ( | const float | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASSumFunctor< T >::getResult(), and parallelReduction().
int lama::PGASInterface::sum | ( | const int | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASSumFunctor< T >::getResult(), and parallelReduction().
size_t lama::PGASInterface::sum | ( | const size_t | val, |
const PartitionId | root | ||
) | const [virtual] |
References lama::PGASSumFunctor< T >::getResult(), and parallelReduction().
double lama::PGASInterface::sumToAll | ( | const double | val | ) | const [virtual] |
References sumToAllImpl().
Referenced by lama::PGASCommunicator::sum().
float lama::PGASInterface::sumToAll | ( | const float | val | ) | const [virtual] |
References sumToAllImpl().
int lama::PGASInterface::sumToAll | ( | const int | val | ) | const [virtual] |
References sumToAllImpl().
size_t lama::PGASInterface::sumToAll | ( | const size_t | val | ) | const [virtual] |
References sumToAllImpl().
T lama::PGASInterface::sumToAllImpl | ( | const T | val | ) | const [private] |
References allocate(), broadcast(), free(), sum(), and syncronizeAll().
Referenced by sumToAll().
void lama::PGASInterface::swap | ( | void * | val, |
const size_t | n, | ||
const PartitionId | partner | ||
) | const [virtual] |
Reimplemented in lama::PGASCheckInterface.
References allocate(), free(), getPreferredCommunicationKind(), lama::PGASget, put(), and syncronizeAll().
Referenced by lama::PGASCommunicator::swapImpl().
virtual void lama::PGASInterface::syncronizeAll | ( | ) | const [pure virtual] |
Implemented in lama::GPIInterface, lama::OpenShMemInterface, lama::PGASNoInterface, and lama::PGASCheckInterface.
Referenced by lama::PGASContext::allocate(), maxToAllImpl(), minToAllImpl(), parallelReduction(), sumToAllImpl(), swap(), lama::PGASCommunicator::synchronize(), and lama::PGASSyncToken::wait().
virtual void lama::PGASInterface::writeAt | ( | std::ostream & | stream | ) | const [protected, pure 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. |
Reimplemented from Printable.
Implemented in lama::PGASCheckInterface, lama::GPIInterface, lama::OpenShMemInterface, and lama::PGASNoInterface.
std::auto_ptr< PGASInterface > lama::PGASInterface::sInstance [static, private] |
Referenced by getInstance().