65 sensorMask(sensorMask),
68 eventSamplingFinished()
193 OutputStreamsCUDAKernels::SampleIndex<NONE>
207 OutputStreamsCUDAKernels::SampleIndex<RMS>
218 OutputStreamsCUDAKernels::SampleIndex<MAX>
228 OutputStreamsCUDAKernels::SampleIndex<MIN>
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 size_t * GetDeviceData()
Get raw GPU data out of the class (for direct GPU kernel access).
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.
const TReduceOperator reduceOp
Reduce operator.
virtual void Reopen()
Reopen the output stream after restart and reload data.
virtual void Sample()
Sample data into buffer, apply reduction or copy to the CPU side.
The header file containing the parameters of the simulation.
The header file of cuda kernels used for data sampling (output streams).
static const size_t CHUNK_SIZE_4MB
chunk size of 4MB in number of float elements
const std::string TMatrixName
Datatype for matrix names.
#define checkCudaErrors(val)
Macro checking cuda errors and printing the file name and line. Inspired by CUDA common checking rout...
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.
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.
TIndexOutputHDF5Stream(THDF5_File &file, TMatrixName &datasetName, const TRealMatrix &sourceMatrix, const TIndexMatrix &sensorMask, const TReduceOperator reduceOp)
Constructor.
virtual void Checkpoint()
Checkpoint the stream.
virtual void FlushBufferToFile()
Flush the buffer to the file.
The header file containing a class responsible for printing out info and error messages (stdout...
Class storing all parameters of the simulation.
hid_t GetRootGroup() const
Get handle to the root group.
TReduceOperator
How to aggregate data.
float * deviceBuffer
Temporary buffer on the GPU side - only for aggregated quantities.
store actual data (time series)
cudaEvent_t eventSamplingFinished
Has the sampling finished?
Abstract base class for output data streams (sampled data).
virtual void Close()
Close stream (apply post-processing if necessary, flush data and close).
virtual void FreeMemory()
A generic function to free memory - not used in the base class.
virtual size_t GetElementCount() const
Get total element count of the matrix.
hid_t dataset
Handle to a HDF5 dataset.
The class for real matrices.
float * hostBuffer
Temporary buffer for store on the GPU side.
virtual void CopyDataToDevice()
Copy data hostBuffer-> deviceBuffer.
The class for 64b unsigned integers (indices). It is used for sensor_mask_index or sensor_corners_mas...
The header file of the class saving data based on the index senor mask into the output HDF5 file...
virtual void FlushRaw()
Flush data to disk (from raw streams only).
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.
size_t sampledTimeStep
Time step to store (N/A for aggregated)
void ReadCompleteDataset(const hid_t parentGroup, TMatrixName &datasetName, const TDimensionSizes &dimensionSizes, float *data)
Read data from the dataset under a specified group, float dataset.
size_t Get_nt() const
Get Nt value.
virtual void PostProcess()
Apply post-processing on the buffer and flush it to the file.
void CloseDataset(const hid_t dataset)
Close the HDF5 dataset.
virtual ~TIndexOutputHDF5Stream()
Destructor.
Class wrapping the HDF5 routines.
virtual void Create()
Create a HDF5 stream and allocate data for it.
const TIndexMatrix & sensorMask
Sensor mask to sample data.
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.