Lines Matching defs:num
40 * sparsebit_set_num(s, idx, num);
41 * sparsebit_clear_num(s, idx, num);
173 sparsebit_num_t num_after; /* num contiguously set after mask */
400 * where a bit is set and total num set is 0, is when all bits
984 /* Returns whether num consecutive bits starting at idx are all set. */
986 sparsebit_idx_t idx, sparsebit_num_t num)
990 assert(num > 0);
991 assert(idx + num - 1 >= idx);
993 /* With num > 0, the first bit must be set. */
1001 * If no cleared bits beyond idx, then there are at least num
1002 * set bits. idx + num doesn't wrap. Otherwise check if
1005 return next_cleared == 0 || next_cleared - idx >= num;
1015 /* Returns whether num consecutive bits starting at idx are all cleared. */
1017 sparsebit_idx_t idx, sparsebit_num_t num)
1021 assert(num > 0);
1022 assert(idx + num - 1 >= idx);
1024 /* With num > 0, the first bit must be cleared. */
1032 * If no set bits beyond idx, then there are at least num
1033 * cleared bits. idx + num doesn't wrap. Otherwise check if
1036 return next_set == 0 || next_set - idx >= num;
1301 * and returns the index of the first sequence of num consecutively set
1305 sparsebit_idx_t start, sparsebit_num_t num)
1309 assert(num >= 1);
1312 idx != 0 && idx + num - 1 >= idx;
1318 * num set bits?
1320 if (sparsebit_is_set_num(s, idx, num))
1336 * and returns the index of the first sequence of num consecutively cleared
1340 sparsebit_idx_t start, sparsebit_num_t num)
1344 assert(num >= 1);
1347 idx != 0 && idx + num - 1 >= idx;
1353 * num cleared bits?
1355 if (sparsebit_is_clear_num(s, idx, num))
1370 /* Sets the bits * in the inclusive range idx through idx + num - 1. */
1372 sparsebit_idx_t start, sparsebit_num_t num)
1380 assert(num > 0);
1381 assert(start + num - 1 >= start);
1403 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--)
1452 /* Clears the bits * in the inclusive range idx through idx + num - 1. */
1454 sparsebit_idx_t start, sparsebit_num_t num)
1462 assert(num > 0);
1463 assert(start + num - 1 >= start);
1466 for (idx = start, n = num; n > 0 && idx % MASK_BITS != 0; idx++, n--)
1917 sparsebit_num_t num;
1921 num = last - first + 1;
1923 num = first - last + 1;
1925 last = first + num - 1;
1993 if (sparsebit_is_set_num(s, first, num)) {
2008 if (sparsebit_is_clear_num(s, first, num)) {
2022 sparsebit_set_num(s, first, num);
2023 assert(sparsebit_is_set_num(s, first, num));
2024 assert(!sparsebit_is_clear_num(s, first, num));
2033 sparsebit_clear_num(s, first, num);
2034 assert(!sparsebit_is_set_num(s, first, num));
2035 assert(sparsebit_is_clear_num(s, first, num));