Skip to content

Commit

Permalink
hll: move constexpr from .h to .cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
zzjjzzgggg committed Mar 19, 2020
1 parent a71eb9e commit dcf3074
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 5 additions & 0 deletions adv/hll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#include "hll.h"

namespace hll {
constexpr uint8_t CLZ_TABLE_4BIT[16] = {4, 3, 2, 2, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0};
constexpr uint64_t L8 = 0x0101010101010101;
constexpr uint64_t H8 = 0x8080808080808080;
constexpr uint64_t A1 = 0xffffffffffffffff;

double alpha(const int m) {
switch (m) {
Expand Down
7 changes: 0 additions & 7 deletions adv/hll.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@

namespace hll {

constexpr uint8_t CLZ_TABLE_4BIT[16] = {4, 3, 2, 2, 1, 1, 1, 1,
0, 0, 0, 0, 0, 0, 0, 0};
constexpr uint64_t L8 = 0x0101010101010101;
constexpr uint64_t H8 = 0x8080808080808080;
constexpr uint64_t A1 = 0xffffffffffffffff;

double alpha(const int m);

double beta(const double ez);
Expand All @@ -43,7 +37,6 @@ bool isGreaterEqual(const uint64_t& x, const uint64_t& y);
*/
double count(const uint8_t* reg, const int m);


} /* namespace hll */

#endif /* __HYPER_LOGLOG_COUNTING_H__ */
2 changes: 0 additions & 2 deletions graph/hyperanf.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class HyperANF {
/**
* Merge HLL counter at pos_j to HLL counter at pos_i.
* B(C_i) := max(B(C_i), B(C_j))
* Return true if value in pos_i is changed.
*/
inline void mergeCounter(const int pos_i, const int pos_j) {
for (int k = 0; k < units_per_counter_; k++) {
Expand All @@ -46,7 +45,6 @@ class HyperANF {

/**
* Merge counter at pos to given target.
* Return true if value in pos_i is changed.
*/
inline void mergeCounter(uint64_t* target, const int pos) const {
for (int k = 0; k < units_per_counter_; k++) {
Expand Down

0 comments on commit dcf3074

Please sign in to comment.