Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the probing scheme header #583

Merged
merged 3 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/cuco/detail/utils.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#pragma once

#include <cuco/detail/__config>
#include <cuco/detail/bitwise_compare.cuh>

#include <cuda/std/array>
Expand Down
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>
Loading