mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 03:31:21 +00:00
HyperLogLog: make API use the P prefix in honor of Philippe Flajolet.
This commit is contained in:
@ -435,8 +435,8 @@ uint64_t hllCount(uint8_t *registers) {
|
||||
|
||||
/* ========================== HyperLogLog commands ========================== */
|
||||
|
||||
/* HLLADD var ele ele ele ... ele => :0 or :1 */
|
||||
void hllAddCommand(redisClient *c) {
|
||||
/* PADD var ele ele ele ... ele => :0 or :1 */
|
||||
void paddCommand(redisClient *c) {
|
||||
robj *o = lookupKeyWrite(c->db,c->argv[1]);
|
||||
uint8_t *registers;
|
||||
int updated = 0, j;
|
||||
@ -482,8 +482,8 @@ void hllAddCommand(redisClient *c) {
|
||||
addReply(c, updated ? shared.cone : shared.czero);
|
||||
}
|
||||
|
||||
/* HLLCOUNT var -> approximated cardinality of set. */
|
||||
void hllCountCommand(redisClient *c) {
|
||||
/* PCOUNT var -> approximated cardinality of set. */
|
||||
void pcountCommand(redisClient *c) {
|
||||
robj *o = lookupKeyRead(c->db,c->argv[1]);
|
||||
uint8_t *registers;
|
||||
uint64_t card;
|
||||
@ -540,8 +540,8 @@ void hllCountCommand(redisClient *c) {
|
||||
}
|
||||
}
|
||||
|
||||
/* HLLMERGE dest src1 src2 src3 ... srcN => OK */
|
||||
void hllMergeCommand(redisClient *c) {
|
||||
/* PMERGE dest src1 src2 src3 ... srcN => OK */
|
||||
void pmergeCommand(redisClient *c) {
|
||||
uint8_t max[REDIS_HLL_REGISTERS];
|
||||
uint8_t *registers;
|
||||
int j, i;
|
||||
@ -614,7 +614,7 @@ void hllMergeCommand(redisClient *c) {
|
||||
* the correct value to be retained and not affect adjacent values. */
|
||||
|
||||
#define REDIS_HLL_TEST_CYCLES 1000
|
||||
void hllSelftestCommand(redisClient *c) {
|
||||
void pselftestCommand(redisClient *c) {
|
||||
int j, i;
|
||||
sds bitcounters = sdsnewlen(NULL,REDIS_HLL_SIZE);
|
||||
uint8_t bytecounters[REDIS_HLL_REGISTERS];
|
||||
|
Reference in New Issue
Block a user