kspaceFirstOrder3D-OMP
1.1
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
A container for output streams. More...
#include <MatrixContainer.h>
Public Member Functions | |
TOutputStreamContainer () | |
Constructor. | |
virtual | ~TOutputStreamContainer () |
Destructor. More... | |
size_t | size () const |
Get size of the container. More... | |
bool | empty () const |
Is the container empty? More... | |
TBaseOutputHDF5Stream & | operator[] (const TMatrixID MatrixID) |
Operator []. More... | |
void | AddStreamsIntoContainer (TMatrixContainer &MatrixContainer) |
Create all streams in container (no file manipulation). More... | |
void | CreateStreams () |
Create all streams - opens the datasets. More... | |
void | ReopenStreams () |
Reopen streams after checkpoint file (datasets). More... | |
void | SampleStreams () |
Sample all streams. More... | |
void | PostProcessStreams () |
Post-process all streams and flush them to the file. More... | |
void | CheckpointStreams () |
Checkpoint streams. More... | |
void | CloseStreams () |
Close all streams. More... | |
void | FreeAllStreams () |
Free all streams - destroy them. More... | |
Protected Member Functions | |
TBaseOutputHDF5Stream * | CreateNewOutputStream (TMatrixContainer &MatrixContainer, const TMatrixID SampledMatrixID, const char *HDF5_DatasetName, const TBaseOutputHDF5Stream::TReductionOperator ReductionOp, float *BufferToReuse=NULL) |
TOutputStreamContainer (const TOutputStreamContainer &) | |
Copy constructor not allowed for public. | |
TOutputStreamContainer & | operator= (TOutputStreamContainer &) |
Operator = not allowed for public. | |
Private Types | |
typedef map< TMatrixID, TBaseOutputHDF5Stream * > | TOutputStreamMap |
Output stream map. | |
Private Attributes | |
TOutputStreamMap | OutputStreamContainer |
Map with output streams. | |
The output stream container maintains matrices used for sampling data. These may or may not require some scratch place or reuse temp matrices.
Definition at line 278 of file MatrixContainer.h.
|
virtual |
Destructor
Definition at line 609 of file MatrixContainer.cpp.
void TOutputStreamContainer::AddStreamsIntoContainer | ( | TMatrixContainer & | MatrixContainer | ) |
Add all streams in simulation in the container, set all streams records here! Please note, the Matrixcontainer has to be populated before calling this routine.
[in] | MatrixContainer | - matrix container to link the steams with sampled matrices and sensor masks |
Definition at line 622 of file MatrixContainer.cpp.
void TOutputStreamContainer::CheckpointStreams | ( | ) |
Checkpoint streams without post-processing (flush to the file).
Definition at line 860 of file MatrixContainer.cpp.
void TOutputStreamContainer::CloseStreams | ( | ) |
Close all streams (apply post-processing if necessary, flush data and close).
Definition at line 891 of file MatrixContainer.cpp.
|
protected |
Create a new output stream.
[in] | MatrixContainer | - name of the HDF5 dataset or group |
[in] | SampledMatrixID | - code id of the matrix |
[in] | HDF5_DatasetName | - name of the HDF5 dataset or group |
[in] | ReductionOp | - reduction operator |
[in] | BufferToReuse | - buffer to reuse |
Definition at line 934 of file MatrixContainer.cpp.
void TOutputStreamContainer::CreateStreams | ( | ) |
Create all streams.
Definition at line 813 of file MatrixContainer.cpp.
|
inline |
Is the container empty?
Definition at line 299 of file MatrixContainer.h.
void TOutputStreamContainer::FreeAllStreams | ( | ) |
Free all streams- destroy them.
Definition at line 906 of file MatrixContainer.cpp.
|
inline |
Operator [].
[in] | MatrixID |
Definition at line 310 of file MatrixContainer.h.
void TOutputStreamContainer::PostProcessStreams | ( | ) |
/// Post-process all streams and flush them to the file.
Definition at line 875 of file MatrixContainer.cpp.
void TOutputStreamContainer::ReopenStreams | ( | ) |
Reopen all streams after restarting form checkpoint.
Definition at line 828 of file MatrixContainer.cpp.
void TOutputStreamContainer::SampleStreams | ( | ) |
Sample all streams.
Definition at line 844 of file MatrixContainer.cpp.
|
inline |
Get size of the container.
Definition at line 290 of file MatrixContainer.h.