PrepackedBuffer Class Reference
#include <PrepackedBuffer.h>
List of all members.
Detailed Description
this class is used to take data that has already been converted into a buffer by one or more Conv<> operations, and send it between nodes. Useful when one doesn't know the data type being transferred.
Constructor & Destructor Documentation
PrepackedBuffer::PrepackedBuffer |
( |
const char * |
data, |
|
|
unsigned int |
dataSize, |
|
|
unsigned int |
numEntries = 0 | |
|
) |
| | |
Constructor. Here data is a pointer to the entire data block. dataSize is the size of the entire data block to be transferred, dataSize = individualDataSize * numEntries. numEntries is the # of array entries. For non-arrays it defaults to 0.
PrepackedBuffer::PrepackedBuffer |
( |
const char * |
buf |
) |
|
Constructor Here the char buffer is a serialized version of the Prepacked buffer
PrepackedBuffer::PrepackedBuffer |
( |
|
) |
|
PrepackedBuffer::~PrepackedBuffer |
( |
|
) |
|
Member Function Documentation
unsigned int PrepackedBuffer::conv2buf |
( |
char * |
buf |
) |
const |
Converts to a buffer. Buf must be preallocated.
References size().
const char* PrepackedBuffer::data |
( |
|
) |
const [inline] |
unsigned int PrepackedBuffer::dataSize |
( |
|
) |
const [inline] |
Returns the size of the data contents.
bool PrepackedBuffer::isVector |
( |
|
) |
const [inline] |
Flag: is the data type a single value or a vector?
unsigned int PrepackedBuffer::numEntries |
( |
|
) |
const [inline] |
Returns number of data entries: size of transferred array.
const char * PrepackedBuffer::operator[] |
( |
unsigned int |
index |
) |
const |
looks up entry. If index exceeds numEntries_, then goes back to beginning. Lets us tile the target with repeating sequences. Most commonly just repeat one entry.
unsigned int PrepackedBuffer::size |
( |
|
) |
const [inline] |
The documentation for this class was generated from the following files: