diff options
Diffstat (limited to 'include/util')
| -rw-r--r-- | include/util/bf_config.h | 4 | ||||
| -rw-r--r-- | include/util/types.h | 24 |
2 files changed, 15 insertions, 13 deletions
diff --git a/include/util/bf_config.h b/include/util/bf_config.h index 836e452..7d823a7 100644 --- a/include/util/bf_config.h +++ b/include/util/bf_config.h @@ -35,6 +35,8 @@ static size_t BF_HASH_FUNCS = 7; * Adjust the value of BF_HASH_FUNCS. The argument must be on the interval * (0, INT64_MAX], or the behavior of bloom filters is undefined. */ -[[maybe_unused]] static void BF_SET_HASHFUNC(size_t func_cnt) { BF_HASH_FUNCS = func_cnt; } +[[maybe_unused]] static void BF_SET_HASHFUNC(size_t func_cnt) { + BF_HASH_FUNCS = func_cnt; +} } // namespace de diff --git a/include/util/types.h b/include/util/types.h index 64dc773..be04d05 100644 --- a/include/util/types.h +++ b/include/util/types.h @@ -20,8 +20,8 @@ #include <cassert> #include <cstdint> #include <cstdlib> -#include <vector> #include <memory> +#include <vector> namespace de { @@ -76,21 +76,18 @@ constexpr ShardID buffer_shid = {buffer_level_idx, all_shards_idx}; enum class ReconstructionType { Invalid, /* placeholder type */ - Flush, /* a flush of the buffer into L0 */ - Merge, /* the merging of shards in two seperate levels */ - Append, /* adding a shard directly to a level */ - Compact /* the merging of shards on one level */ + Flush, /* a flush of the buffer into L0 */ + Merge, /* the merging of shards in two seperate levels */ + Append, /* adding a shard directly to a level */ + Compact /* the merging of shards on one level */ }; - -template <typename ShardType> -struct reconstruction_results { +template <typename ShardType> struct reconstruction_results { std::shared_ptr<ShardType> new_shard; std::vector<std::pair<level_index, const ShardType *>> source_shards; size_t target_level; size_t reccnt; long runtime; - }; typedef struct ReconstructionTask { @@ -121,11 +118,14 @@ public: total_reccnt += reccnt; } - void add_reconstruction(level_index source, level_index target, - size_t reccnt, ReconstructionType type) { + void add_reconstruction(level_index source, level_index target, size_t reccnt, + ReconstructionType type) { if (type == ReconstructionType::Merge) { - m_tasks.push_back({{{source, all_shards_idx}, {target, all_shards_idx}}, target, reccnt, type}); + m_tasks.push_back({{{source, all_shards_idx}, {target, all_shards_idx}}, + target, + reccnt, + type}); } else { m_tasks.push_back({{{source, all_shards_idx}}, target, reccnt, type}); } |