mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Move some bitmap logic out of bitmapset.c
Move the logic for selecting appropriate pg_bitutils.h functions based on word size to bitmapset.h for wider visibility. Reviewed (in a previous version) by Tom Lane Discussion: https://postgr.es/m/CAFBsxsFW2JjTo58jtDB%2B3sZhxMx3t-3evew8%3DAcr%2BGGhC%2BkFaA%40mail.gmail.com
This commit is contained in:
@@ -71,19 +71,6 @@
|
||||
|
||||
#define HAS_MULTIPLE_ONES(x) ((bitmapword) RIGHTMOST_ONE(x) != (x))
|
||||
|
||||
/* Select appropriate bit-twiddling functions for bitmap word size */
|
||||
#if BITS_PER_BITMAPWORD == 32
|
||||
#define bmw_leftmost_one_pos(w) pg_leftmost_one_pos32(w)
|
||||
#define bmw_rightmost_one_pos(w) pg_rightmost_one_pos32(w)
|
||||
#define bmw_popcount(w) pg_popcount32(w)
|
||||
#elif BITS_PER_BITMAPWORD == 64
|
||||
#define bmw_leftmost_one_pos(w) pg_leftmost_one_pos64(w)
|
||||
#define bmw_rightmost_one_pos(w) pg_rightmost_one_pos64(w)
|
||||
#define bmw_popcount(w) pg_popcount64(w)
|
||||
#else
|
||||
#error "invalid BITS_PER_BITMAPWORD"
|
||||
#endif
|
||||
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
/*
|
||||
* bms_is_valid_set - for cassert builds to check for valid sets
|
||||
|
||||
Reference in New Issue
Block a user