Classes | Public Types | Public Member Functions | Public Attributes | List of all members
cudf::host_udf_base::data_attribute Struct Reference

Describe possible data that may be needed in the derived class for its operations. More...

#include <host_udf.hpp>

Classes

struct  equal_to
 Equality comparison functor for data_attribute. More...
 
struct  hash
 Hash functor for data_attribute. More...
 

Public Types

using value_type = std::variant< groupby_data_attribute, std::unique_ptr< aggregation > >
 Hold all possible data types for the input of the aggregation in the derived class.
 

Public Member Functions

 data_attribute ()=default
 Default constructor.
 
 data_attribute (data_attribute &&)=default
 Move constructor.
 
template<typename T , CUDF_ENABLE_IF(std::is_same_v< T, groupby_data_attribute >) >
 data_attribute (T value_)
 Construct a new data attribute from an aggregation attribute. More...
 
template<typename T , CUDF_ENABLE_IF(std::is_same_v< T, aggregation >|| std::is_same_v< T, groupby_aggregation >) >
 data_attribute (std::unique_ptr< T > value_)
 Construct a new data attribute from another aggregation request. More...
 
 data_attribute (data_attribute const &other)
 Copy constructor. More...
 

Public Attributes

value_type value
 

Detailed Description

Describe possible data that may be needed in the derived class for its operations.

Such data can be either intermediate data such as sorted values or group labels etc, or the results of other aggregations.

Each derived host-based UDF class may need a different set of data. It is inefficient to evaluate and pass down all these possible data at once from libcudf. A solution for that is, the derived class can define a subset of data that it needs and libcudf will evaluate and pass down only data requested from that set.

Definition at line 130 of file host_udf.hpp.

Constructor & Destructor Documentation

◆ data_attribute() [1/3]

template<typename T , CUDF_ENABLE_IF(std::is_same_v< T, groupby_data_attribute >) >
cudf::host_udf_base::data_attribute::data_attribute ( value_)
inline

Construct a new data attribute from an aggregation attribute.

Parameters
value_An aggregation attribute

Definition at line 146 of file host_udf.hpp.

◆ data_attribute() [2/3]

template<typename T , CUDF_ENABLE_IF(std::is_same_v< T, aggregation >|| std::is_same_v< T, groupby_aggregation >) >
cudf::host_udf_base::data_attribute::data_attribute ( std::unique_ptr< T >  value_)
inline

Construct a new data attribute from another aggregation request.

Parameters
value_An aggregation request

Definition at line 157 of file host_udf.hpp.

◆ data_attribute() [3/3]

cudf::host_udf_base::data_attribute::data_attribute ( data_attribute const &  other)

Copy constructor.

Parameters
otherThe other data attribute to copy from

Member Data Documentation

◆ value

value_type cudf::host_udf_base::data_attribute::value

The actual data attribute, wrapped by this struct as a wrapper is needed to define hash and equal_to functors.

Definition at line 135 of file host_udf.hpp.


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