23 #ifndef _QUERY_BITSET_H_ 24 #define _QUERY_BITSET_H_ 39 #define _LOG2_WORDSIZE 5 41 #define _MASK ((1L << _LOG2_WORDSIZE) - 1) 42 #define _WORD(x) ((x) >> _LOG2_WORDSIZE) 43 #define _BIT(x) ((x) & _MASK) 45 #define NWORDS (((NELEMENTS + (_WORDSIZE-1)) & ~(_WORDSIZE-1)) \ 68 #define BITSET_CLEAR(s) memset((char *)(s).setp, 0, \ 69 (s).nwords * sizeof(BITSET_CARRIER)) 70 #define BITSET_MEMBER(s, x) ((_WORD(x) < (s).nwords) \ 71 && ((s).setp[_WORD(x)] & (1L << _BIT(x)))) 72 #define BITPATTERN(s) ((s).setp[0]) 80 #define BITSET_MOVE(dst, src) \ 83 if ((src).setp == (src).set.word) \ 84 (dst).setp = (dst).set.word; \ 89 #if defined (CUBRID_DEBUG) 90 extern void set_stats (FILE * fp);
99 #if defined(ENABLE_UNUSED_FUNCTION) 100 extern void bitset_invert (
BITSET *);
101 extern int bitset_position (
const BITSET *,
int);
unsigned int BITSET_CARRIER
int bitset_is_empty(const BITSET *)
void bitset_init(BITSET *, QO_ENV *)
int bitset_cardinality(const BITSET *)
int bitset_subset(const BITSET *, const BITSET *)
void bitset_extend(BITSET *dst, int nwords)
void bitset_delset(BITSET *)
int bitset_intersects(const BITSET *, const BITSET *)
int bitset_iterate(const BITSET *, BITSET_ITERATOR *)
void bitset_assign(BITSET *, const BITSET *)
void bitset_difference(BITSET *, const BITSET *)
void bitset_intersect(BITSET *, const BITSET *)
void bitset_print(const BITSET *, FILE *fp)
int bitset_first_member(const BITSET *)
int bitset_next_member(BITSET_ITERATOR *)
void bitset_union(BITSET *, const BITSET *)
void bitset_add(BITSET *, int)
BITSET_CARRIER word[NWORDS]
void bitset_remove(BITSET *, int)
int bitset_is_equivalent(const BITSET *, const BITSET *)