18 unsigned int msgIndex )
19 :
Msg(
ObjId( managerId_, (msgIndex != 0) ? msgIndex: msg_.size() ),
20 e1.element(), e2.element() ),
24 if ( msgIndex == 0 ) {
25 msg_.push_back(
this );
27 if (
msg_.size() <= msgIndex )
28 msg_.resize( msgIndex + 1 );
29 msg_[ msgIndex ] =
this;
71 for (
unsigned int i = 0; i < n; ++i ) {
72 v[i].resize( 1,
Eref(
e1_, i ) );
79 for (
unsigned int i = 0; i < n; ++i ) {
80 v[i].resize( 1,
Eref(
e1_, i ) );
95 for (
unsigned int i = 0; i < n; ++i )
100 for (
unsigned int i = start; i < end; ++i ) {
107 for (
unsigned int i = 0; i < n; ++i ) {
108 v[i].resize( 1,
Eref(
e2_, i ) );
129 FuncId fid,
unsigned int b,
unsigned int n )
const
134 if ( orig ==
e1() ) {
137 }
else if ( orig ==
e2() ) {
155 assert( index <
msg_.size() );
156 return reinterpret_cast< char*
>(
msg_[index] );
Element * element() const
Synonym for Id::operator()()
Msg * copy(Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const
void sources(vector< vector< Eref > > &v) const
unsigned int dataIndex() const
void addMsgAndFunc(ObjId mid, FuncId fid, BindIndex bindIndex)
ObjId findOtherEnd(ObjId end) const
static const Cinfo * initCinfo()
Setup function for Element-style access to Msg fields.
Element * element() const
static const Cinfo * oneToOneMsgCinfo
static vector< OneToOneMsg * > msg_
static unsigned int numMsg()
Msg lookup functions.
static char * lookupMsg(unsigned int index)
Static function for Msg access.
virtual unsigned int numField(unsigned int rawIndex) const =0
Returns number of field entries for specified data.
static const Cinfo * msgCinfo
virtual bool hasFields() const =0
OneToOneMsg(const Eref &e1, const Eref &e2, unsigned int msgIndex)
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.
Element * e1_
Index of this Msg on the msg_ vector.
virtual unsigned int numLocalData() const =0
Returns number of local data entries on this node.
Element * element() const
vector< vector< T > > resize(vector< vector< T > >table, unsigned int n, T init)
Element * e2_
Element 1 attached to Msg.
Eref firstTgt(const Eref &src) const
void targets(vector< vector< Eref > > &v) const
const unsigned int BADINDEX
Used by ObjId and Eref.
static const Cinfo * initCinfo()