The interface for host-based UDF implementation for reduction contexts. More...
#include <host_udf.hpp>
Public Member Functions | |
virtual std::unique_ptr< scalar > | operator() (column_view const &input, data_type output_dtype, std::optional< std::reference_wrapper< scalar const >> init, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) const =0 |
Perform reduction operations. More... | |
![]() | |
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... | |
The interface for host-based UDF implementation for reduction contexts.
An implementation of host-based UDF for reduction needs to be derived from this class. In addition to implementing the virtual functions declared in the base class host_udf_base
, such derived classes must also define the operator()
function to perform reduction operations.
Example:
Definition at line 131 of file host_udf.hpp.
|
pure virtual |
Perform reduction operations.
input | The input column for reduction |
output_dtype | The data type for the final output scalar |
init | The initial value of the reduction |
stream | The CUDA stream to use for any kernel launches |
mr | Device memory resource to use for any allocations |