From 056eb79bb7d5dc893394d6730c2e2e2eb974e728 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Fri, 8 Nov 2024 08:43:03 -0500 Subject: [PATCH] fix shared-memory variable type --- cpp/include/nvtext/minhash.hpp | 4 ++-- cpp/src/text/minhash.cu | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/include/nvtext/minhash.hpp b/cpp/include/nvtext/minhash.hpp index 4ff863842a2..b2c1a23f57e 100644 --- a/cpp/include/nvtext/minhash.hpp +++ b/cpp/include/nvtext/minhash.hpp @@ -124,7 +124,7 @@ namespace CUDF_EXPORT nvtext { * @throw std::overflow_error if `parameter_a.size() * input.size()` exceeds the column size limit * * @param input Strings column to compute minhash - * @param seed Seed value used for the hash algorithm + * @param seed Seed value used for the hash algorithm * @param parameter_a Values used for the permuted calculation * @param parameter_b Values used for the permuted calculation * @param width The character width of substrings to hash for each row @@ -236,7 +236,7 @@ std::unique_ptr minhash_permuted( * @throw std::overflow_error if `parameter_a.size() * input.size()` exceeds the column size limit * * @param input Strings column to compute minhash - * @param seed Seed value used for the hash algorithm + * @param seed Seed value used for the hash algorithm * @param parameter_a Values used for the permuted calculation * @param parameter_b Values used for the permuted calculation * @param width The character width of substrings to hash for each row diff --git a/cpp/src/text/minhash.cu b/cpp/src/text/minhash.cu index 362672e74bb..aee83ab35ed 100644 --- a/cpp/src/text/minhash.cu +++ b/cpp/src/text/minhash.cu @@ -353,8 +353,7 @@ CUDF_KERNEL void minhash_permuted_kernel(cudf::column_device_view const d_string constexpr hash_value_type hash_max = std::numeric_limits::max(); // found to be an efficient shared memory size for both hash types - __shared__ char shmem[block_size * params_per_thread * sizeof(hash_value_type)]; - auto const block_values = reinterpret_cast(shmem); + __shared__ hash_value_type block_values[block_size * params_per_thread]; for (std::size_t i = 0; i < parameter_a.size(); i += params_per_thread) { // initialize this block's chunk of shared memory