diff --git a/H5ChunkedWriter.cpp b/H5ChunkedWriter.cpp index e466627..94cfa8c 100644 --- a/H5ChunkedWriter.cpp +++ b/H5ChunkedWriter.cpp @@ -212,7 +212,7 @@ hsize_t HDF5ChunkedWriter::prepare_storage_for_frame(size_t frame_index, size_t* // Expand the dataset if needed. if (relative_frame_index > current_dataset_size) { - current_dataset_size = expand_dataset(dataset, relative_frame_index, dataset_increase_step); + current_dataset_size = expand_dataset(dataset, relative_frame_index, config::dataset_increase_step); } // Keep track of the max index in this file - needed for shrinking the dataset at the end. diff --git a/H5ChunkedWriter.hpp b/H5ChunkedWriter.hpp index ecbf260..efc851f 100644 --- a/H5ChunkedWriter.hpp +++ b/H5ChunkedWriter.hpp @@ -5,14 +5,7 @@ #include #include #include - -namespace config -{ - auto dataset_type = H5::PredType::NATIVE_UINT8; - auto dataset_byte_order = H5T_ORDER_LE; - hsize_t dataset_increase_step = 1000; - hsize_t initial_dataset_size = 1000; -} +#include "config.hpp" hsize_t expand_dataset(const H5::DataSet& dataset, hsize_t frame_index, hsize_t dataset_increase_step); diff --git a/config.cpp b/config.cpp new file mode 100644 index 0000000..4352183 --- /dev/null +++ b/config.cpp @@ -0,0 +1,8 @@ +#include "config.hpp" + +namespace config { + H5::PredType dataset_type = H5::PredType::NATIVE_UINT8; + H5T_order_t dataset_byte_order = H5T_ORDER_LE; + hsize_t dataset_increase_step = 1000; + hsize_t initial_dataset_size = 1000; +} diff --git a/config.hpp b/config.hpp new file mode 100644 index 0000000..b44743b --- /dev/null +++ b/config.hpp @@ -0,0 +1,14 @@ +#include + +#ifndef CONFIG +#define CONFIG + +namespace config +{ + extern H5::PredType dataset_type; + extern H5T_order_t dataset_byte_order; + extern hsize_t dataset_increase_step; + extern hsize_t initial_dataset_size; +} + +#endif \ No newline at end of file