2020#include < cuco/extent.cuh>
2121
2222#include < cuda/std/array>
23+ #include < cuda/std/cstddef>
2324#include < cuda/std/type_traits>
2425
25- #include < cstddef>
2626#include < cstdint>
2727
2828namespace cuco ::detail {
@@ -146,7 +146,7 @@ struct MurmurHash3_32 {
146146 */
147147 constexpr result_type __host__ __device__ operator ()(Key const & key) const noexcept
148148 {
149- return compute_hash (reinterpret_cast <std::byte const *>(&key),
149+ return compute_hash (reinterpret_cast <cuda:: std::byte const *>(&key),
150150 cuco::extent<std::size_t , sizeof (Key)>{});
151151 }
152152
@@ -160,7 +160,7 @@ struct MurmurHash3_32 {
160160 * @return The resulting hash value
161161 */
162162 template <typename Extent>
163- constexpr result_type __host__ __device__ compute_hash (std::byte const * bytes,
163+ constexpr result_type __host__ __device__ compute_hash (cuda:: std::byte const * bytes,
164164 Extent size) const noexcept
165165 {
166166 auto const nblocks = size / 4 ;
@@ -183,10 +183,14 @@ struct MurmurHash3_32 {
183183 // tail
184184 std::uint32_t k1 = 0 ;
185185 switch (size & 3 ) {
186- case 3 : k1 ^= std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 2 ]) << 16 ; [[fallthrough]];
187- case 2 : k1 ^= std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 1 ]) << 8 ; [[fallthrough]];
186+ case 3 :
187+ k1 ^= cuda::std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 2 ]) << 16 ;
188+ [[fallthrough]];
189+ case 2 :
190+ k1 ^= cuda::std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 1 ]) << 8 ;
191+ [[fallthrough]];
188192 case 1 :
189- k1 ^= std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 0 ]);
193+ k1 ^= cuda:: std::to_integer<std::uint32_t >(bytes[nblocks * 4 + 0 ]);
190194 k1 *= c1;
191195 k1 = rotl32 (k1, 15 );
192196 k1 *= c2;
@@ -247,7 +251,7 @@ struct MurmurHash3_x64_128 {
247251 */
248252 constexpr result_type __host__ __device__ operator ()(Key const & key) const noexcept
249253 {
250- return compute_hash (reinterpret_cast <std::byte const *>(&key),
254+ return compute_hash (reinterpret_cast <cuda:: std::byte const *>(&key),
251255 cuco::extent<std::size_t , sizeof (Key)>{});
252256 }
253257
@@ -261,7 +265,7 @@ struct MurmurHash3_x64_128 {
261265 * @return The resulting hash value
262266 */
263267 template <typename Extent>
264- constexpr result_type __host__ __device__ compute_hash (std::byte const * bytes,
268+ constexpr result_type __host__ __device__ compute_hash (cuda:: std::byte const * bytes,
265269 Extent size) const noexcept
266270 {
267271 constexpr std::uint32_t block_size = 16 ;
@@ -390,7 +394,7 @@ struct MurmurHash3_x86_128 {
390394 */
391395 constexpr result_type __host__ __device__ operator ()(Key const & key) const noexcept
392396 {
393- return compute_hash (reinterpret_cast <std::byte const *>(&key),
397+ return compute_hash (reinterpret_cast <cuda:: std::byte const *>(&key),
394398 cuco::extent<std::size_t , sizeof (Key)>{});
395399 }
396400
@@ -404,7 +408,7 @@ struct MurmurHash3_x86_128 {
404408 * @return The resulting hash value
405409 */
406410 template <typename Extent>
407- constexpr result_type __host__ __device__ compute_hash (std::byte const * bytes,
411+ constexpr result_type __host__ __device__ compute_hash (cuda:: std::byte const * bytes,
408412 Extent size) const noexcept
409413 {
410414 constexpr std::uint32_t block_size = 16 ;
0 commit comments