| kspaceFirstOrder3D-CUDA 1.1 The CUDA/C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TOutputStreamContainer Class Reference

A container for output streams. More...

`#include <OutputStreamContainer.h>`

Collaboration diagram for TOutputStreamContainer:
[legend]

## 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.

## Detailed Description

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.

## Constructor & Destructor Documentation

TOutputStreamContainer::~TOutputStreamContainer | ( |  | ) |

Destructor.

Definition at line 53 of file OutputStreamContainer.cpp.

## Member Function Documentation

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.

Parameters

  [in] | matrixContainer | - Matrix container to link the steams with sampled matrices and sensor masks

Definition at line 66 of file OutputStreamContainer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TOutputStreamContainer::CheckpointStreams | ( |  | ) |

Checkpoint streams without post-processing (flush to the file).

Definition at line 309 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::CloseStreams | ( |  | ) |

Close all streams (apply post-processing if necessary, flush data and close).

Definition at line 340 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

TBaseOutputHDF5Stream * TOutputStreamContainer::CreateNewOutputStream | ( | TMatrixContainer & | matrixContainer,
|  | const TMatrixIdx | sampledMatrixIdx,
|  | const TMatrixName & | fileDatasetName,
|  | const TBaseOutputHDF5Stream::TReduceOperator | reduceOp
| ) |  |
| private

Create a new output stream.

Parameters

  [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

Returns
  New output stream with defined links

Definition at line 385 of file OutputStreamContainer.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TOutputStreamContainer::CreateStreams | ( |  | ) |

Create all streams.

Definition at line 245 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::FlushRawStreams | ( |  | ) |

Flush stream data to disk.

Warning
  In GPU implementation, data from raw streams is flushed here. Aggregated streams are ignored.

Definition at line 294 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::FreeStreams | ( |  | ) |

Free all streams - destroy them.

Definition at line 355 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

bool TOutputStreamContainer::IsEmpty | ( |  | ) | const
| inline

Is the container empty?

Returns
  true if the container is empty

Definition at line 100 of file OutputStreamContainer.h.

TBaseOutputHDF5Stream& TOutputStreamContainer::operator[] | ( | const TOutputStreamIdx | outputStreamIdx | ) |
| inline

Operator []

Parameters

  [in] | outputStreamIdx | - id of the output stream

Returns
  an element of the container

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.

Here is the caller graph for this function:

void TOutputStreamContainer::ReopenStreams | ( |  | ) |

Reopen all streams after restarting from checkpoint.

Definition at line 260 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

void TOutputStreamContainer::SampleStreams | ( |  | ) |

Sample all streams.

Warning
  In the GPU implementation, no data is flushed on disk (just data is sampled)

Definition at line 277 of file OutputStreamContainer.cpp.

Here is the caller graph for this function:

size_t TOutputStreamContainer::Size | ( |  | ) | const
| inline

Get size of the container.

Returns
  the size of the container

Definition at line 90 of file OutputStreamContainer.h.

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

- Containers/OutputStreamContainer.h
- Containers/OutputStreamContainer.cpp