Skip to content

Commit

Permalink
Add is_double_hashing trait
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Aug 19, 2024
1 parent 5e0cfce commit 7e75cd0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions include/cuco/probing_scheme.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <cuco/detail/probing_scheme/probing_scheme_base.cuh>
#include <cuco/pair.cuh>

#include <cuda/std/type_traits>

#include <cooperative_groups.h>

namespace cuco {
Expand Down Expand Up @@ -198,6 +200,24 @@ class double_hashing : private detail::probing_scheme_base<CGSize> {
Hash2 hash2_;
};

/**
* @brief Trait indicating whether the given probing scheme is of `double_hashing` type or not
*
* @tparam T Input probing scheme type
*/
template <typename T>
struct is_double_hashing : cuda::std::false_type {};

/**
* @brief Trait indicating whether the given probing scheme is of `double_hashing` type or not
*
* @tparam CGSize Size of CUDA Cooperative Groups
* @tparam Hash1 Unary callable type
* @tparam Hash2 Unary callable type
*/
template <int32_t CGSize, typename Hash1, typename Hash2>
struct is_double_hashing<cuco::double_hashing<CGSize, Hash1, Hash2>> : cuda::std::true_type {};

} // namespace cuco

#include <cuco/detail/probing_scheme/probing_scheme_impl.inl>

0 comments on commit 7e75cd0

Please sign in to comment.