MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hllDenseAdd

Function hllDenseAdd

app/redis-6.2.6/src/hyperloglog.c:511–516  ·  view source on GitHub ↗

"Add" the element in the dense hyperloglog data structure. * Actually nothing is added, but the max 0 pattern counter of the subset * the element belongs to is incremented if needed. * * This is just a wrapper to hllDenseSet(), performing the hashing of the * element in order to retrieve the index and zero-run count. */

Source from the content-addressed store, hash-verified

509 * This is just a wrapper to hllDenseSet(), performing the hashing of the
510 * element in order to retrieve the index and zero-run count. */
511int hllDenseAdd(uint8_t *registers, unsigned char *ele, size_t elesize) {
512 long index;
513 uint8_t count = hllPatLen(ele,elesize,&index);
514 /* Update the register if this element produced a longer run of zeroes. */
515 return hllDenseSet(registers,index,count);
516}
517
518/* Compute the register histogram in the dense representation. */
519void hllDenseRegHisto(uint8_t *registers, int* reghisto) {

Callers 2

hllAddFunction · 0.85
pfselftestCommandFunction · 0.85

Calls 2

hllPatLenFunction · 0.85
hllDenseSetFunction · 0.85

Tested by

no test coverage detected