From d075184c2f2005eabf8c982f02330bdaa05932ed Mon Sep 17 00:00:00 2001 From: Mickael Ide Date: Tue, 12 Sep 2023 16:37:25 +0200 Subject: [PATCH] Fix namespace typo --- cpp/bench/prims/util/bitset.cu | 8 ++++---- cpp/include/raft/util/bitset.cuh | 16 ++++++++-------- cpp/test/util/bitset.cu | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cpp/bench/prims/util/bitset.cu b/cpp/bench/prims/util/bitset.cu index 47561c8052..c7cba797f4 100644 --- a/cpp/bench/prims/util/bitset.cu +++ b/cpp/bench/prims/util/bitset.cu @@ -19,7 +19,7 @@ #include #include -namespace raft::bench::utils { +namespace raft::bench::util { struct bitset_inputs { uint32_t bitset_len; @@ -42,9 +42,9 @@ struct bitset_bench : public fixture { void run_benchmark(::benchmark::State& state) override { loop_on_state(state, [this]() { - auto my_bitset = raft::utils::bitset( + auto my_bitset = raft::util::bitset( this->res, raft::make_const_mdspan(mask.view()), params.bitset_len); - raft::utils::bitset_test( + raft::util::bitset_test( res, my_bitset.view(), raft::make_const_mdspan(queries.view()), outputs.view()); }); } @@ -72,4 +72,4 @@ RAFT_BENCH_REGISTER(Uint16_64, "", bitset_input_vecs); RAFT_BENCH_REGISTER(Uint32_32, "", bitset_input_vecs); RAFT_BENCH_REGISTER(Uint32_64, "", bitset_input_vecs); -} // namespace raft::bench::utils +} // namespace raft::bench::util diff --git a/cpp/include/raft/util/bitset.cuh b/cpp/include/raft/util/bitset.cuh index a13ad724eb..5dbf4c00e8 100644 --- a/cpp/include/raft/util/bitset.cuh +++ b/cpp/include/raft/util/bitset.cuh @@ -23,7 +23,7 @@ #include #include -namespace raft::utils { +namespace raft::util { /** * @defgroup bitset Bitset * @{ @@ -157,11 +157,11 @@ struct bitset { * * @return bitset_view */ - inline auto view() -> raft::utils::bitset_view + inline auto view() -> raft::util::bitset_view { return bitset_view(bitset_.view()); } - [[nodiscard]] inline auto view() const -> raft::utils::bitset_view + [[nodiscard]] inline auto view() const -> raft::util::bitset_view { return bitset_view(bitset_.view()); } @@ -201,13 +201,13 @@ struct bitset { */ template void bitset_set(const raft::resources& res, - raft::utils::bitset_view bitset_view_, + raft::util::bitset_view bitset_view_, raft::device_vector_view mask_index, bool set_value = false) { auto* bitset_ptr = bitset_view_.data_handle(); constexpr auto bitset_element_size = - raft::utils::bitset_view::bitset_element_size; + raft::util::bitset_view::bitset_element_size; thrust::for_each_n( resource::get_thrust_policy(res), mask_index.data_handle(), @@ -238,7 +238,7 @@ void bitset_set(const raft::resources& res, */ template void bitset_test(const raft::resources& res, - const raft::utils::bitset_view bitset_view_, + const raft::util::bitset_view bitset_view_, raft::device_vector_view queries, raft::device_vector_view output) { @@ -260,7 +260,7 @@ void bitset_test(const raft::resources& res, */ template void bitset_flip(const raft::resources& res, - raft::utils::bitset_view bitset_view_) + raft::util::bitset_view bitset_view_) { auto bitset_span = bitset_view_.to_mdspan(); raft::linalg::map( @@ -270,4 +270,4 @@ void bitset_flip(const raft::resources& res, raft::make_const_mdspan(bitset_span)); } /** @} */ -} // end namespace raft::utils +} // end namespace raft::util diff --git a/cpp/test/util/bitset.cu b/cpp/test/util/bitset.cu index 3e789b70bc..69ade45432 100644 --- a/cpp/test/util/bitset.cu +++ b/cpp/test/util/bitset.cu @@ -24,7 +24,7 @@ #include #include -namespace raft::utils { +namespace raft::util { struct test_spec { uint64_t bitset_len; @@ -108,7 +108,7 @@ class BitsetTest : public testing::TestWithParam { resource::sync_stream(res, stream); // calculate the results - auto test_bitset = raft::utils::bitset( + auto test_bitset = raft::util::bitset( res, raft::make_const_mdspan(mask_device.view()), index_t(spec.bitset_len)); update_host( bitset_result.data(), test_bitset.view().data_handle(), bitset_result.size(), stream); @@ -127,7 +127,7 @@ class BitsetTest : public testing::TestWithParam { // Create queries and verify the test results raft::random::uniformInt(res, rng, query_device.view(), index_t(0), index_t(spec.bitset_len)); update_host(query_cpu.data(), query_device.data_handle(), query_device.extent(0), stream); - raft::utils::bitset_test( + raft::util::bitset_test( res, test_bitset.view(), raft::make_const_mdspan(query_device.view()), result_device.view()); update_host(result_cpu.data(), result_device.data_handle(), result_device.extent(0), stream); test_cpu_bitset(bitset_ref, query_cpu, result_ref); @@ -138,7 +138,7 @@ class BitsetTest : public testing::TestWithParam { raft::random::uniformInt(res, rng, mask_device.view(), index_t(0), index_t(spec.bitset_len)); update_host(mask_cpu.data(), mask_device.data_handle(), mask_device.extent(0), stream); resource::sync_stream(res, stream); - raft::utils::bitset_set(res, test_bitset.view(), mask_device.view()); + raft::util::bitset_set(res, test_bitset.view(), mask_device.view()); update_host(bitset_result.data(), test_bitset.data_handle(), bitset_result.size(), stream); add_cpu_bitset(bitset_ref, mask_cpu); @@ -146,7 +146,7 @@ class BitsetTest : public testing::TestWithParam { ASSERT_TRUE(hostVecMatch(bitset_ref, bitset_result, raft::Compare())); // Flip the bitset and re-test - raft::utils::bitset_flip(res, test_bitset.view()); + raft::util::bitset_flip(res, test_bitset.view()); update_host(bitset_result.data(), test_bitset.data_handle(), bitset_result.size(), stream); flip_cpu_bitset(bitset_ref); resource::sync_stream(res, stream); @@ -186,4 +186,4 @@ using Uint64_64 = BitsetTest; TEST_P(Uint64_64, Run) { run(); } INSTANTIATE_TEST_CASE_P(BitsetTest, Uint64_64, inputs); -} // namespace raft::utils +} // namespace raft::util