![]() |
kspaceFirstOrder3D-CUDA
1.1
The CUDA/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 <OutputStreamContainer.h>

Public Member Functions | |
| TOutputStreamContainer () | |
| Constructor. | |
| ~TOutputStreamContainer () | |
| Destructor. More... | |
| size_t | Size () const |
| Get size of the container. More... | |
| bool | IsEmpty () const |
| Is the container empty? More... | |
| TBaseOutputHDF5Stream & | operator[] (const TOutputStreamIdx outputStreamIdx) |
| Operator []. More... | |
| void | AddStreams (TMatrixContainer &matrixContainer) |
| Add all streams into the container. More... | |
| void | CreateStreams () |
| Create all streams - opens the datasets. More... | |
| void | ReopenStreams () |
| Reopen streams after checkpoint file (datasets). More... | |
| void | SampleStreams () |
| Sample all streams (only sample, no disk operations). More... | |
| void | FlushRawStreams () |
| Flush streams to disk - only raw 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 | FreeStreams () |
| Free all streams - destroy them. More... | |
Private Types | |
|
typedef std::map < TOutputStreamIdx, TBaseOutputHDF5Stream * > | TOutputStreamMap |
| Output stream map. | |
Private Member Functions | |
| TBaseOutputHDF5Stream * | CreateNewOutputStream (TMatrixContainer &matrixContainer, const TMatrixIdx sampledMatrixIdx, const TMatrixName &fileDatasetName, const TBaseOutputHDF5Stream::TReduceOperator reduceOp) |
| Create a new output stream. More... | |
| TOutputStreamContainer (const TOutputStreamContainer &) | |
| Copy constructor not allowed for public. | |
| TOutputStreamContainer & | operator= (TOutputStreamContainer &) |
| Operator = not allowed for public. | |
Private Attributes | |
| TOutputStreamMap | outputStreamContainer |
| Map with output streams. | |
The output stream container maintains matrices used to sample data. These may or may not require some scratch place or reuse temp matrices.
Definition at line 77 of file OutputStreamContainer.h.
| TOutputStreamContainer::~TOutputStreamContainer | ( | ) |
Destructor.
Definition at line 53 of file OutputStreamContainer.cpp.
| void TOutputStreamContainer::AddStreams | ( | TMatrixContainer & | matrixContainer | ) |
Add all streams in the simulation to the container, set all streams records here!
Please note, the Matrix container 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 66 of file OutputStreamContainer.cpp.


| void TOutputStreamContainer::CheckpointStreams | ( | ) |
Checkpoint streams without post-processing (flush to the file).
Definition at line 309 of file OutputStreamContainer.cpp.

| void TOutputStreamContainer::CloseStreams | ( | ) |
Close all streams (apply post-processing if necessary, flush data and close).
Definition at line 340 of file OutputStreamContainer.cpp.

|
private |
Create a new output stream.
| [in] | matrixContainer | - Name of the HDF5 dataset or group |
| [in] | sampledMatrixIdx | - Code id of the matrix |
| [in] | fileDatasetName | - Name of the HDF5 dataset or group |
| [in] | reduceOp | - Reduce operator |
Definition at line 385 of file OutputStreamContainer.cpp.


| void TOutputStreamContainer::CreateStreams | ( | ) |
Create all streams.
Definition at line 245 of file OutputStreamContainer.cpp.

| void TOutputStreamContainer::FlushRawStreams | ( | ) |
Flush stream data to disk.
Definition at line 294 of file OutputStreamContainer.cpp.

| void TOutputStreamContainer::FreeStreams | ( | ) |
Free all streams - destroy them.
Definition at line 355 of file OutputStreamContainer.cpp.

|
inline |
Is the container empty?
Definition at line 100 of file OutputStreamContainer.h.
|
inline |
Operator []
| [in] | outputStreamIdx | - id of the output stream |
Definition at line 111 of file OutputStreamContainer.h.
| void TOutputStreamContainer::PostProcessStreams | ( | ) |
Post-process all streams and flush them to the file.
Definition at line 324 of file OutputStreamContainer.cpp.

| void TOutputStreamContainer::ReopenStreams | ( | ) |
Reopen all streams after restarting from checkpoint.
Definition at line 260 of file OutputStreamContainer.cpp.

| void TOutputStreamContainer::SampleStreams | ( | ) |
Sample all streams.
Definition at line 277 of file OutputStreamContainer.cpp.

|
inline |
Get size of the container.
Definition at line 90 of file OutputStreamContainer.h.