phdmesh::CommBuffer Class Reference

List of all members.

Detailed Description

Definition at line 82 of file ParallelComm.hpp.

Public Member Functions

template<typename T>
void pack (const T &value)
template<typename T>
void pack (const T *value, size_t number)
template<typename T>
void unpack (T &value)
template<typename T>
void unpack (T *value, size_t number)
template<typename T>
void peek (T &value)
template<typename T>
void peek (T *value, size_t number)
template<typename T>
void skip (size_t number)
void reset ()
size_t capacity () const
size_t size () const
ptrdiff_t remaining () const
void * buffer () const

Friends

class CommAll
class CommGather
class CommBroadcast


Member Function Documentation

template<typename T>
void phdmesh::CommBuffer::pack ( const T &  value  )  [inline]

Pack a value to be sent: buf.pack<type>( value )

Definition at line 346 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::pack ( const T *  value,
size_t  number 
) [inline]

Pack an array of values to be sent: buf.pack<type>( ptr , num )

Definition at line 364 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::unpack ( T &  value  )  [inline]

Unpack a received value: buf.unpack<type>( value )

Definition at line 391 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::unpack ( T *  value,
size_t  number 
) [inline]

Unpack an array of received values: buf.unpack<type>( ptr , num )

Definition at line 403 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::peek ( T &  value  )  [inline]

Peek at a received value (don't advance buffer): buf.peek<type>(value)

Definition at line 415 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::peek ( T *  value,
size_t  number 
) [inline]

Peek at an array of received values: buf.peek<type>( ptr , num )

Definition at line 426 of file ParallelComm.hpp.

template<typename T>
void phdmesh::CommBuffer::skip ( size_t  number  )  [inline]

Skip buffer ahead by a number of values.

Definition at line 382 of file ParallelComm.hpp.

void phdmesh::CommBuffer::reset (  )  [inline]

Reset the buffer to the beginning so that size() == 0

Definition at line 436 of file ParallelComm.hpp.

size_t phdmesh::CommBuffer::capacity (  )  const [inline]

Size, in bytes, of the buffer. If the buffer is not yet allocated this is zero.

Definition at line 440 of file ParallelComm.hpp.

size_t phdmesh::CommBuffer::size (  )  const [inline]

Size, in bytes, of the buffer that has been processed. If the buffer is not yet allocated then this is the number of bytes that has been attempted to pack.

Definition at line 444 of file ParallelComm.hpp.

ptrdiff_t phdmesh::CommBuffer::remaining (  )  const [inline]

Size, in bytes, of the buffer remaining to be processed. Equal to 'capacity() - size()'. A negative result indicates either the buffer is not allocated or an overflow has occured. An overflow will have thrown an exception.

Definition at line 448 of file ParallelComm.hpp.

void * phdmesh::CommBuffer::buffer (  )  const [inline]

Pointer to base of buffer.

Definition at line 452 of file ParallelComm.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Jul 13 09:22:43 2010 for phdMesh by  doxygen 1.4.7