Skip to content

Commit f5ec677

Browse files
committed
Reorder header groups + remove unused counter allocator
1 parent 412b7f9 commit f5ec677

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

include/cuco/detail/dynamic_map.inl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ dynamic_map<Key, Value, Scope, Allocator>::dynamic_map(
3030
capacity_(initial_capacity),
3131
min_insert_size_(1E4),
3232
max_load_factor_(0.60),
33-
alloc_{alloc},
34-
counter_allocator_{alloc}
33+
alloc_{alloc}
3534
{
3635
submaps_.push_back(std::make_unique<static_map<Key, Value, Scope, Allocator>>(
3736
initial_capacity,
@@ -59,8 +58,7 @@ dynamic_map<Key, Value, Scope, Allocator>::dynamic_map(
5958
capacity_(initial_capacity),
6059
min_insert_size_(1E4),
6160
max_load_factor_(0.60),
62-
alloc_{alloc},
63-
counter_allocator_{alloc}
61+
alloc_{alloc}
6462
{
6563
CUCO_RUNTIME_EXPECTS(empty_key_sentinel_ != erased_key_sentinel_,
6664
"The empty key sentinel and erased key sentinel cannot be the same value.");

include/cuco/dynamic_map.cuh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
#include <cuco/hash_functions.cuh>
2222
#include <cuco/sentinel.cuh>
2323
#include <cuco/static_map.cuh>
24-
#include <cuda/std/atomic>
24+
2525
#include <thrust/device_vector.h>
2626
#include <thrust/functional.h>
2727

28+
#include <cuda/std/atomic>
29+
2830
#include <cstddef>
2931
#include <memory>
3032
#include <type_traits>
@@ -109,8 +111,6 @@ class dynamic_map {
109111
using mutable_view_type =
110112
typename static_map<Key, Value, Scope>::device_mutable_view; ///< Type for submap mutable
111113
///< device view
112-
using counter_allocator_type = typename std::allocator_traits<Allocator>::rebind_alloc<
113-
atomic_ctr_type>; ///< Type of the allocator to (de)allocate atomic counters
114114

115115
dynamic_map(dynamic_map const&) = delete;
116116
dynamic_map(dynamic_map&&) = delete;
@@ -357,7 +357,6 @@ class dynamic_map {
357357
thrust::device_vector<atomic_ctr_type*>
358358
submap_num_successes_; ///< Number of successfully erased keys for each submap
359359
Allocator alloc_{}; ///< Allocator passed to submaps to allocate their device storage
360-
counter_allocator_type counter_allocator_{}; ///< Allocator used to allocate `num_successes_`
361360
};
362361
} // namespace cuco
363362

0 commit comments

Comments
 (0)