10 #include <gtest/gtest.h>
14 template <
typename cell_t>
19 const auto i_init = std::numeric_limits<cell_t>::min();
20 const auto i_end = std::numeric_limits<cell_t>::max();
21 for (int64_t i = i_init; i <= i_end; i++)
24 const float new_p = lut.
l2p(i);
25 EXPECT_GE(new_p, last_p) <<
" i=" << i;
32 int64_t last_logodd = std::numeric_limits<int64_t>::min();
33 for (
size_t idx = 0; idx < lut.
p2lTable.size(); idx++)
35 const int64_t next_logodd = lut.
p2lTable[idx];
36 EXPECT_GE(next_logodd, last_logodd) <<
"idx=" << idx;
38 last_logodd = next_logodd;
42 TEST(CLogOddsGridMapLUT, monotonic_8bit) { test_monotonic<int8_t>(); }
44 TEST(CLogOddsGridMapLUT, monotonic_16bit) { test_monotonic<int16_t>(); }