25 #include <cuda/std/type_traits>
27 namespace CUDF_EXPORT
cudf {
36 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 {};
68 template <
typename L,
typename R>
69 struct is_relationally_comparable_impl<L,
71 void_t<less_comparable<L, R>, greater_comparable<L, R>>>
74 template <
typename L,
typename R,
typename =
void>
75 struct is_equality_comparable_impl : std::false_type {};
77 template <
typename L,
typename R>
81 template <
typename AlwaysVoid,
typename... Ts>
82 struct has_common_type_impl : std::false_type {};
84 template <
typename... Ts>
85 struct has_common_type_impl<
void_t<std::common_type_t<Ts...>>, Ts...> : std::true_type {};
89 template <
typename... Ts>
93 template <
typename... Ts>
98 using is_timestamp_t = cuda::std::disjunction<std::is_same<cudf::timestamp_D, T>,
99 std::is_same<cudf::timestamp_s, T>,
100 std::is_same<cudf::timestamp_ms, T>,
101 std::is_same<cudf::timestamp_us, T>,
102 std::is_same<cudf::timestamp_ns, T>>;
105 template <
typename T>
106 using is_duration_t = cuda::std::disjunction<std::is_same<cudf::duration_D, T>,
107 std::is_same<cudf::duration_s, T>,
108 std::is_same<cudf::duration_ms, T>,
109 std::is_same<cudf::duration_us, T>,
110 std::is_same<cudf::duration_ns, T>>;
124 template <
typename L,
typename R>
127 return detail::is_relationally_comparable_impl<L, R>::value;
151 template <
typename L,
typename R>
154 return detail::is_equality_comparable_impl<L, R>::value;
173 template <
typename T>
176 return cuda::std::is_arithmetic<T>();
203 template <
typename T>
206 return std::is_integral_v<T> and not std::is_same_v<T, bool>;
229 template <
typename T>
232 return std::is_unsigned_v<T>;
252 template <
typename Iterator>
255 return std::is_signed_v<typename std::iterator_traits<Iterator>::value_type>;
265 template <
typename T>
268 return cuda::std::is_integral_v<T>;
289 template <
typename T>
292 return cuda::std::is_integral_v<T> and not std::is_same_v<T, bool>;
313 template <
typename T>
316 return std::is_floating_point_v<T>;
337 template <
typename T>
340 return std::is_same_v<std::remove_cv_t<T>, std::byte>;
350 template <
typename T>
353 return std::is_same_v<T, bool>;
372 template <
typename T>
396 template <
typename T>
399 return std::is_same_v<numeric::decimal32, T> || std::is_same_v<numeric::decimal64, T> ||
400 std::is_same_v<numeric::decimal128, T> ||
401 std::is_same_v<numeric::fixed_point<int32_t, numeric::Radix::BASE_2>, T> ||
402 std::is_same_v<numeric::fixed_point<int64_t, numeric::Radix::BASE_2>, T> ||
403 std::is_same_v<numeric::fixed_point<__int128_t, numeric::Radix::BASE_2>, T>;
422 template <
typename T>
446 template <
typename T>
449 return is_duration<T>() || is_timestamp<T>();
476 template <
typename T>
479 return cudf::is_numeric<T>() or cudf::is_chrono<T>() or cudf::is_boolean<T>() or
490 template <
typename T>
493 return std::is_same_v<dictionary32, T>;
514 template <
typename T>
519 return cudf::is_numeric<T>() || cudf::is_chrono<T>() || cudf::is_fixed_point<T>();
547 template <
typename T>
550 return std::is_same_v<T, cudf::string_view> or std::is_same_v<T, cudf::dictionary32> or
551 std::is_same_v<T, cudf::list_view> or std::is_same_v<T, cudf::struct_view>;
579 template <
typename T>
582 return std::is_same_v<T, cudf::list_view> || std::is_same_v<T, cudf::struct_view>;
613 template <
typename From,
typename To>
618 template <
typename Duration1,
typename Duration2>
620 : std::is_convertible<typename cudf::detail::time_point<Duration1>::duration,
621 typename cudf::detail::time_point<Duration2>::duration> {};
Indicator for the logical data type of an element in a column.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
Concrete type definition for dictionary columns.
Concrete type definitions for int32_t and int64_t durations in varying resolutions.
Class definition for fixed point data type.
bool is_dictionary(data_type type)
Indicates whether type is a dictionary data_type.
decltype(std::declval< L >() > std::declval< R >()) greater_comparable
Checks if two types are comparable using greater operator (i.e. >).
constexpr bool is_byte()
Indicates whether T is a std::byte type.
bool is_duration(data_type type)
Indicates whether type is a duration data_type.
bool is_numeric(data_type type)
Indicates whether type is a numeric data_type.
bool is_integral(data_type type)
Indicates whether type is a integral data_type.
decltype(std::declval< L >()==std::declval< R >()) equality_comparable
Checks if two types are comparable using equality operator (i.e. ==).
typename detail::has_common_type_impl< void, Ts... >::type has_common_type
Checks if types have a common type.
bool is_equality_comparable(data_type type)
Checks whether data_type type supports equality comparisons.
bool is_index_type(data_type type)
Indicates whether the type type is a index type.
bool is_relationally_comparable(data_type type)
Checks whether data_type type supports relational comparisons.
decltype(std::declval< L >()< std::declval< R >()) less_comparable
Checks if two types are comparable using less operator (i.e. <).
bool is_boolean(data_type type)
Indicates whether type is a Boolean data_type.
bool is_bit_castable(data_type from, data_type to)
Indicates whether from is bit-castable to to.
bool is_compound(data_type type)
Indicates whether elements of type are compound.
constexpr bool is_rep_layout_compatible()
Indicates whether T is layout compatible with its "representation" type.
bool is_nested(data_type type)
Indicates whether type is a nested type.
void void_t
Utility metafunction that maps a sequence of any types to the type void.
bool is_timestamp(data_type type)
Indicates whether type is a timestamp data_type.
bool is_floating_point(data_type type)
Indicates whether type is a floating point data_type.
bool is_unsigned(data_type type)
Indicates whether type is a unsigned numeric data_type.
constexpr bool is_signed_iterator()
Indicates whether the Iterator value type is unsigned.
constexpr bool has_common_type_v
Helper variable template for has_common_type<>::value.
bool is_integral_not_bool(data_type type)
Indicates whether type is a integral data_type and not BOOL8.
bool is_chrono(data_type type)
Indicates whether type is a chrono data_type.
bool is_fixed_point(data_type type)
Indicates whether type is a fixed point data_type.
bool is_fixed_width(data_type type)
Indicates whether elements of type are fixed-width.
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.
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.
Concrete type definitions for int32_t and int64_t timestamps in varying resolutions as durations sinc...
time_point< Duration > timestamp
A wrapper around a column of time_point in varying resolutions.
Type declarations for libcudf.