The fundamental interface for host-based UDF implementation. More...
#include <host_udf.hpp>
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_base > | clone () const =0 |
Clones the instance. More... | |
Friends | |
struct | reduce_host_udf |
struct | segmented_reduce_host_udf |
struct | groupby_host_udf |
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.
|
pure virtual |
Clones the instance.
The instances of the derived class should be lightweight for efficient cloning.
|
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.
Definition at line 71 of file host_udf.hpp.
|
pure virtual |
Compares two instances of the derived class for equality.
other | The other instance to compare with |