Skip to content

Commit 9fa8904

Browse files
committed
Move kernels to their own namespaces to avoid build conflicts
1 parent 1bb0ae6 commit 9fa8904

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

include/cuco/detail/bloom_filter/bloom_filter_impl.cuh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class bloom_filter_impl {
198198
auto const grid_size =
199199
cuco::detail::grid_size(num_keys, cg_size, cuco::detail::default_stride(), block_size);
200200

201-
detail::add_if_n<cg_size, block_size>
201+
bloom_filter_ns::detail::add_if_n<cg_size, block_size>
202202
<<<grid_size, block_size, 0, stream.get()>>>(first, num_keys, stencil, pred, *this);
203203
}
204204

@@ -303,8 +303,9 @@ class bloom_filter_impl {
303303
auto const grid_size =
304304
cuco::detail::grid_size(num_keys, cg_size, cuco::detail::default_stride(), block_size);
305305

306-
detail::contains_if_n<cg_size, block_size><<<grid_size, block_size, 0, stream.get()>>>(
307-
first, num_keys, stencil, pred, output_begin, *this);
306+
bloom_filter_ns::detail::contains_if_n<cg_size, block_size>
307+
<<<grid_size, block_size, 0, stream.get()>>>(
308+
first, num_keys, stencil, pred, output_begin, *this);
308309
}
309310

310311
[[nodiscard]] __host__ __device__ constexpr word_type* data() noexcept { return words_; }
@@ -365,4 +366,4 @@ class bloom_filter_impl {
365366
policy_type policy_;
366367
};
367368

368-
} // namespace cuco::detail
369+
} // namespace cuco::detail

include/cuco/detail/bloom_filter/kernels.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <cstdint>
2323
#include <iterator>
2424

25-
namespace cuco::detail {
25+
namespace cuco::bloom_filter_ns::detail {
2626

2727
CUCO_SUPPRESS_KERNEL_WARNINGS
2828

@@ -89,4 +89,4 @@ CUCO_KERNEL __launch_bounds__(BlockSize) void contains_if_n(InputIt first,
8989
}
9090
}
9191

92-
} // namespace cuco::detail
92+
} // namespace cuco::bloom_filter_ns::detail

include/cuco/detail/open_addressing/kernels.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#include <iterator>
2727

28-
namespace cuco::detail {
28+
namespace cuco::open_addressing_ns::detail {
2929
CUCO_SUPPRESS_KERNEL_WARNINGS
3030

3131
/**
@@ -729,4 +729,4 @@ CUCO_KERNEL __launch_bounds__(BlockSize) void rehash(
729729
}
730730
}
731731

732-
} // namespace cuco::detail
732+
} // namespace cuco::open_addressing_ns::detail

include/cuco/detail/open_addressing/open_addressing_impl.cuh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class open_addressing_impl {
342342

343343
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
344344

345-
detail::insert_if_n<cg_size, cuco::detail::default_block_size()>
345+
open_addressing_ns::detail::insert_if_n<cg_size, cuco::detail::default_block_size()>
346346
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
347347
first, num_keys, stencil, pred, counter.data(), container_ref);
348348

@@ -384,7 +384,7 @@ class open_addressing_impl {
384384

385385
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
386386

387-
detail::insert_if_n<cg_size, cuco::detail::default_block_size()>
387+
open_addressing_ns::detail::insert_if_n<cg_size, cuco::detail::default_block_size()>
388388
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
389389
first, num_keys, stencil, pred, container_ref);
390390
}
@@ -426,7 +426,7 @@ class open_addressing_impl {
426426

427427
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
428428

429-
detail::insert_and_find<cg_size, cuco::detail::default_block_size()>
429+
open_addressing_ns::detail::insert_and_find<cg_size, cuco::detail::default_block_size()>
430430
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
431431
first, num_keys, found_begin, inserted_begin, container_ref);
432432
}
@@ -466,7 +466,7 @@ class open_addressing_impl {
466466

467467
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
468468

469-
detail::erase<cg_size, cuco::detail::default_block_size()>
469+
open_addressing_ns::detail::erase<cg_size, cuco::detail::default_block_size()>
470470
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
471471
first, num_keys, container_ref);
472472
}
@@ -540,7 +540,7 @@ class open_addressing_impl {
540540

541541
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
542542

543-
detail::contains_if_n<cg_size, cuco::detail::default_block_size()>
543+
open_addressing_ns::detail::contains_if_n<cg_size, cuco::detail::default_block_size()>
544544
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
545545
first, num_keys, stencil, pred, output_begin, container_ref);
546546
}
@@ -615,7 +615,7 @@ class open_addressing_impl {
615615

616616
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
617617

618-
detail::find_if_n<cg_size, cuco::detail::default_block_size()>
618+
open_addressing_ns::detail::find_if_n<cg_size, cuco::detail::default_block_size()>
619619
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
620620
first, num_keys, stencil, pred, output_begin, container_ref);
621621
}
@@ -886,7 +886,7 @@ class open_addressing_impl {
886886

887887
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
888888

889-
detail::for_each_n<cg_size, cuco::detail::default_block_size()>
889+
open_addressing_ns::detail::for_each_n<cg_size, cuco::detail::default_block_size()>
890890
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
891891
first, num_keys, std::forward<CallbackOp>(callback_op), container_ref);
892892
}
@@ -912,7 +912,7 @@ class open_addressing_impl {
912912

913913
// TODO: custom kernel to be replaced by cub::DeviceReduce::Sum when cub version is bumped to
914914
// v2.1.0
915-
detail::size<cuco::detail::default_block_size()>
915+
open_addressing_ns::detail::size<cuco::detail::default_block_size()>
916916
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
917917
storage_.ref(), is_filled, counter.data());
918918

@@ -1017,7 +1017,7 @@ class open_addressing_impl {
10171017
auto const is_filled = open_addressing_ns::detail::slot_is_filled<has_payload, key_type>{
10181018
this->empty_key_sentinel(), this->erased_key_sentinel()};
10191019

1020-
detail::rehash<block_size><<<grid_size, block_size, 0, stream.get()>>>(
1020+
open_addressing_ns::detail::rehash<block_size><<<grid_size, block_size, 0, stream.get()>>>(
10211021
old_storage.ref(), container.ref(op::insert), is_filled);
10221022
}
10231023

@@ -1120,7 +1120,7 @@ class open_addressing_impl {
11201120

11211121
auto const grid_size = cuco::detail::grid_size(num_keys, cg_size);
11221122

1123-
detail::count<IsOuter, cg_size, cuco::detail::default_block_size()>
1123+
open_addressing_ns::detail::count<IsOuter, cg_size, cuco::detail::default_block_size()>
11241124
<<<grid_size, cuco::detail::default_block_size(), 0, stream.get()>>>(
11251125
first, num_keys, counter.data(), container_ref);
11261126

@@ -1180,8 +1180,9 @@ class open_addressing_impl {
11801180
auto constexpr grid_stride = 1;
11811181
auto const grid_size = cuco::detail::grid_size(n, cg_size, grid_stride, block_size);
11821182

1183-
detail::retrieve<IsOuter, block_size><<<grid_size, block_size, 0, stream.get()>>>(
1184-
first, n, output_probe, output_match, counter.data(), container_ref);
1183+
open_addressing_ns::detail::retrieve<IsOuter, block_size>
1184+
<<<grid_size, block_size, 0, stream.get()>>>(
1185+
first, n, output_probe, output_match, counter.data(), container_ref);
11851186

11861187
auto const num_retrieved = counter.load_to_host(stream.get());
11871188

0 commit comments

Comments
 (0)