All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Friends | List of all members
cudf::host_udf_base Class Referenceabstract

The fundamental interface for host-based UDF implementation. More...

#include <host_udf.hpp>

Inheritance diagram for cudf::host_udf_base:
cudf::groupby_host_udf cudf::reduce_host_udf cudf::segmented_reduce_host_udf

Public Member Functions

virtual ~host_udf_base ()=default
 Default destructor.
 
virtual std::size_t do_hash () const
 Computes hash value of the instance. More...
 
virtual bool is_equal (host_udf_base const &other) const =0
 Compares two instances of the derived class for equality. More...
 
virtual std::unique_ptr< host_udf_baseclone () const =0
 Clones the instance. More...
 

Friends

struct reduce_host_udf
 
struct segmented_reduce_host_udf
 
struct groupby_host_udf
 

Detailed Description

The fundamental interface for host-based UDF implementation.

This class declares the functions do_hash, is_equal, and clone that must be defined in the users' UDF implementation. These functions are required for libcudf aggregation framework to perform its operations.

Definition at line 50 of file host_udf.hpp.

Member Function Documentation

◆ clone()

virtual std::unique_ptr<host_udf_base> cudf::host_udf_base::clone ( ) const
pure virtual

Clones the instance.

The instances of the derived class should be lightweight for efficient cloning.

Returns
A new instance cloned from this one

◆ do_hash()

virtual std::size_t cudf::host_udf_base::do_hash ( ) const
inlinevirtual

Computes hash value of the instance.

Overriding this function is optional when the derived class has data members such that each instance needs to be differentiated from each other.

Returns
The hash value of the instance

Definition at line 71 of file host_udf.hpp.

◆ is_equal()

virtual bool cudf::host_udf_base::is_equal ( host_udf_base const &  other) const
pure virtual

Compares two instances of the derived class for equality.

Parameters
otherThe other instance to compare with
Returns
True if the two instances are equal

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