The interface for host-based UDF implementation for segmented reduction context. More...
#include <host_udf.hpp>
Public Member Functions | |
virtual std::unique_ptr< column > | operator() (column_view const &input, device_span< size_type const > offsets, data_type output_dtype, null_policy null_handling, std::optional< std::reference_wrapper< scalar const >> init, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) const =0 |
Perform segmented 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 segmented reduction context.
An implementation of host-based UDF for segmented 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 class must also define the operator()
function to perform segmented reduction.
Example:
Definition at line 189 of file host_udf.hpp.
|
pure virtual |
Perform segmented reduction operations.
input | The input column for reduction |
offsets | A list of offsets defining the segments for reduction |
output_dtype | The data type for the final output column |
null_handling | If INCLUDE then the reduction result is valid only if all elements in the segment are valid, and if EXCLUDE then the reduction result is valid if any element in the segment is valid |
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 |