3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-19 16:53:18 +00:00

numeral helper functions

This commit is contained in:
Jakob Rath 2022-08-01 12:14:06 +02:00 committed by Nikolaj Bjorner
parent e31926d132
commit 6eae27ffad
6 changed files with 27 additions and 4 deletions

View file

@ -76,6 +76,13 @@ static uint64_t _trailing_zeros64(uint64_t x) {
}
#endif
unsigned trailing_zeros(uint32_t x) {
return static_cast<unsigned>(_trailing_zeros32(x));
}
unsigned trailing_zeros(uint64_t x) {
return static_cast<unsigned>(_trailing_zeros64(x));
}
#define _bit_min(x, y) (y + ((x - y) & ((int)(x - y) >> 31)))
#define _bit_max(x, y) (x - ((x - y) & ((int)(x - y) >> 31)))