Class for message queue element. More...
#include <paraCommCPP11.h>
Public Member Functions | |
MessageQueueElement () | |
default constructor of MessageQueueElement More... | |
MessageQueueElement (int inSource, int inCount, int inDataTypeId, int inTag, void *inData) | |
constructor of MessageQueueElement More... | |
~MessageQueueElement () | |
destructor of MessageQueueElement More... | |
int | getSource () |
getter of source rank More... | |
int | getCount () |
getter of the number of the data type elements More... | |
int | getDataTypeId () |
getter of the data type id More... | |
int | getTag () |
getter of the message tag More... | |
void * | getData () |
getter of data More... | |
MessageQueueElement * | getNext () |
getter of the pointer to the next MessageQueueElement More... | |
void | link (MessageQueueElement *nextElement) |
link to the next MessageQueueElement More... | |
MessageQueueElement () | |
default constructor of MessageQueueElement More... | |
MessageQueueElement (int inSource, int inCount, int inDataTypeId, int inTag, void *inData) | |
constructor of MessageQueueElement More... | |
~MessageQueueElement () | |
destructor of MessageQueueElement More... | |
int | getSource () |
getter of source rank More... | |
int | getCount () |
getter of the number of the data type elements More... | |
int | getDataTypeId () |
getter of the data type id More... | |
int | getTag () |
getter of the message tag More... | |
void * | getData () |
getter of data More... | |
MessageQueueElement * | getNext () |
getter of the pointer to the next MessageQueueElement More... | |
void | link (MessageQueueElement *nextElement) |
link to the next MessageQueueElement More... | |
Private Attributes | |
int | source |
source thread rank of this message More... | |
int | count |
number of the data type elements More... | |
int | dataTypeId |
data type id More... | |
int | tag |
tag of the message, -1 : in case of broadcast message More... | |
void * | data |
data of the message More... | |
MessageQueueElement * | next |
point to next message queue element More... | |
Class for message queue element.
NOTE : For basic data types, this is copy of sender side memory. When the memory is copied at receive function, the memory have to be freed. For user defined data type, this is the receiver side memory, because it is better to allocate memory in the sender side for mutex locking. Sender side functions have to allocate memory. In this case, memory do not have to be freed. The memory is for receiver side.
Definition at line 122 of file paraCommCPP11.h.
default constructor of MessageQueueElement
Definition at line 137 of file paraCommCPP11.h.
MessageQueueElement | ( | int | inSource, |
int | inCount, | ||
int | inDataTypeId, | ||
int | inTag, | ||
void * | inData | ||
) |
constructor of MessageQueueElement
inSource | source thread rank of this message |
inCount | number of the data type elements |
inDataTypeId | data type id |
inTag | tag of the message, -1 : in case of broadcast message |
inData | data of the message |
Definition at line 151 of file paraCommCPP11.h.
~MessageQueueElement | ( | ) |
destructor of MessageQueueElement
Definition at line 164 of file paraCommCPP11.h.
default constructor of MessageQueueElement
Definition at line 130 of file paraCommPth.h.
MessageQueueElement | ( | int | inSource, |
int | inCount, | ||
int | inDataTypeId, | ||
int | inTag, | ||
void * | inData | ||
) |
constructor of MessageQueueElement
inSource | source thread rank of this message |
inCount | number of the data type elements |
inDataTypeId | data type id |
inTag | tag of the message, -1 : in case of broadcast message |
inData | data of the message |
Definition at line 138 of file paraCommPth.h.
~MessageQueueElement | ( | ) |
destructor of MessageQueueElement
Definition at line 151 of file paraCommPth.h.
int getCount | ( | ) |
getter of the number of the data type elements
Definition at line 183 of file paraCommCPP11.h.
References MessageQueueElement::count.
Referenced by ParaCommCPP11::freeStandardTypes(), and ParaCommPth::freeStandardTypes().
int getCount | ( | ) |
getter of the number of the data type elements
Definition at line 170 of file paraCommPth.h.
References MessageQueueElement::count.
void * getData | ( | ) |
getter of data
Definition at line 213 of file paraCommCPP11.h.
References MessageQueueElement::data.
Referenced by ParaCommCPP11::freeStandardTypes(), ParaCommPth::freeStandardTypes(), ParaCommCPP11::receive(), ParaCommPth::receive(), ParaCommCPP11::uTypeReceive(), ParaCommPth::uTypeReceive(), ParaCommCPP11::~ParaCommCPP11(), ParaCommPth::~ParaCommPth(), and ScipParaCommTh::~ScipParaCommTh().
void * getData | ( | ) |
getter of data
Definition at line 200 of file paraCommPth.h.
References MessageQueueElement::data.
int getDataTypeId | ( | ) |
getter of the data type id
Definition at line 193 of file paraCommCPP11.h.
References MessageQueueElement::dataTypeId.
Referenced by MessageQueueTableElement::extarctElement(), ParaCommCPP11::freeStandardTypes(), ParaCommPth::freeStandardTypes(), MessageQueueTableElement::waitMessage(), ParaCommCPP11::~ParaCommCPP11(), ParaCommPth::~ParaCommPth(), and ScipParaCommTh::~ScipParaCommTh().
int getDataTypeId | ( | ) |
getter of the data type id
Definition at line 180 of file paraCommPth.h.
References MessageQueueElement::dataTypeId.
MessageQueueElement * getNext | ( | ) |
getter of the pointer to the next MessageQueueElement
Definition at line 223 of file paraCommCPP11.h.
References MessageQueueElement::next.
Referenced by MessageQueueTableElement::checkElement(), MessageQueueTableElement::checkElementWithTag(), MessageQueueTableElement::extarctElement(), MessageQueueTableElement::waitMessage(), and MessageQueueTableElement::~MessageQueueTableElement().
MessageQueueElement * getNext | ( | ) |
getter of the pointer to the next MessageQueueElement
Definition at line 210 of file paraCommPth.h.
References MessageQueueElement::next.
int getSource | ( | ) |
getter of source rank
Definition at line 173 of file paraCommCPP11.h.
References MessageQueueElement::source.
Referenced by MessageQueueTableElement::extarctElement(), ParaCommCPP11::iProbe(), ParaCommPth::iProbe(), ParaCommCPP11::probe(), ParaCommPth::probe(), and MessageQueueTableElement::waitMessage().
int getSource | ( | ) |
getter of source rank
Definition at line 160 of file paraCommPth.h.
References MessageQueueElement::source.
int getTag | ( | ) |
getter of the message tag
Definition at line 203 of file paraCommCPP11.h.
References MessageQueueElement::tag.
Referenced by MessageQueueTableElement::extarctElement(), ParaCommCPP11::iProbe(), ParaCommPth::iProbe(), ParaCommCPP11::probe(), ParaCommPth::probe(), and MessageQueueTableElement::waitMessage().
int getTag | ( | ) |
getter of the message tag
Definition at line 190 of file paraCommPth.h.
References MessageQueueElement::tag.
void link | ( | MessageQueueElement * | nextElement | ) |
link to the next MessageQueueElement
nextElement | pointer to MessageQueueElement |
Definition at line 232 of file paraCommCPP11.h.
References MessageQueueElement::next.
Referenced by MessageQueueTableElement::enqueue(), and MessageQueueTableElement::extarctElement().
void link | ( | MessageQueueElement * | nextElement | ) |
link to the next MessageQueueElement
nextElement | pointer to MessageQueueElement |
Definition at line 219 of file paraCommPth.h.
References MessageQueueElement::next.
|
private |
number of the data type elements
number of elements of the data type
Definition at line 126 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getCount().
|
private |
data of the message
NOTE : For basic data types, this is copy of sender side memory. When the memory is copied at receive function, the memory have to be freed. For user defined data type, this is the receiver side memory, because it is better to allocate memory in the sender side for mutex locking. Sender side functions have to allocate memory. In this case, memory do not hvae to freed. The memory is for receiver side.
Definition at line 129 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getData().
|
private |
data type id
Definition at line 127 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getDataTypeId().
|
private |
point to next message queue element
Definition at line 130 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getNext(), and MessageQueueElement::link().
|
private |
source thread rank of this message
Definition at line 125 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getSource().
|
private |
tag of the message, -1 : in case of broadcast message
-1 : in case of broadcast message
Definition at line 128 of file paraCommCPP11.h.
Referenced by MessageQueueElement::getTag().