#include <idxl.h>
Public Types | |
enum | op_t { send_t = 17, recv_t, sum_t } |
Public Member Functions | |
IDXL_Comm (int tag, int context) | |
void | reset (int tag, int context) |
~IDXL_Comm () | |
void | send (const IDXL_Side *idx, const IDXL_Layout *dtype, const void *src) |
void | recv (const IDXL_Side *idx, const IDXL_Layout *dtype, void *dest) |
void | sum (const IDXL_Side *idx, const IDXL_Layout *dtype, void *srcdest) |
void | post (void) |
void | wait (void) |
bool | isPosted (void) |
Return true if we've sent off our messages. | |
bool | isComplete (void) |
Private Attributes | |
CkVec< sto_t > | sto |
Stuff to send/receive. | |
CkVec< msg_t * > | msg |
Message buffers for each processor. | |
int | nMsgs |
CkVec< MPI_Request > | msgReq |
List of outgoing MPI requests (needs to be a separate array for MPI) Length is always nMsgs. | |
CkVec< MPI_Status > | msgSts |
int | tag |
MPI_Comm | comm |
bool | isPost |
bool | isDone |
Data Structures | |
class | msg_t |
This class represents an MPI send or receive operation. More... | |
class | sto_t |
This class represents one communication operation: a send/sum or send/recv. More... |
It is the representation for an unfinished communication operation. This object's life cycle is: -constructor -repeated add/recv/sum calls -single send call -repeated recv/sum calls -recv(msg) until isDone returns true
Definition at line 37 of file idxl.h.
enum IDXL_Comm::op_t |
Definition at line 199 of file idxl.C.
References isDone, isPost, msgReq, msgSts, nMsgs, CkVec< T >::resize(), sto, and tag.
Referenced by IDXL_Chunk::addComm(), and IDXL_Comm().
void IDXL_Comm::send | ( | const IDXL_Side * | idx, | |
const IDXL_Layout * | dtype, | |||
const void * | src | |||
) |
void IDXL_Comm::recv | ( | const IDXL_Side * | idx, | |
const IDXL_Layout * | dtype, | |||
void * | dest | |||
) |
void IDXL_Comm::sum | ( | const IDXL_Side * | idx, | |
const IDXL_Layout * | dtype, | |||
void * | srcdest | |||
) |
void IDXL_Comm::post | ( | void | ) |
Definition at line 236 of file idxl.C.
References IDXL_Comm::msg_t::allocate(), IDXL_Layout::compressedBytes(), dtype, IDXL_Comm::msg_t::getBuf(), IDXL_List::getDest(), IDXL_Side::getLocalList(), IDXL_List::getVec(), idx, isPost, PUP::l, len, IDXL_Comm::msg_t::ll, PUP::m, MPI_Irecv, MPI_Isend, msg, msgReq, nMsgs, op, recv_t, PUP::s, send_t, IDXL_List::size(), IDXL_Side::size(), IDXL_Comm::msg_t::sto, sto, sum_t, and tag.
Referenced by wait().
void IDXL_Comm::wait | ( | void | ) |
Definition at line 278 of file idxl.C.
References IDXL_Comm::sto_t::data, IDXL_Comm::sto_t::dtype, IDXL_Comm::msg_t::getBuf(), IDXL_Side::getLocalList(), IDXL_List::getVec(), IDXL_Comm::sto_t::idx, isDone, isPosted(), PUP::l, IDXL_Comm::msg_t::ll, PUP::m, MPI_Waitall, msg, msgReq, msgSts, nMsgs, IDXL_Comm::sto_t::op, post(), recv_t, CkVec< T >::resize(), PUP::s, IDXL_Layout::scatter(), IDXL_Layout::scatteradd(), send_t, IDXL_List::size(), IDXL_Comm::msg_t::sto, and sum_t.
Referenced by IDXL_Chunk::waitComm().
bool IDXL_Comm::isPosted | ( | void | ) | [inline] |
bool IDXL_Comm::isComplete | ( | void | ) | [inline] |
Definition at line 104 of file idxl.h.
References isDone.
Referenced by IDXL_Chunk::addComm(), and IDXL_Chunk::pup().
CkVec<sto_t> IDXL_Comm::sto [private] |
CkVec<msg_t *> IDXL_Comm::msg [private] |
Message buffers for each processor.
Only the first nMsgs elements are used this time, but the remaining elements stay allocated (lazy deallocation). This avoids slow memory allocation at runtime.
Definition at line 73 of file idxl.h.
Referenced by post(), wait(), and ~IDXL_Comm().
int IDXL_Comm::nMsgs [private] |
CkVec<MPI_Request> IDXL_Comm::msgReq [private] |
CkVec<MPI_Status> IDXL_Comm::msgSts [private] |
int IDXL_Comm::tag [private] |
MPI_Comm IDXL_Comm::comm [private] |
bool IDXL_Comm::isPost [private] |
bool IDXL_Comm::isDone [private] |