hashing.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
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 
17 namespace CUDF_EXPORT cudf {
18 
23 using hash_value_type = uint32_t;
24 
29 static constexpr uint32_t DEFAULT_HASH_SEED = 0;
30 
32 namespace hashing {
33 
53 std::unique_ptr<column> murmurhash3_x86_32(
54  table_view const& input,
55  uint32_t seed = DEFAULT_HASH_SEED,
58 
72 std::unique_ptr<table> murmurhash3_x64_128(
73  table_view const& input,
74  uint64_t seed = DEFAULT_HASH_SEED,
77 
87 std::unique_ptr<column> md5(
88  table_view const& input,
91 
101 std::unique_ptr<column> sha1(
102  table_view const& input,
105 
115 std::unique_ptr<column> sha224(
116  table_view const& input,
119 
129 std::unique_ptr<column> sha256(
130  table_view const& input,
133 
143 std::unique_ptr<column> sha384(
144  table_view const& input,
147 
157 std::unique_ptr<column> sha512(
158  table_view const& input,
161 
176 std::unique_ptr<column> xxhash_32(
177  table_view const& input,
178  uint32_t seed = DEFAULT_HASH_SEED,
181 
194 std::unique_ptr<column> xxhash_64(
195  table_view const& input,
196  uint64_t seed = DEFAULT_HASH_SEED,
199  // end of group
201 
202 } // namespace hashing
203 
204 } // namespace CUDF_EXPORT cudf
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:206
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:23
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.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:26
Class definition for cudf::table.
Class definitions for (mutable)_table_view