PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | hyperLogLogState |
Typedefs | |
typedef struct hyperLogLogState | hyperLogLogState |
Functions | |
void | initHyperLogLog (hyperLogLogState *cState, uint8 bwidth) |
void | initHyperLogLogError (hyperLogLogState *cState, double error) |
void | addHyperLogLog (hyperLogLogState *cState, uint32 hash) |
double | estimateHyperLogLog (hyperLogLogState *cState) |
void | freeHyperLogLog (hyperLogLogState *cState) |
typedef struct hyperLogLogState hyperLogLogState |
void addHyperLogLog | ( | hyperLogLogState * | cState, |
uint32 | hash | ||
) |
Definition at line 167 of file hyperloglog.c.
References BITS_PER_BYTE, hash(), hyperLogLogState::hashesArr, Max, hyperLogLogState::registerWidth, and rho().
Referenced by hashagg_spill_tuple(), macaddr_abbrev_convert(), network_abbrev_convert(), uuid_abbrev_convert(), and varstr_abbrev_convert().
double estimateHyperLogLog | ( | hyperLogLogState * | cState | ) |
Definition at line 186 of file hyperloglog.c.
References hyperLogLogState::alphaMM, hyperLogLogState::hashesArr, i, NEG_POW_2_32, hyperLogLogState::nRegisters, and POW_2_32.
Referenced by hashagg_spill_finish(), macaddr_abbrev_abort(), network_abbrev_abort(), numeric_abbrev_abort(), uuid_abbrev_abort(), and varstr_abbrev_abort().
void freeHyperLogLog | ( | hyperLogLogState * | cState | ) |
Definition at line 151 of file hyperloglog.c.
References Assert, hyperLogLogState::hashesArr, and pfree().
Referenced by hashagg_spill_finish().
void initHyperLogLog | ( | hyperLogLogState * | cState, |
uint8 | bwidth | ||
) |
Definition at line 66 of file hyperloglog.c.
References hyperLogLogState::alphaMM, hyperLogLogState::arrSize, elog, ERROR, hyperLogLogState::hashesArr, hyperLogLogState::nRegisters, palloc0(), and hyperLogLogState::registerWidth.
Referenced by hashagg_spill_init(), initHyperLogLogError(), macaddr_sortsupport(), network_sortsupport(), numeric_sortsupport(), uuid_sortsupport(), and varstr_sortsupport().
void initHyperLogLogError | ( | hyperLogLogState * | cState, |
double | error | ||
) |
Definition at line 128 of file hyperloglog.c.
References error(), and initHyperLogLog().