minhash.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION.
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 {
61 std::unique_ptr<cudf::column> minhash(
62  cudf::strings_column_view const& input,
63  uint32_t seed,
66  cudf::size_type width,
69 
108 std::unique_ptr<cudf::column> minhash64(
109  cudf::strings_column_view const& input,
110  uint64_t seed,
113  cudf::size_type width,
116 
155 std::unique_ptr<cudf::column> minhash_ngrams(
156  cudf::lists_column_view const& input,
157  cudf::size_type ngrams,
158  uint32_t seed,
163 
202 std::unique_ptr<cudf::column> minhash64_ngrams(
203  cudf::lists_column_view const& input,
204  cudf::size_type ngrams,
205  uint64_t seed,
210  // end of group
212 } // 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.
detail::cccl_async_resource_ref< 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.
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
Class definition for cudf::lists_column_view.
NVText APIs.
Class definitions for cudf::scalar.
APIs for spans.
Class definition for cudf::strings_column_view.
Device version of C++20 std::span with reduced feature set.
Definition: span.hpp:323