|
PaCO++
0.05
|
#include <CommMatrix.h>
Public Member Functions | |
| void | add (unsigned sid, unsigned rid, long val) |
| CommMatrix (unsigned ssz=1, unsigned rsz=1) | |
| CommMatrix (CommMatrix *cm) | |
| void | dump () const |
| long | get (unsigned sid, unsigned rid) const |
| unsigned | getReceiverSize () const |
| unsigned | getSenderSize () const |
| void | set (unsigned sid, unsigned rid, long val) |
| void | sub (unsigned sid, unsigned rid, long val) |
| ~CommMatrix () | |
Private Member Functions | |
| long * | _get_mat () const |
Private Attributes | |
| long * | _mat |
| unsigned | _rsz |
| unsigned | _ssz |
Definition at line 6 of file CommMatrix.h.
| CommMatrix::CommMatrix | ( | unsigned | ssz = 1, |
| unsigned | rsz = 1 |
||
| ) |
| CommMatrix::CommMatrix | ( | CommMatrix * | cm | ) |
Definition at line 16 of file CommMatrix.cc.
References _get_mat(), _mat, _rsz, _ssz, getReceiverSize(), and getSenderSize().
{
_ssz=cm->getSenderSize();
_rsz=cm->getReceiverSize();
_mat=new long[_ssz*_rsz];
std::cerr<<"[new/copy] Alloc"<<(void*)_mat<<std::endl;
long* omat= cm->_get_mat();
memcpy(_mat, omat, sizeof(long)*_ssz*_rsz);
std::cerr<<"[new/copy] CommMatrix -- ssz: "<<_ssz<<" rsz:"<<_rsz<<std::endl;
}

| long* CommMatrix::_get_mat | ( | ) | const [inline, private] |
Definition at line 29 of file CommMatrix.h.
References _mat.
Referenced by CommMatrix().
{ return _mat; }
| void CommMatrix::add | ( | unsigned | sid, |
| unsigned | rid, | ||
| long | val | ||
| ) | [inline] |
| void CommMatrix::dump | ( | ) | const |
Definition at line 43 of file CommMatrix.cc.
Referenced by Controlled::readFromFile().
| long CommMatrix::get | ( | unsigned | sid, |
| unsigned | rid | ||
| ) | const [inline] |
Definition at line 22 of file CommMatrix.h.
Referenced by Controlled::computePiecesToSend(), and Controlled::getClientData().
| unsigned CommMatrix::getReceiverSize | ( | ) | const [inline] |
Definition at line 19 of file CommMatrix.h.
References _rsz.
Referenced by CommMatrix(), and Controlled::computePiecesToSend().
{ return _rsz; }
| unsigned CommMatrix::getSenderSize | ( | ) | const [inline] |
Definition at line 18 of file CommMatrix.h.
References _ssz.
Referenced by CommMatrix(), Controlled::computePiecesToSend(), and Controlled::getClientData().
{ return _ssz; }
| void CommMatrix::set | ( | unsigned | sid, |
| unsigned | rid, | ||
| long | val | ||
| ) | [inline] |
Definition at line 21 of file CommMatrix.h.
Referenced by Controlled::readFromFile().
| void CommMatrix::sub | ( | unsigned | sid, |
| unsigned | rid, | ||
| long | val | ||
| ) | [inline] |
Definition at line 24 of file CommMatrix.h.
Referenced by Controlled::getClientData().
long* CommMatrix::_mat [private] |
Definition at line 10 of file CommMatrix.h.
Referenced by _get_mat(), add(), CommMatrix(), get(), set(), sub(), and ~CommMatrix().
unsigned CommMatrix::_rsz [private] |
Definition at line 9 of file CommMatrix.h.
Referenced by add(), CommMatrix(), dump(), get(), getReceiverSize(), set(), and sub().
unsigned CommMatrix::_ssz [private] |
Definition at line 8 of file CommMatrix.h.
Referenced by CommMatrix(), dump(), and getSenderSize().