Go to the documentation of this file.
25 #include <cuda/std/type_traits>
35 template <
typename...>
50 #define CUDF_ENABLE_IF(...) std::enable_if_t<(__VA_ARGS__)>* = nullptr
53 template <
typename L,
typename R>
57 template <
typename L,
typename R>
61 template <
typename L,
typename R>
65 template <
typename L,
typename R,
typename =
void>
66 struct is_relationally_comparable_impl : std::false_type {
69 template <
typename L,
typename R>
70 struct is_relationally_comparable_impl<L,
72 void_t<less_comparable<L, R>, greater_comparable<L, R>>>
76 template <
typename L,
typename R,
typename =
void>
77 struct is_equality_comparable_impl : std::false_type {
80 template <
typename L,
typename R>
85 template <
typename AlwaysVoid,
typename... Ts>
86 struct has_common_type_impl : std::false_type {
89 template <
typename... Ts>
90 struct has_common_type_impl<
void_t<std::common_type_t<Ts...>>, Ts...> : std::true_type {
95 template <
typename... Ts>
99 template <
typename... Ts>
103 template <
typename T>
104 using is_timestamp_t = cuda::std::disjunction<std::is_same<cudf::timestamp_D, T>,
105 std::is_same<cudf::timestamp_s, T>,
106 std::is_same<cudf::timestamp_ms, T>,
107 std::is_same<cudf::timestamp_us, T>,
108 std::is_same<cudf::timestamp_ns, T>>;
111 template <
typename T>
112 using is_duration_t = cuda::std::disjunction<std::is_same<cudf::duration_D, T>,
113 std::is_same<cudf::duration_s, T>,
114 std::is_same<cudf::duration_ms, T>,
115 std::is_same<cudf::duration_us, T>,
116 std::is_same<cudf::duration_ns, T>>;
130 template <
typename L,
typename R>
133 return detail::is_relationally_comparable_impl<L, R>::value;
157 template <
typename L,
typename R>
160 return detail::is_equality_comparable_impl<L, R>::value;
179 template <
typename T>
182 return cuda::std::is_arithmetic<T>();
209 template <
typename T>
212 return std::is_integral_v<T> and not std::is_same_v<T, bool>;
235 template <
typename T>
238 return std::is_unsigned_v<T>;
258 template <
typename Iterator>
261 return std::is_signed_v<typename std::iterator_traits<Iterator>::value_type>;
271 template <
typename T>
274 return cuda::std::is_integral_v<T>;
295 template <
typename T>
298 return std::is_floating_point_v<T>;
319 template <
typename T>
322 return std::is_same_v<std::remove_cv_t<T>, std::byte>;
332 template <
typename T>
335 return std::is_same_v<T, bool>;
354 template <
typename T>
378 template <
typename T>
381 return std::is_same_v<numeric::decimal32, T> || std::is_same_v<numeric::decimal64, T> ||
382 std::is_same_v<numeric::decimal128, T>;
401 template <
typename T>
425 template <
typename T>
428 return is_duration<T>() || is_timestamp<T>();
455 template <
typename T>
458 return cudf::is_numeric<T>() or cudf::is_chrono<T>() or cudf::is_boolean<T>() or
469 template <
typename T>
472 return std::is_same_v<dictionary32, T>;
493 template <
typename T>
498 return cudf::is_numeric<T>() || cudf::is_chrono<T>() || cudf::is_fixed_point<T>();
526 template <
typename T>
529 return std::is_same_v<T, cudf::string_view> or std::is_same_v<T, cudf::dictionary32> or
530 std::is_same_v<T, cudf::list_view> or std::is_same_v<T, cudf::struct_view>;
558 template <
typename T>
561 return std::is_same_v<T, cudf::list_view> || std::is_same_v<T, cudf::struct_view>;
592 template <
typename From,
typename To>
598 template <
typename Duration1,
typename Duration2>
600 : std::is_convertible<typename cudf::detail::time_point<Duration1>::duration,
601 typename cudf::detail::time_point<Duration2>::duration> {
time_point< Duration > timestamp
A wrapper around a column of time_point in varying resolutions.
Class definition for fixed point data type.
decltype(std::declval< L >() > std::declval< R >()) greater_comparable
Checks if two types are comparable using greater operator (i.e. >).
Concrete type definitions for int32_t and int64_t durations in varying resolutions.
constexpr bool is_signed_iterator()
Indicates whether the Iterator value type is unsigned.
Type declarations for libcudf.
constexpr bool is_compound()
Indicates whether the type T is a compound type.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
constexpr bool is_boolean()
Indicates whether T is a Boolean type.
typename detail::has_common_type_impl< void, Ts... >::type has_common_type
Checks if types have a common type.
constexpr bool is_rep_layout_compatible()
Indicates whether T is layout compatible with its "representation" type.
constexpr bool is_numeric()
Indicates whether the type T is a numeric type.
constexpr bool is_integral()
Indicates whether the type T is an integral type.
constexpr bool has_common_type_v
Helper variable template for has_common_type<>::value.
decltype(std::declval< L >()< std::declval< R >()) less_comparable
Checks if two types are comparable using less operator (i.e. <).
constexpr bool is_byte()
Indicates whether T is a std::byte type.
constexpr bool is_unsigned()
Indicates whether the type T is a unsigned numeric type.
decltype(std::declval< L >()==std::declval< R >()) equality_comparable
Checks if two types are comparable using equality operator (i.e. ==).
constexpr bool is_floating_point()
Indicates whether the type T is a floating point type.
Concrete type definition for dictionary columns.
constexpr bool is_dictionary()
Indicates whether the type T is a dictionary type.
Indicator for the logical data type of an element in a column.
constexpr bool is_index_type()
Indicates whether the type T is a index type.
cuda::std::disjunction< std::is_same< cudf::duration_D, T >, std::is_same< cudf::duration_s, T >, std::is_same< cudf::duration_ms, T >, std::is_same< cudf::duration_us, T >, std::is_same< cudf::duration_ns, T > > is_duration_t
Checks if a type is a duration type.
constexpr bool is_chrono()
Indicates whether the type T is a chrono type.
constexpr bool is_fixed_width()
Indicates whether elements of type T are fixed-width.
constexpr bool is_nested()
Indicates whether T is a nested type.
cuda::std::disjunction< std::is_same< cudf::timestamp_D, T >, std::is_same< cudf::timestamp_s, T >, std::is_same< cudf::timestamp_ms, T >, std::is_same< cudf::timestamp_us, T >, std::is_same< cudf::timestamp_ns, T > > is_timestamp_t
Checks if a type is a timestamp type.
constexpr bool is_fixed_point()
Indicates whether the type T is a fixed-point type.
constexpr bool is_duration()
Indicates whether the type T is a duration type.
Concrete type definitions for int32_t and int64_t timestamps in varying resolutions as durations sinc...
constexpr bool is_equality_comparable()
Indicates whether objects of types L and R can be compared for equality.
constexpr bool is_timestamp()
Indicates whether the type T is a timestamp type.
bool is_bit_castable(data_type from, data_type to)
Indicates whether from is bit-castable to to.
void void_t
Utility metafunction that maps a sequence of any types to the type void.
constexpr bool is_relationally_comparable()
Indicates whether objects of types L and R can be relationally compared.