aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_gray_code_rank.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_gray_code_rank.cpp')
-rw-r--r--test/test_gray_code_rank.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/test_gray_code_rank.cpp b/test/test_gray_code_rank.cpp
index 0c06a33..9c903c1 100644
--- a/test/test_gray_code_rank.cpp
+++ b/test/test_gray_code_rank.cpp
@@ -21,9 +21,9 @@
#include "chilbert/BoundedBitVec.hpp"
#include "chilbert/DynamicBitVec.hpp"
-#include "chilbert/GrayCodeRank.hpp"
#include "chilbert/SmallBitVec.hpp"
#include "chilbert/StaticBitVec.hpp"
+#include "chilbert/detail/gray_code_rank.hpp"
#include <algorithm>
#include <array>
@@ -39,7 +39,7 @@ get_mask(const std::array<size_t, D>& ms, const size_t d, const size_t step)
{
T mask = make_zero_bitvec<T, D>();
size_t b;
- chilbert::extract_mask(ms.data(), D, d, step, mask, b);
+ chilbert::detail::extract_mask(ms.data(), D, d, step, mask, b);
assert(b == mask.count());
@@ -75,21 +75,21 @@ test_gray_code_rank(Context& ctx)
const auto b = make_random_bitvec<T, D>(ctx);
auto ga = a;
- gray_code(ga);
+ chilbert::detail::gray_code(ga);
auto gb = b;
- gray_code(gb);
+ chilbert::detail::gray_code(gb);
// Calculate gray code ranks
auto ra = make_zero_bitvec<T, D>();
- chilbert::gray_code_rank(mask, ga, D, ra);
+ chilbert::detail::gray_code_rank(mask, ga, D, ra);
auto rb = make_zero_bitvec<T, D>();
- chilbert::gray_code_rank(mask, gb, D, rb);
+ chilbert::detail::gray_code_rank(mask, gb, D, rb);
// Ensure ranks have at most mask.count() bits
auto max = make_zero_bitvec<T, D>();
- set_bit(max, mask.count(), 1);
+ chilbert::detail::set_bit(max, mask.count(), 1);
assert(ra < max);
assert(rb < max);
@@ -102,11 +102,12 @@ test_gray_code_rank(Context& ctx)
const auto pat = ~mask;
auto ga_out = make_zero_bitvec<T, D>();
auto gag_out = make_zero_bitvec<T, D>();
- gray_code_rank_inv(mask, pat, ra, D, mask.count(), gag_out, ga_out);
+ chilbert::detail::gray_code_rank_inv(
+ mask, pat, ra, D, mask.count(), gag_out, ga_out);
assert((ga_out & mask) == (ga & mask));
auto gag_check = ga_out;
- gray_code(gag_check);
+ chilbert::detail::gray_code(gag_check);
assert(gag_check == gag_out);
}
}