185 OutputStreamsCUDAKernels::SampleAll<RMS>
194 OutputStreamsCUDAKernels::SampleAll<MAX>
203 OutputStreamsCUDAKernels::SampleAll<MIN>
size_t nx
number of elements in the x direction
virtual void FlushBufferToFile()
Flush the buffer to the file.
THDF5_File & file
HDF5 file handle.
hid_t CreateFloatDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, const TDimensionSizes &chunkSizes, const size_t compressionLevel)
Create a float HDF5 dataset at a specified place in the file tree (3D/4D).
size_t GetStartTimeIndex() const
Get start time index for sensor recording.
void WriteMatrixDomainType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDomainType &matrixDomainType)
Write matrix domain type into the dataset under the root group.
virtual void Reopen()
Reopen the output stream after restart and reload data.
size_t nt
Number of time steps (for time series datasets).
virtual void CopyDataFromDevice()
Copy data deviceBuffer -> hostBuffer.
calculate root mean square
std::string rootObjectName
Dataset name.
static TParameters & GetInstance()
Get instance of the singleton class.
virtual void Close()
Close stream (apply post-processing if necessary, flush data and close).
virtual size_t GetElementCount() const
Get element count of the matrix.
const TReduceOperator reduceOp
Reduce operator.
void WriteCuboidToHyperSlab(const hid_t dataset, const TDimensionSizes &hyperslabPosition, const TDimensionSizes &cuboidPosition, const TDimensionSizes &cuboidSize, const TDimensionSizes &matrixDimensions, const float *mMatrixData)
Write a cuboid selected within the matrixData into a hyperslab.
virtual void Sample()
Sample data (copy from GPU memory and then flush - no overlapping implemented!)
The header file containing the parameters of the simulation.
virtual float * GetHostData()
Get raw CPU data out of the class (for direct CPU kernel access).
The header file of cuda kernels used for data sampling (output streams).
const std::string TMatrixName
Datatype for matrix names.
virtual void PostProcess()
Apply post-processing on the buffer and flush it to the file.
virtual void AllocateMemory()
A generic function to allocate memory - not used in the base class.
virtual TDimensionSizes GetDimensionSizes() const
Get dimension sizes of the matrix.
void WriteMatrixDataType(const hid_t parentGroup, TMatrixName &datasetName, const TMatrixDataType &matrixDataType)
Write matrix data type into the dataset under a specified group.
const TRealMatrix & sourceMatrix
Source matrix to be sampled.
size_t Get_t_index() const
Get simulation time step.
virtual ~TWholeDomainOutputHDF5Stream()
Destructor.
Class storing all parameters of the simulation.
TWholeDomainOutputHDF5Stream(THDF5_File &file, TMatrixName &datasetName, TRealMatrix &sourceMatrix, const TReduceOperator reduceOp)
Constructor.
size_t sampledTimeStep
Time step to store (N/A for aggregated).
hid_t GetRootGroup() const
Get handle to the root group.
The header file of the class saving whole RealMatrix into the output HDF5 file, e.g. p_max_all.
TReduceOperator
How to aggregate data.
float * deviceBuffer
Temporary buffer on the GPU side - only for aggregated quantities.
store actual data (time series)
size_t ny
number of elements in the y direction
Abstract base class for output data streams (sampled data).
virtual void FreeMemory()
A generic function to free memory - not used in the base class.
The class for real matrices.
float * hostBuffer
Temporary buffer for store on the GPU side.
virtual void CopyDataToDevice()
Copy data hostBuffer-> deviceBuffer.
virtual void Checkpoint()
virtual void PostProcess()
Apply post-processing on the buffer and flush it to the file.
TDimensionSizes position
Position in the dataset.
hid_t dataset
Handle to a HDF5 dataset.
size_t GetCompressionLevel() const
Get compression level.
void WriteHyperSlab(const hid_t dataset, const TDimensionSizes &position, const TDimensionSizes &size, const float *data)
Write a hyper-slab into the dataset - float dataset.
virtual float * GetDeviceData()
Get raw GPU data out of the class (for direct GPU kernel access).
size_t bufferSize
Buffer size.
virtual void Create()
Create a HDF5 stream and allocate data for it.
void ReadCompleteDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, float *data)
Read data from the dataset under a specified group, float dataset.
void CloseDataset(const hid_t dataset)
Close the HDF5 dataset.
Class wrapping the HDF5 routines.
Structure with 4D dimension sizes (3 in space and 1 in time).
hid_t OpenDataset(const hid_t parentGroup, TMatrixName &datasetName)
Open the HDF5 dataset at a specified place in the file tree.