Jacques Lucke
8be66a42c9
BLI: add utilities to find first (un)set bit in a bit span
...
This adds three new functions to find the first 0 or 1 bit in an arbitrarily
long bit span:
```cpp
blender::bits::find_first_0_index(BitSpan) -> std::optional<int64_t>
blender::bits::find_first_1_index(BitSpan) -> std::optional<int64_t>
blender::bits::find_first_1_index_expr(Expr, BitSpans...) -> std::optional<int64_t>
```
The two first ones are implemented in terms of the third. The `*_expr` variant
allows e.g. finding the first set bit when ORing two bit spans together without
computing the entire intermediate result first. Or it can be used to find the
first index where two bit spans are different.
Pull Request: https://projects.blender.org/blender/blender/pulls/134923
2025-02-21 13:36:03 +01:00
..
2024-07-25 11:24:11 +10:00
2024-01-21 13:22:16 +01:00
2025-01-23 17:34:30 +01:00
2024-01-03 13:38:14 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-11-19 11:05:57 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2025-02-21 13:36:03 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-03-05 14:32:48 +01:00
2024-11-28 12:37:26 +01:00
2023-08-16 00:20:26 +10:00
2024-03-31 22:47:23 +11:00
2023-08-16 00:20:26 +10:00
2025-02-19 12:36:19 +01:00
2024-02-27 23:09:54 -05:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-03-28 22:57:57 +11:00
2024-09-26 21:13:39 +10:00
2024-03-27 10:31:24 +11:00
2024-10-10 03:14:44 +02:00
2024-07-22 16:35:36 +02:00
2023-08-16 00:20:26 +10:00
2023-08-16 00:20:26 +10:00
2024-06-23 12:14:19 +10:00
2024-02-02 19:55:06 +01:00
2023-08-16 00:20:26 +10:00
2023-08-16 00:20:26 +10:00
2023-12-01 11:19:39 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2024-08-29 12:15:33 +02:00
2023-08-16 00:20:26 +10:00
2024-12-17 21:04:55 +01:00
2023-08-16 00:20:26 +10:00
2023-08-16 14:48:53 +03:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-09-26 21:13:39 +10:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2024-09-17 15:48:06 +02:00
2025-02-12 23:01:08 +01:00
2024-05-03 12:05:56 +02:00
2024-02-11 17:16:17 +11:00
2024-09-22 17:39:54 +02:00
2024-11-25 16:03:33 +01:00
2025-01-07 12:39:13 +01:00
2024-03-03 16:26:04 +01:00
2024-06-06 19:26:40 +02:00
2025-01-07 12:39:13 +01:00
2024-03-28 22:57:57 +11:00
2023-08-16 00:20:26 +10:00
2024-12-03 15:44:36 +01:00
2023-08-16 00:20:26 +10:00
2023-10-20 10:27:26 +02:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2025-01-31 17:03:17 +01:00
2023-08-16 00:20:26 +10:00
2025-01-31 17:03:17 +01:00
2024-10-30 13:07:33 +11:00
2025-02-05 18:27:43 -05:00
2025-01-31 17:03:17 +01:00
2024-02-17 20:59:45 +01:00
2023-08-16 00:20:26 +10:00
2023-08-16 00:20:26 +10:00
2024-01-22 13:47:13 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2023-10-06 03:02:17 +02:00
2025-02-19 12:36:19 +01:00
2023-10-06 16:38:45 +02:00
2024-10-25 14:15:31 +11:00
2024-10-25 16:52:00 +11:00
2023-11-02 16:43:04 +11:00
2025-01-31 17:03:17 +01:00
2025-02-05 18:27:43 -05:00
2024-09-26 21:13:39 +10:00
2023-08-16 00:20:26 +10:00
2023-08-16 00:20:26 +10:00
2024-02-20 15:20:11 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00
2025-01-31 17:03:17 +01:00