Searched refs:NHPOT (Results 1 – 4 of 4) sorted by relevance
/Zephyr-Core-3.6.0/tests/unit/pot/ |
D | nhpot.c | 12 static const uint32_t val = NHPOT(42); 13 static const uint64_t val64 = NHPOT(42 + BIT64(32)); 17 zassert_equal(1, NHPOT(LLONG_MIN)); in ZTEST() 18 zassert_equal(1, NHPOT(LONG_MIN)); in ZTEST() 19 zassert_equal(1, NHPOT(INT_MIN)); in ZTEST() 20 zassert_equal(1, NHPOT(-1)); in ZTEST() 21 zassert_equal(1, NHPOT(0)); in ZTEST() 22 zassert_equal(1, NHPOT(1)); in ZTEST() 23 zassert_equal(2, NHPOT(2)); in ZTEST() 24 zassert_equal(4, NHPOT(3)); in ZTEST() [all …]
|
D | nhpot.cpp | 10 static constexpr uint32_t val = NHPOT(42); 11 static constexpr uint64_t val64 = NHPOT(42 + BIT64(32)); 15 return NHPOT(x); in nhpot() 20 zassert_equal(1, NHPOT(LLONG_MIN)); in ZTEST() 21 zassert_equal(1, NHPOT(LONG_MIN)); in ZTEST() 22 zassert_equal(1, NHPOT(INT_MIN)); in ZTEST() 23 zassert_equal(1, NHPOT(-1)); in ZTEST() 24 zassert_equal(1, NHPOT(0)); in ZTEST() 25 zassert_equal(1, NHPOT(1)); in ZTEST() 26 zassert_equal(2, NHPOT(2)); in ZTEST() [all …]
|
/Zephyr-Core-3.6.0/include/zephyr/sys/ |
D | hash_map_api.h | 217 .initial_n_buckets = NHPOT(DIV_ROUND_UP(100, _load_factor)), \
|
D | util.h | 647 #define NHPOT(x) ((x) < 1 ? 1 : ((x) > (1ULL<<63) ? 0 : 1ULL << LOG2CEIL(x))) macro
|