Skip to content

Commit 22fb1db

Browse files
committed
Fix the HLL type deduction bug
1 parent 94693e2 commit 22fb1db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/cuco/detail/hyperloglog/hyperloglog_impl.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ namespace cuco::detail {
5454
template <class T, cuda::thread_scope Scope, class Hash>
5555
class hyperloglog_impl {
5656
// We use `int` here since this is the smallest type that supports native `atomicMax` on GPUs
57-
using fp_type = double; ///< Floating point type used for reduction
58-
using hash_value_type =
59-
decltype(cuda::std::declval<Hash>()(cuda::std::declval<T>())); ///< Hash value type
57+
using fp_type = double; ///< Floating point type used for reduction
58+
using hash_value_type = cuda::std::remove_cvref_t<decltype(cuda::std::declval<Hash>()(
59+
cuda::std::declval<T>()))>; ///< Hash value type
6060
public:
6161
static constexpr auto thread_scope = Scope; ///< CUDA thread scope
6262

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ ConfigureTest(DYNAMIC_BITSET_TEST
146146
ConfigureTest(HYPERLOGLOG_TEST
147147
hyperloglog/unique_sequence_test.cu
148148
hyperloglog/spark_parity_test.cu
149-
hyperloglog/device_ref_test.cu)
149+
hyperloglog/device_ref_test.cu
150+
hyperloglog/type_deduction_test.cu)
150151

151152
###################################################################################################
152153
# - bloom_filter ----------------------------------------------------------------------------------

0 commit comments

Comments
 (0)