Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
633983d4
Commit
633983d4
authored
Mar 10, 2018
by
Otmar Ertl
Browse files
improved definition of HLL_Q
parent
1e9a7748
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
633983d4
...
@@ -192,11 +192,11 @@ struct hllhdr {
...
@@ -192,11 +192,11 @@ struct hllhdr {
#define HLL_VALID_CACHE(hdr) (((hdr)->card[7] & (1<<7)) == 0)
#define HLL_VALID_CACHE(hdr) (((hdr)->card[7] & (1<<7)) == 0)
#define HLL_P 14
/* The greater is P, the smaller the error. */
#define HLL_P 14
/* The greater is P, the smaller the error. */
#define HLL_Q (63-HLL_P)
#define HLL_REGISTERS (1<<HLL_P)
/* With P=14, 16384 registers. */
#define HLL_REGISTERS (1<<HLL_P)
/* With P=14, 16384 registers. */
#define HLL_P_MASK (HLL_REGISTERS-1)
/* Mask to index register. */
#define HLL_P_MASK (HLL_REGISTERS-1)
/* Mask to index register. */
#define HLL_BITS 6
/* Enough to count up to 63 leading zeroes. */
#define HLL_BITS 6
/* Enough to count up to 63 leading zeroes. */
#define HLL_REGISTER_MAX ((1<<HLL_BITS)-1)
#define HLL_REGISTER_MAX ((1<<HLL_BITS)-1)
#define HLL_Q (HLL_REGISTER_MAX-HLL_P)
#define HLL_HDR_SIZE sizeof(struct hllhdr)
#define HLL_HDR_SIZE sizeof(struct hllhdr)
#define HLL_DENSE_SIZE (HLL_HDR_SIZE+((HLL_REGISTERS*HLL_BITS+7)/8))
#define HLL_DENSE_SIZE (HLL_HDR_SIZE+((HLL_REGISTERS*HLL_BITS+7)/8))
#define HLL_DENSE 0
/* Dense encoding. */
#define HLL_DENSE 0
/* Dense encoding. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment