libcudf  24.02.00
Public Member Functions | Public Attributes | List of all members
cudf::experimental::row::hash::element_hasher< hash_function, Nullate > Class Template Reference

Computes the hash value of an element in the given column. More...

Public Member Functions

 element_hasher (Nullate nulls, uint32_t seed=DEFAULT_HASH_SEED, hash_value_type null_hash=std::numeric_limits< hash_value_type >::max()) noexcept
 Constructs an element_hasher object. More...
 
template<typename T , CUDF_ENABLE_IF(column_device_view::has_element_accessor< T >()) >
hash_value_type operator() (column_device_view const &col, size_type row_index) const noexcept
 Returns the hash value of the given element. More...
 
template<typename T , CUDF_ENABLE_IF(not column_device_view::has_element_accessor< T >()) >
hash_value_type operator() (column_device_view const &col, size_type row_index) const noexcept
 Returns the hash value of the given element. More...
 

Public Attributes

Nullate _check_nulls
 Whether to check for nulls.
 
uint32_t _seed
 The seed to use for hashing.
 
hash_value_type _null_hash
 Hash value to use for null elements.
 

Detailed Description

template<template< typename > class hash_function, typename Nullate>
class cudf::experimental::row::hash::element_hasher< hash_function, Nullate >

Computes the hash value of an element in the given column.

Template Parameters
hash_functionHash functor to use for hashing elements.
NullateA cudf::nullate type describing whether to check for nulls.

Definition at line 1800 of file experimental/row_operators.cuh.

Constructor & Destructor Documentation

◆ element_hasher()

template<template< typename > class hash_function, typename Nullate >
cudf::experimental::row::hash::element_hasher< hash_function, Nullate >::element_hasher ( Nullate  nulls,
uint32_t  seed = DEFAULT_HASH_SEED,
hash_value_type  null_hash = std::numeric_limits<hash_value_type>::max() 
)
inlinenoexcept

Constructs an element_hasher object.

Parameters
nullsIndicates whether to check for nulls
seedThe seed to use for the hash function
null_hashThe hash value to use for nulls

Definition at line 1809 of file experimental/row_operators.cuh.

Member Function Documentation

◆ operator()() [1/2]

template<template< typename > class hash_function, typename Nullate >
template<typename T , CUDF_ENABLE_IF(column_device_view::has_element_accessor< T >()) >
hash_value_type cudf::experimental::row::hash::element_hasher< hash_function, Nullate >::operator() ( column_device_view const &  col,
size_type  row_index 
) const
inlinenoexcept

Returns the hash value of the given element.

Template Parameters
TThe type of the element to hash
Parameters
colThe column to hash
row_indexThe index of the row to hash
Returns
The hash value of the given element

Definition at line 1826 of file experimental/row_operators.cuh.

◆ operator()() [2/2]

template<template< typename > class hash_function, typename Nullate >
template<typename T , CUDF_ENABLE_IF(not column_device_view::has_element_accessor< T >()) >
hash_value_type cudf::experimental::row::hash::element_hasher< hash_function, Nullate >::operator() ( column_device_view const &  col,
size_type  row_index 
) const
inlinenoexcept

Returns the hash value of the given element.

Template Parameters
TThe type of the element to hash
Parameters
colThe column to hash
row_indexThe index of the row to hash
Returns
The hash value of the given element

Definition at line 1842 of file experimental/row_operators.cuh.


The documentation for this class was generated from the following file: