33 #ifndef CUBOID_OUTPUT_HDF5_STREAM_H
34 #define CUBOID_OUTPUT_HDF5_STREAM_H
37 #include <cuda_runtime.h>
THDF5_File & file
HDF5 file handle.
hid_t group
Handle to a HDF5 dataset.
size_t startingPossitionInBuffer
Having a single buffer for all cuboids, where this one starts.
The header file of the class saving RealMatrix data into the output HDF5 file.
Output stream for quantities sampled by a cuboid corner sensor mask.
const TReduceOperator reduceOp
Reduce operator.
const std::string TMatrixName
Datatype for matrix names.
virtual hid_t CreateCuboidDataset(const size_t cuboidIdx)
Create a new dataset for a given cuboid specified by index (order).
const TRealMatrix & sourceMatrix
Source matrix to be sampled.
virtual void PostProcess()
Apply post-processing on the buffer and flush it to the file.
virtual void FlushRaw()
Flush data to disk (from raw streams only).
std::vector< TCuboidInfo > cuboidsInfo
vector keeping handles and positions of all cuboids
virtual void Create()
Create a HDF5 stream and allocate data for it.
TReduceOperator
How to aggregate data.
cudaEvent_t eventSamplingFinished
Has the sampling finished?
Abstract base class for output data streams (sampled data).
virtual void Checkpoint()
Checkpoint the stream and close.
size_t sampledTimeStep
Timestep to store (N/A for aggregated).
The class for real matrices.
This structure information about one cuboid. Namely, its HDF5_ID, starting position in a lineup buffe...
const TIndexMatrix & sensorMask
Sensor mask to sample data.
The class for 64b unsigned integers (indices). It is used for sensor_mask_index or sensor_corners_mas...
virtual void Sample()
Sample data into buffer, apply reduce or copy to the CPU side.
virtual void Close()
Close stream (apply post-processing if necessary, flush data and close).
virtual void Reopen()
Reopen the output stream after restart and reload data.
virtual void FlushBufferToFile()
Flush the buffer to the file.
TCuboidOutputHDF5Stream(THDF5_File &file, TMatrixName &groupName, const TRealMatrix &sourceMatrix, const TIndexMatrix &sensorMask, const TReduceOperator reduceOp)
Constructor.
hid_t cuboidIdx
Idx of the dataset storing the given cuboid.
Class wrapping the HDF5 routines.
virtual ~TCuboidOutputHDF5Stream()
Destructor.