17 #ifndef BITMAP_DATATYPES 21 #define BITMAP_DATATYPES 1 29 #if (SIZEOF_VOID_P == 8) 54 #define SETCANARY(b) do { \ 55 b->bitset[ARRAYELEMS(b->bitmin, b->bitmax)] = 0; \ 59 #define CHKCANARY(b) \ 60 ((b->bitset[ARRAYELEMS(b->bitmin, b->bitmax)] == 0) && \ 64 #define CANARYELEM uint64 canary; 66 #define CANARYELEM uint32 canary; 71 #define CHKCANARY(b) true 88 #define BITZERO(x) ((x) & 0xffffffffffffffc0) 90 #define BITZERO(x) ((x) & 0xffffffe0) 101 #define BITSET_ELEM(x) ((x) >> 6) 103 #define BITSET_ELEM(x) ((x) >> 5) 114 #define BITSET_BIT(x) (x & 0x3f) 116 #define BITSET_BIT(x) (x & 0x1f) 129 #define ARRAYELEMS(min,max) (((max - BITZERO(min)) >> 6) + 1) 131 #define ARRAYELEMS(min,max) (((max - BITZERO(min)) >> 5) + 1) 144 #define MIN(a,b) ((a < b)? a: b) 155 #define MAX(a,b) ((a > b)? a: b) 193 #define DatumGetBitmap(x) ((Bitmap *) PG_DETOAST_DATUM(DatumGetPointer(x))) 198 #define PG_GETARG_BITMAP(x) DatumGetBitmap( \ 199 PG_DETOAST_DATUM(PG_GETARG_DATUM(x))) 203 #define PG_RETURN_BITMAP(x) PG_RETURN_POINTER(x) 208 extern Datum
bitmap_in(PG_FUNCTION_ARGS);
227 extern Datum
bitmap_lt(PG_FUNCTION_ARGS);
228 extern Datum
bitmap_le(PG_FUNCTION_ARGS);
229 extern Datum
bitmap_gt(PG_FUNCTION_ARGS);
230 extern Datum
bitmap_ge(PG_FUNCTION_ARGS);
Datum bitmap_ge(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1605
Datum bitmap_in(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1073
Definition: pgbitmap.h:174
Datum bitmap_union(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1635
bm_int bitset[0]
Definition: pgbitmap.h:181
int32 bitmax
Definition: pgbitmap.h:178
Datum bitmap_new_empty(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1252
Datum bitmap_bitmax(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1173
Bitmap * bitmapCopy(Bitmap *bitmap)
Definition: pgbitmap.c:348
Datum bitmap_nequal(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1460
bool bitmapTestbit(Bitmap *bitmap, int32 bit)
Definition: pgbitmap.c:290
Datum bitmap_out(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1096
Datum bitmap_clearbit(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1675
unsigned char boolean
Definition: pgbitmap.h:188
char vl_len[4]
Definition: pgbitmap.h:175
Datum bitmap_le(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1547
Datum bitmap_cmp(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1489
Datum bitmap_bitmin(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1141
Datum bitmap_setmin(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1374
int32 bitmin
Definition: pgbitmap.h:176
Datum bitmap_bits(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1203
Datum bitmap_testbit(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1346
uint64 bm_int
Definition: pgbitmap.h:161
Datum bitmap_new(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1274
Datum bitmap_gt(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1576
Datum bitmap_minus(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1745
Datum bitmap_setbit(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1305
Datum bitmap_intersection(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1707
Datum bitmap_is_empty(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1119
Datum bitmap_equal(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1432
Datum bitmap_lt(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1518
Datum bitmap_setmax(FunctionCallInfo fcinfo)
Definition: pgbitmap.c:1403