libcudf
24.02.00
|
Files | |
file | types.hpp |
Type declarations for libcudf. | |
file | traits.cuh |
file | traits.hpp |
Classes | |
struct | cudf::order_info |
Indicates how a collection of values has been ordered. More... | |
class | cudf::data_type |
Indicator for the logical data type of an element in a column. More... | |
struct | cudf::is_convertible< From, To > |
struct | cudf::is_convertible< cudf::detail::timestamp< Duration1 >, cudf::detail::timestamp< Duration2 > > |
Macros | |
#define | CUDF_ENABLE_IF(...) std::enable_if_t<(__VA_ARGS__)>* = nullptr |
Convenience macro for SFINAE as an unnamed template parameter. More... | |
Typedefs | |
using | cudf::size_type = int32_t |
Row index type for columns and tables. | |
using | cudf::bitmask_type = uint32_t |
Bitmask type stored as 32-bit unsigned integer. | |
using | cudf::valid_type = uint8_t |
Valid type in host memory. | |
using | cudf::thread_index_type = int64_t |
Thread index type in kernels. | |
using | cudf::char_utf8 = uint32_t |
UTF-8 characters are 1-4 bytes. | |
template<typename... > | |
using | cudf::void_t = void |
Utility metafunction that maps a sequence of any types to the type void. | |
template<typename L , typename R > | |
using | cudf::less_comparable = decltype(std::declval< L >()< std::declval< R >()) |
Checks if two types are comparable using less operator (i.e. <). | |
template<typename L , typename R > | |
using | cudf::greater_comparable = decltype(std::declval< L >() > std::declval< R >()) |
Checks if two types are comparable using greater operator (i.e. >). | |
template<typename L , typename R > | |
using | cudf::equality_comparable = decltype(std::declval< L >()==std::declval< R >()) |
Checks if two types are comparable using equality operator (i.e. ==). | |
template<typename... Ts> | |
using | cudf::has_common_type = typename detail::has_common_type_impl< void, Ts... >::type |
Checks if types have a common type. | |
template<typename T > | |
using | cudf::is_timestamp_t = 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 > > |
Checks if a type is a timestamp type. | |
template<typename T > | |
using | cudf::is_duration_t = 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 > > |
Checks if a type is a duration type. | |
Enumerations | |
enum class | cudf::order : bool { cudf::ASCENDING , cudf::DESCENDING } |
Indicates the order in which elements should be sorted. More... | |
enum class | cudf::null_policy : bool { cudf::EXCLUDE , cudf::INCLUDE } |
Enum to specify whether to include nulls or exclude nulls. More... | |
enum class | cudf::nan_policy : bool { cudf::NAN_IS_NULL , cudf::NAN_IS_VALID } |
Enum to treat NaN floating point value as null or non-null element. More... | |
enum class | cudf::nan_equality { cudf::ALL_EQUAL , cudf::UNEQUAL } |
Enum to consider different elements (of floating point types) holding NaN value as equal or unequal. More... | |
enum class | cudf::null_equality : bool { cudf::EQUAL , cudf::UNEQUAL } |
Enum to consider two nulls as equal or unequal. More... | |
enum class | cudf::null_order : bool { cudf::AFTER , cudf::BEFORE } |
Indicates how null values compare against all other values. More... | |
enum class | cudf::sorted : bool { NO , YES } |
Indicates whether a collection of values is known to be sorted. | |
enum class | cudf::mask_state : int32_t { cudf::UNALLOCATED , cudf::UNINITIALIZED , cudf::ALL_VALID , cudf::ALL_NULL } |
Controls the allocation/initialization of a null mask. More... | |
enum class | cudf::interpolation : int32_t { cudf::LINEAR , cudf::LOWER , cudf::HIGHER , cudf::MIDPOINT , cudf::NEAREST } |
Interpolation method to use when the desired quantile lies between two data points i and j. More... | |
enum class | cudf::type_id : int32_t { cudf::EMPTY , cudf::INT8 , cudf::INT16 , cudf::INT32 , cudf::INT64 , cudf::UINT8 , cudf::UINT16 , cudf::UINT32 , cudf::UINT64 , cudf::FLOAT32 , cudf::FLOAT64 , cudf::BOOL8 , cudf::TIMESTAMP_DAYS , cudf::TIMESTAMP_SECONDS , cudf::TIMESTAMP_MILLISECONDS , cudf::TIMESTAMP_MICROSECONDS , cudf::TIMESTAMP_NANOSECONDS , cudf::DURATION_DAYS , cudf::DURATION_SECONDS , cudf::DURATION_MILLISECONDS , cudf::DURATION_MICROSECONDS , cudf::DURATION_NANOSECONDS , cudf::DICTIONARY32 , cudf::STRING , cudf::LIST , cudf::DECIMAL32 , cudf::DECIMAL64 , cudf::DECIMAL128 , cudf::STRUCT , cudf::NUM_TYPE_IDS } |
Identifies a column's logical element type. More... | |
Functions | |
template<typename T > | |
size_type | cudf::distance (T f, T l) |
Similar to std::distance but returns cudf::size_type and performs static_cast More... | |
constexpr bool | cudf::operator== (data_type const &lhs, data_type const &rhs) |
Compares two data_type objects for equality. More... | |
bool | cudf::operator!= (data_type const &lhs, data_type const &rhs) |
Compares two data_type objects for inequality. More... | |
std::size_t | cudf::size_of (data_type t) |
Returns the size in bytes of elements of the specified data_type More... | |
template<typename T > | |
constexpr bool | cudf::has_atomic_support () |
Indicates whether the type T has support for atomics. More... | |
constexpr bool | cudf::has_atomic_support (data_type type) |
Indicates whether type has support for atomics. More... | |
template<typename L , typename R > | |
constexpr bool | cudf::is_relationally_comparable () |
Indicates whether objects of types L and R can be relationally compared. More... | |
bool | cudf::is_relationally_comparable (data_type type) |
Checks whether data_type type supports relational comparisons. More... | |
template<typename L , typename R > | |
constexpr bool | cudf::is_equality_comparable () |
Indicates whether objects of types L and R can be compared for equality. More... | |
bool | cudf::is_equality_comparable (data_type type) |
Checks whether data_type type supports equality comparisons. More... | |
template<typename T > | |
constexpr bool | cudf::is_numeric () |
Indicates whether the type T is a numeric type. More... | |
bool | cudf::is_numeric (data_type type) |
Indicates whether type is a numeric data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_index_type () |
Indicates whether the type T is a index type. More... | |
bool | cudf::is_index_type (data_type type) |
Indicates whether the type type is a index type. More... | |
template<typename T > | |
constexpr bool | cudf::is_unsigned () |
Indicates whether the type T is a unsigned numeric type. More... | |
bool | cudf::is_unsigned (data_type type) |
Indicates whether type is a unsigned numeric data_type . More... | |
template<typename Iterator > | |
constexpr bool | cudf::is_signed_iterator () |
Indicates whether the Iterator value type is unsigned. More... | |
template<typename T > | |
constexpr bool | cudf::is_integral () |
Indicates whether the type T is an integral type. More... | |
bool | cudf::is_integral (data_type type) |
Indicates whether type is a integral data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_integral_not_bool () |
Indicates whether the type T is an integral type but not bool type. More... | |
bool | cudf::is_integral_not_bool (data_type type) |
Indicates whether type is a integral data_type and not BOOL8. More... | |
template<typename T > | |
constexpr bool | cudf::is_floating_point () |
Indicates whether the type T is a floating point type. More... | |
bool | cudf::is_floating_point (data_type type) |
Indicates whether type is a floating point data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_byte () |
Indicates whether T is a std::byte type. More... | |
template<typename T > | |
constexpr bool | cudf::is_boolean () |
Indicates whether T is a Boolean type. More... | |
bool | cudf::is_boolean (data_type type) |
Indicates whether type is a Boolean data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_timestamp () |
Indicates whether the type T is a timestamp type. More... | |
bool | cudf::is_timestamp (data_type type) |
Indicates whether type is a timestamp data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_fixed_point () |
Indicates whether the type T is a fixed-point type. More... | |
bool | cudf::is_fixed_point (data_type type) |
Indicates whether type is a fixed point data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_duration () |
Indicates whether the type T is a duration type. More... | |
bool | cudf::is_duration (data_type type) |
Indicates whether type is a duration data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_chrono () |
Indicates whether the type T is a chrono type. More... | |
bool | cudf::is_chrono (data_type type) |
Indicates whether type is a chrono data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_rep_layout_compatible () |
Indicates whether T is layout compatible with its "representation" type. More... | |
template<typename T > | |
constexpr bool | cudf::is_dictionary () |
Indicates whether the type T is a dictionary type. More... | |
bool | cudf::is_dictionary (data_type type) |
Indicates whether type is a dictionary data_type . More... | |
template<typename T > | |
constexpr bool | cudf::is_fixed_width () |
Indicates whether elements of type T are fixed-width. More... | |
bool | cudf::is_fixed_width (data_type type) |
Indicates whether elements of type are fixed-width. More... | |
template<typename T > | |
constexpr bool | cudf::is_compound () |
Indicates whether the type T is a compound type. More... | |
bool | cudf::is_compound (data_type type) |
Indicates whether elements of type are compound. More... | |
template<typename T > | |
constexpr bool | cudf::is_nested () |
Indicates whether T is a nested type. More... | |
bool | cudf::is_nested (data_type type) |
Indicates whether type is a nested type. More... | |
bool | cudf::is_bit_castable (data_type from, data_type to) |
Indicates whether from is bit-castable to to . More... | |
Variables | |
template<typename... Ts> | |
constexpr bool | cudf::has_common_type_v = detail::has_common_type_impl<void, Ts...>::value |
Helper variable template for has_common_type<>::value. | |
#define CUDF_ENABLE_IF | ( | ... | ) | std::enable_if_t<(__VA_ARGS__)>* = nullptr |
Convenience macro for SFINAE as an unnamed template parameter.
Example:
Definition at line 50 of file traits.hpp.
|
strong |
|
strong |
Controls the allocation/initialization of a null mask.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Identifies a column's logical element type.
size_type cudf::distance | ( | T | f, |
T | l | ||
) |
Similar to std::distance
but returns cudf::size_type
and performs static_cast
T | Iterator type |
f | "first" iterator |
l | "last" iterator |
|
inlineconstexpr |
Indicates whether the type T
has support for atomics.
T | The type to verify |
T
has support for atomics T
no support for atomics Definition at line 40 of file traits.cuh.
|
inlineconstexpr |
Indicates whether type
has support for atomics.
type | The data_type to verify |
type
has support for atomics type
no support for atomics Definition at line 60 of file traits.cuh.
Indicates whether from
is bit-castable to to
.
This casting is based on std::bit_cast. Data types that have the same size and are trivially copyable are eligible for this casting.
See cudf::bit_cast()
which returns a zero-copy column_view
when casting between bit-castable types.
true
if the types are castable
|
inlineconstexpr |
Indicates whether T
is a Boolean type.
type | The data_type to verify |
type
is Boolean type
is not Boolean Definition at line 351 of file traits.hpp.
bool cudf::is_boolean | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether T
is a std::byte type.
T | The type to verify |
type
is std::byte type
is not std::byte Definition at line 338 of file traits.hpp.
|
inlineconstexpr |
Indicates whether the type T
is a chrono type.
T | The type to verify |
T
is a duration or a timestamp type T
is neither a duration nor a timestamp type Definition at line 444 of file traits.hpp.
bool cudf::is_chrono | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether the type T
is a compound type.
column
s with "compound" elements are logically a single column of elements, but may be concretely implemented with two or more column
s. For example, a STRING
column could contain a column
of offsets and a child column
of characters.
T | The type to verify |
T
corresponds to a "compound" type T
corresponds to a "simple" type Definition at line 545 of file traits.hpp.
bool cudf::is_compound | ( | data_type | type | ) |
Indicates whether elements of type
are compound.
column
s with "compound" elements are logically a single column of elements, but may be concretely implemented with two or more column
s. For example, a STRING
column could contain a column
of offsets and a child column
of characters.
type | The data_type to verify |
type
is a compound type type
is a simple type
|
inlineconstexpr |
Indicates whether the type T
is a dictionary type.
T | The type to verify |
T
is a dictionary-type T
is not dictionary-type Definition at line 488 of file traits.hpp.
bool cudf::is_dictionary | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether the type T
is a duration type.
T | The type to verify |
T
is a duration T
is not a duration Definition at line 420 of file traits.hpp.
bool cudf::is_duration | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether objects of types L
and R
can be compared for equality.
Given two objects L l
, and R r
, returns true if l == r
is a well-formed expression.
L | Type of the first object |
R | Type of the second object |
L
and R
can be compared for equality L
and R
cannot be compared Definition at line 152 of file traits.hpp.
bool cudf::is_equality_comparable | ( | data_type | type | ) |
Checks whether data_type
type
supports equality comparisons.
type | Data_type for comparison. |
type
supports equality comparisons. type
does not support equality comparisons.
|
inlineconstexpr |
Indicates whether the type T
is a fixed-point type.
T | The type to verify |
T
is a fixed-point type T
is not a fixed-point type Definition at line 397 of file traits.hpp.
bool cudf::is_fixed_point | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether elements of type T
are fixed-width.
Elements of a fixed-width type all have the same size in bytes.
T | The C++ type to verify |
T
corresponds to a fixed-width element type T
corresponds to a variable-width element type Definition at line 512 of file traits.hpp.
bool cudf::is_fixed_width | ( | data_type | type | ) |
Indicates whether elements of type
are fixed-width.
Elements of a fixed-width type all have the same size in bytes.
type | The data_type to verify |
type
is fixed-width type
is variable-width
|
inlineconstexpr |
Indicates whether the type T
is a floating point type.
T | The type to verify |
T
is floating point T
is not floating point Definition at line 314 of file traits.hpp.
bool cudf::is_floating_point | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether the type T
is a index type.
A type T
is considered an index type if it is valid to use elements of type T
to index into a column. I.e., index types are integral types such as 'INT*' apart from 'bool'.
T | The type to verify |
T
is index type T
is not index type Definition at line 204 of file traits.hpp.
bool cudf::is_index_type | ( | data_type | type | ) |
Indicates whether the type type
is a index type.
A type T
is considered an index type if it is valid to use elements of type T
to index into a column. I.e., index types are integral types such as 'INT*' apart from 'bool'.
type | The data_type to verify |
type
is index type type
is not index type
|
inlineconstexpr |
Indicates whether the type T
is an integral type.
T | The type to verify |
T
is integral T
is not integral Definition at line 266 of file traits.hpp.
bool cudf::is_integral | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether the type T
is an integral type but not bool type.
T | The type to verify |
T
is integral but not bool T
is not integral or is bool Definition at line 290 of file traits.hpp.
bool cudf::is_integral_not_bool | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether T
is a nested type.
"Nested" types are distinct from compound types in that they can have an arbitrarily deep list of descendants of the same type. Strings are not a nested type, but lists are.
T | The type to verify |
Definition at line 577 of file traits.hpp.
bool cudf::is_nested | ( | data_type | type | ) |
Indicates whether type
is a nested type.
"Nested" types are distinct from compound types in that they can have an arbitrarily deep list of descendants of the same type. Strings are not a nested type, but lists are.
type | The data_type to verify |
type
is a nested type type
is not a nested type
|
inlineconstexpr |
Indicates whether the type T
is a numeric type.
T | The type to verify |
T
is numeric T
is not numeric Definition at line 174 of file traits.hpp.
bool cudf::is_numeric | ( | data_type | type | ) |
Indicates whether type
is a numeric data_type
.
"Numeric" types are fundamental integral/floating point types such as INT*
or FLOAT*
. Types that wrap a numeric type are not considered numeric, e.g., TIMESTAMP
.
type | The data_type to verify |
type
is numeric type
is not numeric
|
inlineconstexpr |
Indicates whether objects of types L
and R
can be relationally compared.
Given two objects L l
, and R r
, returns true if l < r
and l > r
are well-formed expressions.
L | Type of the first object |
R | Type of the second object |
L
and R
can be relationally be compared L
and R
cannot be compared Definition at line 125 of file traits.hpp.
bool cudf::is_relationally_comparable | ( | data_type | type | ) |
Checks whether data_type
type
supports relational comparisons.
type | Data_type for comparison. |
type
supports relational comparisons. type
does not support relational comparisons.
|
constexpr |
Indicates whether T
is layout compatible with its "representation" type.
For example, in a column, a decimal32
is concretely represented by a single int32_t
, but the decimal32
type itself contains both the integer representation and the scale. Therefore, decimal32
is not layout compatible with int32_t
.
As further example, duration_ns
is distinct from its concrete int64_t
representation type, but they are layout compatible.
T
is layout compatible with its "representation" type Definition at line 474 of file traits.hpp.
|
inlineconstexpr |
Indicates whether the Iterator
value type is unsigned.
Iterator | The type to verify |
Definition at line 253 of file traits.hpp.
|
inlineconstexpr |
Indicates whether the type T
is a timestamp type.
T | The type to verify |
T
is a timestamp T
is not a timestamp Definition at line 373 of file traits.hpp.
bool cudf::is_timestamp | ( | data_type | type | ) |
|
inlineconstexpr |
Indicates whether the type T
is a unsigned numeric type.
T | The type to verify |
T
is unsigned numeric T
is signed numeric Definition at line 230 of file traits.hpp.
bool cudf::is_unsigned | ( | data_type | type | ) |
std::size_t cudf::size_of | ( | data_type | t | ) |
Returns the size in bytes of elements of the specified data_type
cudf::logic_error | if is_fixed_width(element_type) == false |
t | The data_type to get the size of |
data_type