Skip to content

Commit

Permalink
Remove empty key sentinel
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeepyjack committed Oct 4, 2023
1 parent 5917786 commit dc71ba0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <cuco/extent.cuh>
#include <cuco/pair.cuh>
#include <cuco/probing_scheme.cuh>
#include <cuco/sentinel.cuh>

#include <thrust/distance.h>
#include <thrust/pair.h>
Expand Down Expand Up @@ -120,20 +119,18 @@ class open_addressing_ref_impl {
/**
* @brief Constructs open_addressing_ref_impl.
*
* @param empty_key_sentinel The reserved key value for empty slots
* @param empty_slot_sentinel Sentinel indicating an empty slot
* @param predicate Key equality binary callable
* @param probing_scheme Probing scheme
* @param storage_ref Non-owning ref of slot storage
*/
__host__ __device__ explicit constexpr open_addressing_ref_impl(
cuco::empty_key<key_type> empty_key_sentinel,
value_type empty_slot_sentinel,
key_equal const& predicate,
probing_scheme_type const& probing_scheme,
storage_ref_type storage_ref) noexcept
: empty_slot_sentinel_{empty_slot_sentinel},
predicate_{empty_key_sentinel, predicate},
predicate_{this->extract_key(empty_slot_sentinel), predicate},
probing_scheme_{probing_scheme},
storage_ref_{storage_ref}
{
Expand Down
3 changes: 1 addition & 2 deletions include/cuco/detail/static_map/static_map_ref.inl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ __host__ __device__ constexpr static_map_ref<
KeyEqual const& predicate,
ProbingScheme const& probing_scheme,
StorageRef storage_ref) noexcept
: impl_{empty_key_sentinel,
cuco::pair{empty_key_sentinel, empty_value_sentinel},
: impl_{cuco::pair{empty_key_sentinel, empty_value_sentinel},
predicate,
probing_scheme,
storage_ref},
Expand Down
2 changes: 1 addition & 1 deletion include/cuco/detail/static_set/static_set_ref.inl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ __host__ __device__ constexpr static_set_ref<
KeyEqual const& predicate,
ProbingScheme const& probing_scheme,
StorageRef storage_ref) noexcept
: impl_{empty_key_sentinel, empty_key_sentinel, predicate, probing_scheme, storage_ref}
: impl_{empty_key_sentinel, predicate, probing_scheme, storage_ref}
{
}

Expand Down

0 comments on commit dc71ba0

Please sign in to comment.