libcudf  23.12.00
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cudf::dictionary_wrapper< IndexType > Struct Template Reference

A strongly typed wrapper for indices in a DICTIONARY type column. More...

#include <dictionary.hpp>

Public Types

using value_type = IndexType
 The underlying type of the dictionary.
 

Public Member Functions

 dictionary_wrapper (dictionary_wrapper &&)=default
 Move constructor.
 
 dictionary_wrapper (dictionary_wrapper const &)=default
 Copy constructor.
 
dictionary_wrapperoperator= (dictionary_wrapper &&)=default
 Move assignment operator. More...
 
dictionary_wrapperoperator= (dictionary_wrapper const &)=default
 Copy assignment operator. More...
 
constexpr CUDF_HOST_DEVICE dictionary_wrapper (value_type v)
 Construct dictionary_wrapper from a value. More...
 
CUDF_HOST_DEVICE operator value_type () const
 Conversion operator. More...
 
CUDF_HOST_DEVICE value_type value () const
 Simple accessor. More...
 

Static Public Member Functions

static constexpr CUDF_HOST_DEVICE value_type max_value ()
 Returns the maximum value of the value type. More...
 
static constexpr CUDF_HOST_DEVICE value_type min_value ()
 Returns the minimum value of the value type. More...
 
static constexpr CUDF_HOST_DEVICE value_type lowest_value ()
 Returns the lowest value of the value type. More...
 

Detailed Description

template<typename IndexType>
struct cudf::dictionary_wrapper< IndexType >

A strongly typed wrapper for indices in a DICTIONARY type column.

IndexType will be integer types like int32_t.

For example, dictionary32 is a strongly typed wrapper around an int32_t value that holds the offset into the dictionary keys for a specific element.

This wrapper provides common conversion and comparison operations for the IndexType.

Definition at line 48 of file dictionary.hpp.

Constructor & Destructor Documentation

◆ dictionary_wrapper()

template<typename IndexType >
constexpr CUDF_HOST_DEVICE cudf::dictionary_wrapper< IndexType >::dictionary_wrapper ( value_type  v)
inlineexplicitconstexpr

Construct dictionary_wrapper from a value.

Parameters
vThe value to construct the dictionary_wrapper from

Definition at line 75 of file dictionary.hpp.

Member Function Documentation

◆ lowest_value()

template<typename IndexType >
static constexpr CUDF_HOST_DEVICE value_type cudf::dictionary_wrapper< IndexType >::lowest_value ( )
inlinestaticconstexpr

Returns the lowest value of the value type.

Returns
The lowest value of the value type

Definition at line 116 of file dictionary.hpp.

◆ max_value()

template<typename IndexType >
static constexpr CUDF_HOST_DEVICE value_type cudf::dictionary_wrapper< IndexType >::max_value ( )
inlinestaticconstexpr

Returns the maximum value of the value type.

Returns
The maximum value of the value type

Definition at line 96 of file dictionary.hpp.

◆ min_value()

template<typename IndexType >
static constexpr CUDF_HOST_DEVICE value_type cudf::dictionary_wrapper< IndexType >::min_value ( )
inlinestaticconstexpr

Returns the minimum value of the value type.

Returns
The minimum value of the value type

Definition at line 106 of file dictionary.hpp.

◆ operator value_type()

template<typename IndexType >
CUDF_HOST_DEVICE cudf::dictionary_wrapper< IndexType >::operator value_type ( ) const
inlineexplicit

Conversion operator.

Returns
The value of this dictionary wrapper

Definition at line 82 of file dictionary.hpp.

◆ operator=() [1/2]

template<typename IndexType >
dictionary_wrapper& cudf::dictionary_wrapper< IndexType >::operator= ( dictionary_wrapper< IndexType > &&  )
default

Move assignment operator.

Returns
The reference to this dictionary wrapper object

◆ operator=() [2/2]

template<typename IndexType >
dictionary_wrapper& cudf::dictionary_wrapper< IndexType >::operator= ( dictionary_wrapper< IndexType > const &  )
default

Copy assignment operator.

Returns
The reference to this dictionary wrapper object

◆ value()

template<typename IndexType >
CUDF_HOST_DEVICE value_type cudf::dictionary_wrapper< IndexType >::value ( ) const
inline

Simple accessor.

Returns
The value of this dictionary wrapper

Definition at line 89 of file dictionary.hpp.


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