Lines Matching defs:sparsebit

9  * with an index size of 2^64.  A sparsebit array is allocated through
13 * struct sparsebit *s;
17 * The struct sparsebit type resolves down to a struct sparsebit.
18 * Note that, sparsebit_free() takes a pointer to the sparsebit
20 * the pointer (e.g. set it to NULL) to the struct sparsebit before
25 * that can be performed on the allocated sparsebit array. All of
44 * sparsebit array. This can be done via code with the following structure:
63 * sparsebit array has at least a single bit set before calling
67 * For the most part the internal implementation of sparsebit is
70 * implementation. This implementation of a sparsebit array is not
159 #include "sparsebit.h"
177 struct sparsebit {
181 * the entire sparsebit array.
205 static struct node *node_first(struct sparsebit *s)
219 static struct node *node_next(struct sparsebit *s, struct node *np)
247 static struct node *node_prev(struct sparsebit *s, struct node *np)
310 static struct node *node_find(struct sparsebit *s, sparsebit_idx_t idx)
333 static struct node *node_add(struct sparsebit *s, sparsebit_idx_t idx)
395 /* Returns whether all the bits in the sparsebit array are set. */
396 bool sparsebit_all_set(struct sparsebit *s)
409 static void node_rm(struct sparsebit *s, struct node *nodep)
498 static struct node *node_split(struct sparsebit *s, sparsebit_idx_t idx)
599 static void node_reduce(struct sparsebit *s, struct node *nodep)
777 * sparsebit array is set or not.
779 bool sparsebit_is_set(struct sparsebit *s, sparsebit_idx_t idx)
802 /* Within the sparsebit array pointed to by s, sets the bit
805 static void bit_set(struct sparsebit *s, sparsebit_idx_t idx)
829 /* Within the sparsebit array pointed to by s, clears the bit
832 static void bit_clear(struct sparsebit *s, sparsebit_idx_t idx)
925 static void sparsebit_dump_internal(FILE *stream, struct sparsebit *s,
936 /* Allocates and returns a new sparsebit array. The initial state
937 * of the newly allocated sparsebit array has all bits cleared.
939 struct sparsebit *sparsebit_alloc(void)
941 struct sparsebit *s;
953 /* Frees the implementation dependent data for the sparsebit array
956 void sparsebit_free(struct sparsebit **sbitp)
958 struct sparsebit *s = *sbitp;
968 /* Makes a copy of the sparsebit array given by s, to the sparsebit
973 void sparsebit_copy(struct sparsebit *d, struct sparsebit *s)
985 bool sparsebit_is_set_num(struct sparsebit *s,
1009 bool sparsebit_is_clear(struct sparsebit *s,
1016 bool sparsebit_is_clear_num(struct sparsebit *s,
1043 * to determine if the sparsebit array has any bits set.
1045 sparsebit_num_t sparsebit_num_set(struct sparsebit *s)
1050 /* Returns whether any bit is set in the sparsebit array. */
1051 bool sparsebit_any_set(struct sparsebit *s)
1073 /* Returns whether all the bits in the sparsebit array are cleared. */
1074 bool sparsebit_all_clear(struct sparsebit *s)
1079 /* Returns whether all the bits in the sparsebit array are set. */
1080 bool sparsebit_any_clear(struct sparsebit *s)
1087 sparsebit_idx_t sparsebit_first_set(struct sparsebit *s)
1101 sparsebit_idx_t sparsebit_first_clear(struct sparsebit *s)
1155 sparsebit_idx_t sparsebit_next_set(struct sparsebit *s,
1248 sparsebit_idx_t sparsebit_next_clear(struct sparsebit *s,
1304 sparsebit_idx_t sparsebit_next_set_num(struct sparsebit *s,
1339 sparsebit_idx_t sparsebit_next_clear_num(struct sparsebit *s,
1371 void sparsebit_set_num(struct sparsebit *s,
1453 void sparsebit_clear_num(struct sparsebit *s,
1522 void sparsebit_set(struct sparsebit *s, sparsebit_idx_t idx)
1528 void sparsebit_clear(struct sparsebit *s, sparsebit_idx_t idx)
1533 /* Sets the bits in the entire addressable range of the sparsebit array. */
1534 void sparsebit_set_all(struct sparsebit *s)
1541 /* Clears the bits in the entire addressable range of the sparsebit array. */
1542 void sparsebit_clear_all(struct sparsebit *s)
1578 * is an example output of a sparsebit array that has bits:
1582 * This corresponds to a sparsebit whose bits 5, 8, 10, 11, 12, 13, 14, 18
1587 void sparsebit_dump(FILE *stream, struct sparsebit *s,
1681 /* Validates the internal state of the sparsebit array given by
1685 void sparsebit_validate_internal(struct sparsebit *s)
1887 * of some invariants and of a trivial representation of sparsebit.
1900 struct sparsebit *s;