hashing.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/table/table.hpp>
9 #include <cudf/utilities/export.hpp>
11 
12 namespace CUDF_EXPORT cudf {
13 
18 using hash_value_type = uint32_t;
19 
24 static constexpr uint32_t DEFAULT_HASH_SEED = 0;
25 
27 namespace hashing {
28 
49 std::unique_ptr<column> murmurhash3_x86_32(
50  table_view const& input,
51  uint32_t seed = DEFAULT_HASH_SEED,
54 
68 std::unique_ptr<table> murmurhash3_x64_128(
69  table_view const& input,
70  uint64_t seed = DEFAULT_HASH_SEED,
73 
83 std::unique_ptr<column> md5(
84  table_view const& input,
87 
97 std::unique_ptr<column> sha1(
98  table_view const& input,
101 
111 std::unique_ptr<column> sha224(
112  table_view const& input,
115 
125 std::unique_ptr<column> sha256(
126  table_view const& input,
129 
139 std::unique_ptr<column> sha384(
140  table_view const& input,
143 
153 std::unique_ptr<column> sha512(
154  table_view const& input,
157 
172 std::unique_ptr<column> xxhash_32(
173  table_view const& input,
174  uint32_t seed = DEFAULT_HASH_SEED,
177 
190 std::unique_ptr<column> xxhash_64(
191  table_view const& input,
192  uint64_t seed = DEFAULT_HASH_SEED,
195  // end of group
197 
198 } // namespace hashing
199 
200 } // namespace CUDF_EXPORT cudf
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:189
std::unique_ptr< column > sha512(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the SHA-512 hash value of each row in the given table.
std::unique_ptr< column > murmurhash3_x86_32(table_view const &input, uint32_t seed=DEFAULT_HASH_SEED, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the MurmurHash3 32-bit hash value of each row in the given table.
std::unique_ptr< column > xxhash_64(table_view const &input, uint64_t seed=DEFAULT_HASH_SEED, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the XXHash_64 hash value of each row in the given table.
std::unique_ptr< column > sha224(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the SHA-224 hash value of each row in the given table.
std::unique_ptr< column > sha256(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the SHA-256 hash value of each row in the given table.
uint32_t hash_value_type
Type of hash value.
Definition: hashing.hpp:18
std::unique_ptr< column > md5(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the MD5 hash value of each row in the given table.
std::unique_ptr< table > murmurhash3_x64_128(table_view const &input, uint64_t seed=DEFAULT_HASH_SEED, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the MurmurHash3 64-bit hash value of each row in the given table.
std::unique_ptr< column > xxhash_32(table_view const &input, uint32_t seed=DEFAULT_HASH_SEED, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the XXHash_32 hash value of each row in the given table.
std::unique_ptr< column > sha1(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the SHA-1 hash value of each row in the given table.
std::unique_ptr< column > sha384(table_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Computes the SHA-384 hash value of each row in the given table.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::device_accessible > > device_async_resource_ref
cuDF interfaces
Definition: host_udf.hpp:26
Class definition for cudf::table.
Class definitions for (mutable)_table_view