minhash.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/column/column.hpp>
8 #include <cudf/hashing.hpp>
10 #include <cudf/scalar/scalar.hpp>
12 #include <cudf/utilities/export.hpp>
14 #include <cudf/utilities/span.hpp>
15 
16 namespace CUDF_EXPORT nvtext {
62 std::unique_ptr<cudf::column> minhash(
63  cudf::strings_column_view const& input,
64  uint32_t seed,
67  cudf::size_type width,
70 
109 std::unique_ptr<cudf::column> minhash64(
110  cudf::strings_column_view const& input,
111  uint64_t seed,
114  cudf::size_type width,
117 
156 std::unique_ptr<cudf::column> minhash_ngrams(
157  cudf::lists_column_view const& input,
158  cudf::size_type ngrams,
159  uint32_t seed,
164 
203 std::unique_ptr<cudf::column> minhash64_ngrams(
204  cudf::lists_column_view const& input,
205  cudf::size_type ngrams,
206  uint64_t seed,
211  // end of group
213 } // namespace CUDF_EXPORT nvtext
Given a column-view of lists type, an instance of this class provides a wrapper on this compound colu...
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
Class definition for cudf::column.
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
std::unique_ptr< cudf::column > minhash_ngrams(cudf::lists_column_view const &input, cudf::size_type ngrams, uint32_t seed, cudf::device_span< uint32_t const > parameter_a, cudf::device_span< uint32_t const > parameter_b, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the minhash values for each input row.
std::unique_ptr< cudf::column > minhash64(cudf::strings_column_view const &input, uint64_t seed, cudf::device_span< uint64_t const > parameter_a, cudf::device_span< uint64_t const > parameter_b, cudf::size_type width, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the minhash values for each string.
std::unique_ptr< cudf::column > minhash(cudf::strings_column_view const &input, uint32_t seed, cudf::device_span< uint32_t const > parameter_a, cudf::device_span< uint32_t const > parameter_b, cudf::size_type width, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the minhash values for each string.
std::unique_ptr< cudf::column > minhash64_ngrams(cudf::lists_column_view const &input, cudf::size_type ngrams, uint64_t seed, cudf::device_span< uint64_t const > parameter_a, cudf::device_span< uint64_t const > parameter_b, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Returns the minhash values for each input row.
cuda::std::span< T, Extent > device_span
Device span is an alias of cuda::std::span.
Definition: span.hpp:296
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
APIs for computing hash values of columns and tables using various hash algorithms.
Class definition for cudf::lists_column_view.
APIs for getting and setting the current device memory resource.
NVText APIs.
Class definitions for cudf::scalar.
APIs for spans.
Class definition for cudf::strings_column_view.