IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBTK::FixedSizedStream Class Reference

Class FixedSizedStream provides a fixed-size message buffer used by various communication routines. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/FixedSizedStream.h>

Inheritance diagram for IBTK::FixedSizedStream:
Inheritance graph
[legend]

Public Member Functions

 FixedSizedStream (int bytes)
 
 FixedSizedStream (const void *buffer, int bytes)
 
 ~FixedSizedStream ()=default
 
void * getBufferStart ()
 
const void * getBufferStart () const
 
int getCurrentSize () const
 
int getCurrentIndex () const
 
void setCurrentIndex (int index)
 
void resetIndex ()
 
Boolean Stream Primitives

Pack and unpack booleans into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const bool &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (bool &data) override
 
void pack (const bool *data, int n=1) override
 
void unpack (bool *data, int n=1) override
 
Character Stream Primitives

Pack and unpack chars into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const char &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (char &data) override
 
void pack (const char *data, int n=1) override
 
void unpack (char *data, int n=1) override
 
Double Complex Stream Primitives

Pack and unpack double complex into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const dcomplex &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (dcomplex &data) override
 
void pack (const dcomplex *data, int n=1) override
 
void unpack (dcomplex *data, int n=1) override
 
Double Stream Primitives

Pack and unpack doubles into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const double &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (double &data) override
 
void pack (const double *data, int n=1) override
 
void unpack (double *data, int n=1) override
 
Float Stream Primitives

Pack and unpack floats into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const float &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (float &data) override
 
void pack (const float *data, int n=1) override
 
void unpack (float *data, int n=1) override
 

Integer Stream Primitives

Pack and unpack integers into and out of the message stream.

SAMRAI::tbox::AbstractStreamoperator<< (const int &data) override
 
SAMRAI::tbox::AbstractStreamoperator>> (int &data) override
 
void pack (const int *data, int n=1) override
 
void unpack (int *data, int n=1) override
 

Additional Inherited Members

- Static Public Member Functions inherited from SAMRAI::tbox::AbstractStream
static int sizeofBool (const int n=1)
 
static int sizeofChar (const int n=1)
 
static int sizeofDoubleComplex (const int n=1)
 
static int sizeofDouble (const int n=1)
 
static int sizeofFloat (const int n=1)
 
static int sizeofInt (const int n=1)
 

Detailed Description

Class FixedSizedStream provides a fixed-size message buffer used by various communication routines.

This class implements the SAMRAI::tbox::AbstractStream interface. Class FixedSizedStream can packs and unpacks message streams via straight-forward byte copying.

Warning
This class stores and communicates values in the native binary machine format. Consequently, this implementation is not suitable for heterogeneous networks, which require a machine-independent storage format such as XDR.

Constructor & Destructor Documentation

◆ FixedSizedStream() [1/2]

IBTK::FixedSizedStream::FixedSizedStream ( int  bytes)

Create a message stream of the specified size in bytes.

◆ FixedSizedStream() [2/2]

IBTK::FixedSizedStream::FixedSizedStream ( const void *  buffer,
int  bytes 
)

Create a message stream with the specified buffer.

◆ ~FixedSizedStream()

IBTK::FixedSizedStream::~FixedSizedStream ( )
default

Destructor for a message stream.

Member Function Documentation

◆ getBufferStart() [1/2]

void * IBTK::FixedSizedStream::getBufferStart ( )
inline

Return a pointer to the start of the message buffer.

◆ getBufferStart() [2/2]

const void * IBTK::FixedSizedStream::getBufferStart ( ) const
inline

Return a const pointer to the start of the message buffer.

◆ getCurrentIndex()

int IBTK::FixedSizedStream::getCurrentIndex ( ) const
inline

Return the current index into the buffer.

◆ getCurrentSize()

int IBTK::FixedSizedStream::getCurrentSize ( ) const
inline

Return the current size of the buffer in bytes.

◆ operator<<() [1/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const bool &  data)
inlineoverridevirtual

Pack a single bool into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator<<() [2/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const char &  data)
inlineoverridevirtual

Pack a single char into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator<<() [3/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const dcomplex data)
inlineoverridevirtual

Pack a single double complex into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator<<() [4/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const double &  data)
inlineoverridevirtual

Pack a single double into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator<<() [5/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const float &  data)
inlineoverridevirtual

Pack a single float into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator<<() [6/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator<< ( const int &  data)
inlineoverridevirtual

Pack a single integer into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [1/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( bool &  data)
inlineoverridevirtual

Remove a single bool from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [2/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( char &  data)
inlineoverridevirtual

Remove a single char from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [3/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( dcomplex data)
inlineoverridevirtual

Remove a single double complex from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [4/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( double &  data)
inlineoverridevirtual

Remove a single double from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [5/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( float &  data)
inlineoverridevirtual

Remove a single float from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ operator>>() [6/6]

SAMRAI::tbox::AbstractStream & IBTK::FixedSizedStream::operator>> ( int &  data)
inlineoverridevirtual

Remove a single integer from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [1/6]

void IBTK::FixedSizedStream::pack ( const bool *  data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of bools into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [2/6]

void IBTK::FixedSizedStream::pack ( const char *  data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of chars into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [3/6]

void IBTK::FixedSizedStream::pack ( const dcomplex data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of double complex into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [4/6]

void IBTK::FixedSizedStream::pack ( const double *  data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of doubles into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [5/6]

void IBTK::FixedSizedStream::pack ( const float *  data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of floats into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ pack() [6/6]

void IBTK::FixedSizedStream::pack ( const int *  data,
int  n = 1 
)
inlineoverridevirtual

Pack an array of integers into the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ resetIndex()

void IBTK::FixedSizedStream::resetIndex ( )
inline

Reset the index to the beginning of the buffer. This is the same as setting the buffer index to zero via setCurrentIndex().

◆ setCurrentIndex()

void IBTK::FixedSizedStream::setCurrentIndex ( int  index)
inline

Set the current index into the buffer. Further packing/unpacking will begin at this new location.

◆ unpack() [1/6]

void IBTK::FixedSizedStream::unpack ( bool *  data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of bools from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ unpack() [2/6]

void IBTK::FixedSizedStream::unpack ( char *  data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of chars from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ unpack() [3/6]

void IBTK::FixedSizedStream::unpack ( dcomplex data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of double complex from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ unpack() [4/6]

void IBTK::FixedSizedStream::unpack ( double *  data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of doubles from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ unpack() [5/6]

void IBTK::FixedSizedStream::unpack ( float *  data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of floats from the message stream.

Implements SAMRAI::tbox::AbstractStream.

◆ unpack() [6/6]

void IBTK::FixedSizedStream::unpack ( int *  data,
int  n = 1 
)
inlineoverridevirtual

Remove an array of integers from the message stream.

Implements SAMRAI::tbox::AbstractStream.


The documentation for this class was generated from the following files: