| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | #ifndef TIDBITMAP_H |
| | #define TIDBITMAP_H |
| |
|
| | #include "storage/itemptr.h" |
| | #include "utils/dsa.h" |
| |
|
| |
|
| | |
| | |
| | |
| | |
| | typedef struct TIDBitmap TIDBitmap; |
| |
|
| | |
| | typedef struct TBMIterator TBMIterator; |
| | typedef struct TBMSharedIterator TBMSharedIterator; |
| |
|
| | |
| | typedef struct TBMIterateResult |
| | { |
| | BlockNumber blockno; |
| | int ntuples; |
| | bool recheck; |
| | |
| | OffsetNumber offsets[FLEXIBLE_ARRAY_MEMBER]; |
| | } TBMIterateResult; |
| |
|
| | |
| |
|
| | extern TIDBitmap *tbm_create(long maxbytes, dsa_area *dsa); |
| | extern void tbm_free(TIDBitmap *tbm); |
| | extern void tbm_free_shared_area(dsa_area *dsa, dsa_pointer dp); |
| |
|
| | extern void tbm_add_tuples(TIDBitmap *tbm, |
| | const ItemPointer tids, int ntids, |
| | bool recheck); |
| | extern void tbm_add_page(TIDBitmap *tbm, BlockNumber pageno); |
| |
|
| | extern void tbm_union(TIDBitmap *a, const TIDBitmap *b); |
| | extern void tbm_intersect(TIDBitmap *a, const TIDBitmap *b); |
| |
|
| | extern bool tbm_is_empty(const TIDBitmap *tbm); |
| |
|
| | extern TBMIterator *tbm_begin_iterate(TIDBitmap *tbm); |
| | extern dsa_pointer tbm_prepare_shared_iterate(TIDBitmap *tbm); |
| | extern TBMIterateResult *tbm_iterate(TBMIterator *iterator); |
| | extern TBMIterateResult *tbm_shared_iterate(TBMSharedIterator *iterator); |
| | extern void tbm_end_iterate(TBMIterator *iterator); |
| | extern void tbm_end_shared_iterate(TBMSharedIterator *iterator); |
| | extern TBMSharedIterator *tbm_attach_shared_iterate(dsa_area *dsa, |
| | dsa_pointer dp); |
| | extern long tbm_calculate_entries(double maxbytes); |
| |
|
| | #endif |
| |
|