From d01ba96eb4ae147159f15d5f3cdb076fc60483e4 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Mon, 29 May 2023 22:45:41 +0800 Subject: feat(exp): Add expt_0529 Signed-off-by: KunoiSayami --- read_helper.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'read_helper.h') diff --git a/read_helper.h b/read_helper.h index eb7d2e3..2e87b0b 100644 --- a/read_helper.h +++ b/read_helper.h @@ -5,8 +5,9 @@ #include #include #include + #ifndef P_ERR -#if !(defined(NDEBUG) || defined(READ_NO_OUTPUT)) +#ifdef PRINT_READ_PROCESS #define P_ERR(...) fprintf(stderr, __VA_ARGS__) #else #define P_ERR(...) @@ -20,6 +21,16 @@ class ReadHelper { key_type max_value = std::numeric_limits::min(), min_value = std::numeric_limits::max(); + inline void store_into_vector(key_type value) { + if (max_value < value) { + max_value = value; + } + if (min_value > value) { + min_value = value; + } + population_vector.push_back(value); + } + char const *filename; static constexpr size_t REVERSED_BLOCK = 256; @@ -35,16 +46,6 @@ public: key_type minValue() const { return min_value; } std::vector population_vector; - inline void store_into_vector(key_type value) { - if (max_value < value) { - max_value = value; - } - if (min_value > value) { - min_value = value; - } - population_vector.push_back(value); - } - void finish_read() { this->population_vector.push_back(this->max_value); this->population_vector.push_back(this->min_value); -- cgit v1.3.1