Classes | Namespaces | Macros | Typedefs | Functions
type_dispatcher.hpp File Reference

Defines the mapping between cudf::type_id runtime type information and concrete C++ types. More...

#include <cudf/detail/utilities/assert.cuh>
#include <cudf/fixed_point/fixed_point.hpp>
#include <cudf/types.hpp>
#include <cudf/utilities/error.hpp>
#include <cudf/wrappers/dictionary.hpp>
#include <cudf/wrappers/durations.hpp>
#include <cudf/wrappers/timestamps.hpp>
#include <string>

Go to the source code of this file.

Classes

struct  cudf::type_to_name
 
struct  cudf::dispatch_storage_type< Id >
 Use this specialization on type_dispatcher whenever you only need to operate on the underlying stored type. More...
 
struct  cudf::detail::double_type_dispatcher_second_type< T1 >
 
struct  cudf::detail::double_type_dispatcher_first_type< IdTypeMap >
 

Namespaces

 cudf
 cuDF interfaces
 

Macros

#define CUDF_TYPE_MAPPING(Type, Id)
 Macro used to define a mapping between a concrete C++ type and a cudf::type_id enum. More...
 
#define MAP_NUMERIC_SCALAR(Type)
 Macro used to define scalar type and scalar device type for cudf::numeric_scalar template class for numeric C++ types. More...
 
#define MAP_TIMESTAMP_SCALAR(Type)
 Macro used to define scalar type and scalar device type for cudf::timestamp_scalar template class for timestamp C++ types. More...
 
#define MAP_DURATION_SCALAR(Type)
 Macro used to define scalar type and scalar device type for cudf::duration_scalar template class for duration C++ types. More...
 

Typedefs

template<cudf::type_id Id>
using cudf::id_to_type = typename id_to_type_impl< Id >::type
 Maps a cudf::type_id to it's corresponding concrete C++ type. More...
 
template<typename T >
using cudf::device_storage_type_t = std::conditional_t< std::is_same_v< numeric::decimal32, T >, int32_t, std::conditional_t< std::is_same_v< numeric::decimal64, T >, int64_t, std::conditional_t< std::is_same_v< numeric::decimal128, T >, __int128_t, T > >>
 "Returns" the corresponding type that is stored on the device when using cudf::column More...
 
template<typename T >
using cudf::scalar_type_t = typename type_to_scalar_type_impl< T >::ScalarType
 Maps a C++ type to the scalar type required to hold its value. More...
 
template<typename T >
using cudf::scalar_device_type_t = typename type_to_scalar_type_impl< T >::ScalarDeviceType
 

Functions

template<typename T >
constexpr type_id cudf::type_to_id ()
 Maps a C++ type to it's corresponding cudf::type_id More...
 
template<typename T >
constexpr bool cudf::type_id_matches_device_storage_type (type_id id)
 Checks if fixed_point-like types have template type T matching the column's stored type id. More...
 
constexpr bool cudf::is_fixed_point (cudf::type_id id)
 Checks if id is fixed_point (DECIMAL32/64/128) More...
 
template<template< cudf::type_id > typename IdTypeMap = id_to_type_impl, typename Functor , typename... Ts>
CUDF_HOST_DEVICE constexpr decltype(auto) __forceinline__ cudf::type_dispatcher (cudf::data_type dtype, Functor f, Ts &&... args)
 Invokes an operator() template with the type instantiation based on the specified cudf::data_type's id(). More...
 
template<template< cudf::type_id > typename IdTypeMap = id_to_type_impl, typename F , typename... Ts>
CUDF_HOST_DEVICE constexpr decltype(auto) __forceinline__ cudf::double_type_dispatcher (cudf::data_type type1, cudf::data_type type2, F &&f, Ts &&... args)
 Dispatches two type template parameters to a callable. More...
 

Detailed Description

Defines the mapping between cudf::type_id runtime type information and concrete C++ types.

Definition in file type_dispatcher.hpp.