Skip to content

Commit

Permalink
Use Value instead of InsertKey
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeepyjack committed Nov 22, 2023
1 parent b7ccda0 commit f933f72
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/cuco/detail/static_set/static_set_ref.inl
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ class operator_impl<op::insert_tag,
/**
* @brief Inserts an element.
*
* @tparam ProbeKey Input key type which is convertible to 'key_type'
* @tparam Value Input type which is convertible to 'value_type'
*
* @param value The element to insert
*
* @return True if the given element is successfully inserted
*/
template <typename ProbeKey>
__device__ bool insert(ProbeKey const& value) noexcept
template <typename Value>
__device__ bool insert(Value const& value) noexcept
{
ref_type& ref_ = static_cast<ref_type&>(*this);
return ref_.impl_.insert(value);
Expand All @@ -164,16 +164,16 @@ class operator_impl<op::insert_tag,
/**
* @brief Inserts an element.
*
* @tparam ProbeKey Input key type which is convertible to 'key_type'
* @tparam Value Input type which is convertible to 'value_type'
*
* @param group The Cooperative Group used to perform group insert
* @param value The element to insert
*
* @return True if the given element is successfully inserted
*/
template <typename ProbeKey>
template <typename Value>
__device__ bool insert(cooperative_groups::thread_block_tile<cg_size> const& group,
ProbeKey const& value) noexcept
Value const& value) noexcept
{
auto& ref_ = static_cast<ref_type&>(*this);
return ref_.impl_.insert(group, value);
Expand Down Expand Up @@ -232,15 +232,15 @@ class operator_impl<op::insert_and_find_tag,
* element that prevented the insertion) and a `bool` denoting whether the insertion took place or
* not.
*
* @tparam ProbeKey Input key type which is convertible to 'key_type'
* @tparam Value Input type which is convertible to 'value_type'
*
* @param value The element to insert
*
* @return a pair consisting of an iterator to the element and a bool indicating whether the
* insertion is successful or not.
*/
template <typename ProbeKey>
__device__ thrust::pair<iterator, bool> insert_and_find(ProbeKey const& value) noexcept
template <typename Value>
__device__ thrust::pair<iterator, bool> insert_and_find(Value const& value) noexcept
{
ref_type& ref_ = static_cast<ref_type&>(*this);
return ref_.impl_.insert_and_find(value);
Expand All @@ -253,17 +253,17 @@ class operator_impl<op::insert_and_find_tag,
* element that prevented the insertion) and a `bool` denoting whether the insertion took place or
* not.
*
* @tparam ProbeKey Input key type which is convertible to 'key_type'
* @tparam Value Input type which is convertible to 'value_type'
*
* @param group The Cooperative Group used to perform group insert_and_find
* @param value The element to insert
*
* @return a pair consisting of an iterator to the element and a bool indicating whether the
* insertion is successful or not.
*/
template <typename ProbeKey>
template <typename Value>
__device__ thrust::pair<iterator, bool> insert_and_find(
cooperative_groups::thread_block_tile<cg_size> const& group, ProbeKey const& value) noexcept
cooperative_groups::thread_block_tile<cg_size> const& group, Value const& value) noexcept
{
ref_type& ref_ = static_cast<ref_type&>(*this);
return ref_.impl_.insert_and_find(group, value);
Expand Down

0 comments on commit f933f72

Please sign in to comment.