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::id_to_type_impl< t >
 
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::type_to_scalar_type_impl< T >
 
struct  cudf::type_to_scalar_type_impl< std::string >
 
struct  cudf::type_to_scalar_type_impl< cudf::string_view >
 
struct  cudf::type_to_scalar_type_impl< numeric::decimal32 >
 
struct  cudf::type_to_scalar_type_impl< numeric::decimal64 >
 
struct  cudf::type_to_scalar_type_impl< cudf::dictionary32 >
 
struct  cudf::type_to_scalar_type_impl< cudf::list_view >
 
struct  cudf::type_to_scalar_type_impl< cudf::struct_view >
 
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)
 
#define MAP_TIMESTAMP_SCALAR(Type)
 
#define MAP_DURATION_SCALAR(Type)
 

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< numeric::decimal32, T >::value, int32_t, std::conditional_t< std::is_same< numeric::decimal64, T >::value, int64_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...
 
type_id cudf::device_storage_type_id (type_id id)
 Returns the corresponding type_id of type stored on device for a given type_id More...
 
template<typename T >
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...
 
 cudf::CUDF_TYPE_MAPPING (bool, type_id::BOOL8)
 Defines all of the mappings between C++ types and their corresponding cudf::type_id values.
 
 cudf::CUDF_TYPE_MAPPING (int8_t, type_id::INT8)
 
 cudf::CUDF_TYPE_MAPPING (int16_t, type_id::INT16)
 
 cudf::CUDF_TYPE_MAPPING (int32_t, type_id::INT32)
 
 cudf::CUDF_TYPE_MAPPING (int64_t, type_id::INT64)
 
 cudf::CUDF_TYPE_MAPPING (uint8_t, type_id::UINT8)
 
 cudf::CUDF_TYPE_MAPPING (uint16_t, type_id::UINT16)
 
 cudf::CUDF_TYPE_MAPPING (uint32_t, type_id::UINT32)
 
 cudf::CUDF_TYPE_MAPPING (uint64_t, type_id::UINT64)
 
 cudf::CUDF_TYPE_MAPPING (float, type_id::FLOAT32)
 
 cudf::CUDF_TYPE_MAPPING (double, type_id::FLOAT64)
 
 cudf::CUDF_TYPE_MAPPING (cudf::string_view, type_id::STRING)
 
 cudf::CUDF_TYPE_MAPPING (cudf::timestamp_D, type_id::TIMESTAMP_DAYS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::timestamp_s, type_id::TIMESTAMP_SECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::timestamp_ms, type_id::TIMESTAMP_MILLISECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::timestamp_us, type_id::TIMESTAMP_MICROSECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::timestamp_ns, type_id::TIMESTAMP_NANOSECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::duration_D, type_id::DURATION_DAYS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::duration_s, type_id::DURATION_SECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::duration_ms, type_id::DURATION_MILLISECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::duration_us, type_id::DURATION_MICROSECONDS)
 
 cudf::CUDF_TYPE_MAPPING (cudf::duration_ns, type_id::DURATION_NANOSECONDS)
 
 cudf::CUDF_TYPE_MAPPING (dictionary32, type_id::DICTIONARY32)
 
 cudf::CUDF_TYPE_MAPPING (cudf::list_view, type_id::LIST)
 
 cudf::CUDF_TYPE_MAPPING (numeric::decimal32, type_id::DECIMAL32)
 
 cudf::CUDF_TYPE_MAPPING (numeric::decimal64, type_id::DECIMAL64)
 
 cudf::CUDF_TYPE_MAPPING (cudf::struct_view, type_id::STRUCT)
 
 cudf::MAP_NUMERIC_SCALAR (bool)
 
template<template< cudf::type_id > typename IdTypeMap = id_to_type_impl, typename Functor , typename... Ts>
constexpr decltype(auto) CUDA_HOST_DEVICE_CALLABLE 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>
constexpr decltype(auto) CUDA_HOST_DEVICE_CALLABLE 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.