PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | pg_leftmost_one_pos_size_t pg_leftmost_one_pos64 |
#define | pg_nextpower2_size_t pg_nextpower2_64 |
#define | pg_prevpower2_size_t pg_prevpower2_64 |
Functions | |
static int | pg_leftmost_one_pos32 (uint32 word) |
static int | pg_leftmost_one_pos64 (uint64 word) |
static int | pg_rightmost_one_pos32 (uint32 word) |
static int | pg_rightmost_one_pos64 (uint64 word) |
static uint32 | pg_nextpower2_32 (uint32 num) |
static uint64 | pg_nextpower2_64 (uint64 num) |
static uint32 | pg_prevpower2_32 (uint32 num) |
static uint64 | pg_prevpower2_64 (uint64 num) |
static uint32 | pg_ceil_log2_32 (uint32 num) |
static uint64 | pg_ceil_log2_64 (uint64 num) |
int | pg_popcount32 (uint32 word) |
int | pg_popcount64 (uint64 word) |
uint64 | pg_popcount_optimized (const char *buf, int bytes) |
uint64 | pg_popcount_masked_optimized (const char *buf, int bytes, bits8 mask) |
static uint64 | pg_popcount (const char *buf, int bytes) |
static uint64 | pg_popcount_masked (const char *buf, int bytes, bits8 mask) |
static uint32 | pg_rotate_right32 (uint32 word, int n) |
static uint32 | pg_rotate_left32 (uint32 word, int n) |
Variables | |
PGDLLIMPORT const uint8 | pg_leftmost_one_pos [256] |
PGDLLIMPORT const uint8 | pg_rightmost_one_pos [256] |
PGDLLIMPORT const uint8 | pg_number_of_ones [256] |
#define pg_leftmost_one_pos_size_t pg_leftmost_one_pos64 |
Definition at line 416 of file pg_bitutils.h.
#define pg_nextpower2_size_t pg_nextpower2_64 |
Definition at line 417 of file pg_bitutils.h.
#define pg_prevpower2_size_t pg_prevpower2_64 |
Definition at line 418 of file pg_bitutils.h.
Definition at line 258 of file pg_bitutils.h.
References pg_leftmost_one_pos32().
Referenced by _hash_spareindex(), and my_log2().
|
inlinestatic |
Definition at line 271 of file pg_bitutils.h.
References pg_leftmost_one_pos64().
Referenced by GetHugePageSize(), and my_log2().
|
inlinestatic |
Definition at line 41 of file pg_bitutils.h.
References Assert, pg_leftmost_one_pos, and word().
Referenced by _hash_get_oldblock_from_newbucket(), _hash_init_metabuffer(), add_paths_to_append_rel(), AllocSetFreeIndex(), decimalLength32(), generate_union_paths(), make_main_region_dsm_handle(), pg_ceil_log2_32(), pg_nextpower2_32(), pg_prevpower2_32(), and rho().
|
inlinestatic |
Definition at line 72 of file pg_bitutils.h.
References Assert, pg_leftmost_one_pos, and word().
Referenced by decimalLength64(), permute(), pg_ceil_log2_64(), pg_nextpower2_64(), pg_prevpower2_64(), pg_prng_uint64_range(), and RT_KEY_GET_SHIFT().
Definition at line 189 of file pg_bitutils.h.
References Assert, pg_leftmost_one_pos32(), and PG_UINT32_MAX.
Referenced by _h_spoolinit(), _hash_init_metabuffer(), accumArrayResultArr(), array_agg_array_combine(), array_agg_combine(), bottomup_sort_and_shrink(), bottomup_sort_and_shrink_cmp(), enlarge_list(), ensure_record_cache_typmod_slot_exists(), ExecChooseHashTableSize(), ExecHashBuildSkewHash(), ExecParallelHashIncreaseNumBatches(), ginHeapTupleFastCollect(), LWLockRegisterTranche(), new_list(), RequestNamedLWLockTranche(), and table_block_parallelscan_startblock_init().
|
inlinestatic |
Definition at line 212 of file pg_bitutils.h.
References Assert, pg_leftmost_one_pos64(), and PG_UINT64_MAX.
|
inlinestatic |
Definition at line 339 of file pg_bitutils.h.
References buf, pg_number_of_ones, and pg_popcount_optimized().
Referenced by bit_bit_count(), bloom_prop_bits_set(), brin_bloom_union(), bytea_bit_count(), GetWALBlockInfo(), heap_tuple_infomask_flags(), and sizebitvec().
int pg_popcount32 | ( | uint32 | word | ) |
Definition at line 499 of file pg_bitutils.c.
References pg_popcount32_slow(), and word().
Referenced by plan_single_revoke().
int pg_popcount64 | ( | uint64 | word | ) |
|
inlinestatic |
Definition at line 370 of file pg_bitutils.h.
References buf, pg_number_of_ones, and pg_popcount_masked_optimized().
Referenced by visibilitymap_count().
uint64 pg_popcount_masked_optimized | ( | const char * | buf, |
int | bytes, | ||
bits8 | mask | ||
) |
Definition at line 525 of file pg_bitutils.c.
References buf, and pg_popcount_masked_slow().
Referenced by pg_popcount_masked().
uint64 pg_popcount_optimized | ( | const char * | buf, |
int | bytes | ||
) |
Definition at line 515 of file pg_bitutils.c.
References buf, and pg_popcount_slow().
Referenced by pg_popcount().
Definition at line 235 of file pg_bitutils.h.
References pg_leftmost_one_pos32().
Referenced by ExecParallelHashIncreaseNumBatches().
|
inlinestatic |
Definition at line 248 of file pg_bitutils.h.
References pg_leftmost_one_pos64().
|
inlinestatic |
Definition at line 111 of file pg_bitutils.h.
References Assert, pg_rightmost_one_pos, and word().
Referenced by ProcessProcSignalBarrier(), RT_NODE_16_GET_INSERTPOS(), and RT_NODE_16_SEARCH_EQ().
|
inlinestatic |
Definition at line 145 of file pg_bitutils.h.
References Assert, pg_rightmost_one_pos, and word().
Referenced by if().
Definition at line 404 of file pg_bitutils.h.
References word().
Referenced by CatalogCacheComputeHashValue(), ExecInterpExpr(), guc_name_hash(), hash_multirange(), hash_range(), JsonbHashScalarValue(), MemoizeHash_hash(), and TupleHashTableHash_internal().
Definition at line 398 of file pg_bitutils.h.
References word().
Referenced by ExecHashGetBucketAndBatch().
|
extern |
Definition at line 34 of file pg_bitutils.c.
Referenced by AllocSetFreeIndex(), pg_leftmost_one_pos32(), and pg_leftmost_one_pos64().
|
extern |
Definition at line 87 of file pg_bitutils.c.
Referenced by hemdistsign(), pg_popcount(), pg_popcount32_slow(), pg_popcount64_slow(), pg_popcount_masked(), pg_popcount_masked_slow(), pg_popcount_slow(), and process_pipe_input().
|
extern |
Definition at line 62 of file pg_bitutils.c.
Referenced by pg_rightmost_one_pos32(), and pg_rightmost_one_pos64().