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

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

Public Member Functions

 pair_accessor (column_device_view const &_col)
 constructor More...
 
thrust::pair< T, 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_accessor< T, has_nulls >

pair accessor of column with/without null bitmask

A unary functor returns pair with 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 1353 of file column_device_view.cuh.

Constructor & Destructor Documentation

◆ pair_accessor()

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

constructor

Parameters
[in]_colcolumn device view of cudf column

Definition at line 1361 of file column_device_view.cuh.

Member Function Documentation

◆ operator()()

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

Pair accessor.

Parameters
[in]iindex of the element
Returns
pair(element, validity)

Definition at line 1373 of file column_device_view.cuh.


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