Public Types | Public Member Functions | Public Attributes | List of all members
cudf::detail::pair_rep_accessor< T, has_nulls > Struct Template Reference

pair accessor of column with/without null bitmask More...

Public Types

using rep_type = device_storage_type_t< T >
 representation type
 

Public Member Functions

 pair_rep_accessor (column_device_view const &_col)
 constructor More...
 
thrust::pair< rep_type, bool > operator() (cudf::size_type i) const
 Pair accessor. More...
 

Public Attributes

column_device_view const col
 column view of column in device
 

Detailed Description

template<typename T, bool has_nulls = false>
struct cudf::detail::pair_rep_accessor< T, has_nulls >

pair accessor of column with/without null bitmask

A unary functor returns pair with representative scalar value at id and boolean validity operator() (cudf::size_type id) computes element and returns a pair(element, validity)

the return value for element i will return pair(column[i], validity) validity is true if has_nulls=false. validity is validity of the element at i if has_nulls=true and the column is nullable.

Exceptions
cudf::logic_errorif has_nulls==true and the column is not nullable.
cudf::logic_errorif column datatype and template T type mismatch.
Template Parameters
TThe type of elements in the column
has_nullsboolean indicating to treat the column is nullable

Definition at line 1399 of file column_device_view.cuh.

Constructor & Destructor Documentation

◆ pair_rep_accessor()

template<typename T , bool has_nulls = false>
cudf::detail::pair_rep_accessor< T, has_nulls >::pair_rep_accessor ( column_device_view const &  _col)
inline

constructor

Parameters
[in]_colcolumn device view of cudf column

Definition at line 1409 of file column_device_view.cuh.

Member Function Documentation

◆ operator()()

template<typename T , bool has_nulls = false>
thrust::pair<rep_type, bool> cudf::detail::pair_rep_accessor< T, has_nulls >::operator() ( cudf::size_type  i) const
inline

Pair accessor.

Parameters
[in]iindex of element to access
Returns
pair of element and validity

Definition at line 1421 of file column_device_view.cuh.


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