libcudf  24.02.00
Public Types | List of all members
cudf::experimental::dispatch_void_if_nested< t > Struct Template Reference

A map from cudf::type_id to cudf type that excludes LIST and STRUCT types. More...

Public Types

using type = std::conditional_t< t==type_id::STRUCT or t==type_id::LIST, void, id_to_type< t > >
 The type to dispatch to if the type is nested.
 

Detailed Description

template<cudf::type_id t>
struct cudf::experimental::dispatch_void_if_nested< t >

A map from cudf::type_id to cudf type that excludes LIST and STRUCT types.

To be used with type_dispatcher in place of the default map, when it is required that STRUCT and LIST map to void. This is useful when we want to avoid recursion in a functor. For example, in element_comparator, we have a specialization for STRUCT but the type_dispatcher in it is only used to dispatch to the same functor for non-nested types. Even when we're guaranteed to not have non-nested types at that point, the compiler doesn't know this and would try to create recursive code which is very slow.

Usage:

type_dispatcher<dispatch_nested_to_void>(data_type(), functor{});

Definition at line 78 of file experimental/row_operators.cuh.


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