File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,10 @@ class Hdf5Recorder : public Recorder {
132132 hdf5Datatype_ = PredType::NATIVE_INT;
133133 } else if (dataType_ == typeid (int ).name ()) {
134134 hdf5Datatype_ = PredType::NATIVE_INT;
135- } else if (dataType_ == typeid (BGFLOAT ).name ()) {
135+ } else if (dataType_ == typeid (float ).name ()) {
136136 hdf5Datatype_ = PredType::NATIVE_FLOAT;
137+ } else if (dataType_ == typeid (double ).name ()) {
138+ hdf5Datatype_ = PredType::NATIVE_DOUBLE;
137139 } else {
138140 throw runtime_error (" Unsupported data type" );
139141 }
@@ -146,9 +148,9 @@ class Hdf5Recorder : public Recorder {
146148 if (variableLocation_.getNumElements () > 0 ) {
147149 // Prepare the data buffer based on the HDF5 data type
148150 if (hdf5Datatype_ == PredType::NATIVE_FLOAT) {
149- vector<BGFLOAT > dataBuffer (variableLocation_.getNumElements ());
151+ vector<float > dataBuffer (variableLocation_.getNumElements ());
150152 for (int i = 0 ; i < variableLocation_.getNumElements (); ++i) {
151- dataBuffer[i] = get<BGFLOAT >(variableLocation_.getElement (i));
153+ dataBuffer[i] = get<float >(variableLocation_.getElement (i));
152154 }
153155 // Write the data to the dataset
154156 hdf5DataSet_.write (dataBuffer.data (), hdf5Datatype_);
You can’t perform that action at this time.
0 commit comments