diff --git a/include/cuco/detail/hash_functions/utils.cuh b/include/cuco/detail/hash_functions/utils.cuh index a50779f23..37e279ba7 100644 --- a/include/cuco/detail/hash_functions/utils.cuh +++ b/include/cuco/detail/hash_functions/utils.cuh @@ -21,8 +21,10 @@ namespace cuco::detail { template constexpr __host__ __device__ T load_chunk(U const* const data, Extent index) noexcept { - auto const chunks = reinterpret_cast(data); - return chunks[index]; + auto const bytes = reinterpret_cast(data); + T chunk; + memcpy(&chunk, bytes + index * sizeof(T), sizeof(T)); + return chunk; } }; // namespace cuco::detail \ No newline at end of file