20 #ifndef CPC_COMMON_HPP_
21 #define CPC_COMMON_HPP_
25 #include "MurmurHash3.h"
30 namespace cpc_constants {
40 template<
typename A>
class u32_table;
43 struct compressed_state {
44 using vector_u32 = std::vector<uint32_t, typename std::allocator_traits<A>::template rebind_alloc<uint32_t>>;
46 explicit compressed_state(
const A& allocator): table_data(allocator), table_data_words(0), table_num_entries(0),
47 window_data(allocator), window_data_words(0) {}
48 vector_u32 table_data;
49 uint32_t table_data_words;
50 uint32_t table_num_entries;
51 vector_u32 window_data;
52 uint32_t window_data_words;
56 struct uncompressed_state {
57 using vector_bytes = std::vector<uint8_t, typename std::allocator_traits<A>::template rebind_alloc<uint8_t>>;
59 explicit uncompressed_state(
const A& allocator): table(allocator), window(allocator) {}
const uint8_t DEFAULT_LG_K
default log2 of K
Definition: cpc_common.hpp:36
const uint8_t MIN_LG_K
min log2 of K
Definition: cpc_common.hpp:32
const uint8_t MAX_LG_K
max log2 of K
Definition: cpc_common.hpp:34
DataSketches namespace.
Definition: binomial_bounds.hpp:38