Files | Classes | Macros | Typedefs | Enumerations | Functions | Variables

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.
 

Detailed Description

Macro Definition Documentation

◆ CUDF_ENABLE_IF

#define CUDF_ENABLE_IF (   ...)    std::enable_if_t<(__VA_ARGS__)>* = nullptr

Convenience macro for SFINAE as an unnamed template parameter.

Example:

// This function will participate in overload resolution only if T is an integral type
template <typename T, CUDF_ENABLE_IF(std::is_integral_v<T> )>
void foo();

Definition at line 50 of file traits.hpp.

Enumeration Type Documentation

◆ interpolation

enum cudf::interpolation : int32_t
strong

Interpolation method to use when the desired quantile lies between two data points i and j.

Enumerator
LINEAR 

Linear interpolation between i and j.

LOWER 

Lower data point (i)

HIGHER 

Higher data point (j)

MIDPOINT 

(i + j)/2

NEAREST 

i or j, whichever is nearest

Definition at line 190 of file types.hpp.

◆ mask_state

enum cudf::mask_state : int32_t
strong

Controls the allocation/initialization of a null mask.

Enumerator
UNALLOCATED 

Null mask not allocated, (all elements are valid)

UNINITIALIZED 

Null mask allocated, but not initialized.

ALL_VALID 

Null mask allocated, initialized to all elements valid.

ALL_NULL 

Null mask allocated, initialized to all elements NULL.

Definition at line 179 of file types.hpp.

◆ nan_equality

enum cudf::nan_equality
strong

Enum to consider different elements (of floating point types) holding NaN value as equal or unequal.

Enumerator
ALL_EQUAL 

All NaNs compare equal, regardless of sign.

UNEQUAL 

All NaNs compare unequal (IEEE754 behavior)

Definition at line 141 of file types.hpp.

◆ nan_policy

enum cudf::nan_policy : bool
strong

Enum to treat NaN floating point value as null or non-null element.

Enumerator
NAN_IS_NULL 

treat nans as null elements

NAN_IS_VALID 

treat nans as valid elements (non-null)

Definition at line 132 of file types.hpp.

◆ null_equality

enum cudf::null_equality : bool
strong

Enum to consider two nulls as equal or unequal.

Enumerator
EQUAL 

nulls compare equal

UNEQUAL 

nulls compare unequal

Definition at line 149 of file types.hpp.

◆ null_order

enum cudf::null_order : bool
strong

Indicates how null values compare against all other values.

Enumerator
AFTER 

NULL values ordered after all other values.

BEFORE 

NULL values ordered before all other values.

Definition at line 157 of file types.hpp.

◆ null_policy

enum cudf::null_policy : bool
strong

Enum to specify whether to include nulls or exclude nulls.

Enumerator
EXCLUDE 

exclude null elements

INCLUDE 

include null elements

Definition at line 124 of file types.hpp.

◆ order

enum cudf::order : bool
strong

Indicates the order in which elements should be sorted.

Enumerator
ASCENDING 

Elements ordered from small to large.

DESCENDING 

Elements ordered from large to small.

Definition at line 116 of file types.hpp.

◆ type_id

enum cudf::type_id : int32_t
strong

Identifies a column's logical element type.

Enumerator
EMPTY 

Always null with no underlying data.

INT8 

1 byte signed integer

INT16 

2 byte signed integer

INT32 

4 byte signed integer

INT64 

8 byte signed integer

UINT8 

1 byte unsigned integer

UINT16 

2 byte unsigned integer

UINT32 

4 byte unsigned integer

UINT64 

8 byte unsigned integer

FLOAT32 

4 byte floating point

FLOAT64 

8 byte floating point

BOOL8 

Boolean using one byte per value, 0 == false, else true.

TIMESTAMP_DAYS 

point in time in days since Unix Epoch in int32

TIMESTAMP_SECONDS 

point in time in seconds since Unix Epoch in int64

TIMESTAMP_MILLISECONDS 

point in time in milliseconds since Unix Epoch in int64

TIMESTAMP_MICROSECONDS 

point in time in microseconds since Unix Epoch in int64

TIMESTAMP_NANOSECONDS 

point in time in nanoseconds since Unix Epoch in int64

DURATION_DAYS 

time interval of days in int32

DURATION_SECONDS 

time interval of seconds in int64

DURATION_MILLISECONDS 

time interval of milliseconds in int64

DURATION_MICROSECONDS 

time interval of microseconds in int64

DURATION_NANOSECONDS 

time interval of nanoseconds in int64

DICTIONARY32 

Dictionary type using int32 indices.

STRING 

String elements.

LIST 

List elements.

DECIMAL32 

Fixed-point type with int32_t.

DECIMAL64 

Fixed-point type with int64_t.

DECIMAL128 

Fixed-point type with __int128_t.

STRUCT 

Struct elements.

NUM_TYPE_IDS 

Total number of type ids.

Definition at line 201 of file types.hpp.

Function Documentation

◆ distance()

template<typename T >
size_type cudf::distance ( f,
l 
)

Similar to std::distance but returns cudf::size_type and performs static_cast

Template Parameters
TIterator type
Parameters
f"first" iterator
l"last" iterator
Returns
The distance between first and last

Definition at line 108 of file types.hpp.

◆ has_atomic_support() [1/2]

template<typename T >
constexpr bool cudf::has_atomic_support ( )
inlineconstexpr

Indicates whether the type T has support for atomics.

Template Parameters
TThe type to verify
Returns
true T has support for atomics
false T no support for atomics

Definition at line 40 of file traits.cuh.

◆ has_atomic_support() [2/2]

constexpr bool cudf::has_atomic_support ( data_type  type)
inlineconstexpr

Indicates whether type has support for atomics.

Parameters
typeThe data_type to verify
Returns
true type has support for atomics
false type no support for atomics

Definition at line 60 of file traits.cuh.

◆ is_bit_castable()

bool cudf::is_bit_castable ( data_type  from,
data_type  to 
)

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.

Parameters
fromThe data_type to convert from
toThe data_type to convert to
Returns
true if the types are castable

◆ is_boolean() [1/2]

template<typename T >
constexpr bool cudf::is_boolean ( )
inlineconstexpr

Indicates whether T is a Boolean type.

Parameters
typeThe data_type to verify
Returns
true type is Boolean
false type is not Boolean

Definition at line 351 of file traits.hpp.

◆ is_boolean() [2/2]

bool cudf::is_boolean ( data_type  type)

Indicates whether type is a Boolean data_type.

Parameters
typeThe data_type to verify
Returns
true type is a Boolean
false type is not a Boolean

◆ is_byte()

template<typename T >
constexpr bool cudf::is_byte ( )
inlineconstexpr

Indicates whether T is a std::byte type.

Template Parameters
TThe type to verify
Returns
true type is std::byte
false type is not std::byte

Definition at line 338 of file traits.hpp.

◆ is_chrono() [1/2]

template<typename T >
constexpr bool cudf::is_chrono ( )
inlineconstexpr

Indicates whether the type T is a chrono type.

Template Parameters
TThe type to verify
Returns
true T is a duration or a timestamp type
false T is neither a duration nor a timestamp type

Definition at line 444 of file traits.hpp.

◆ is_chrono() [2/2]

bool cudf::is_chrono ( data_type  type)

Indicates whether type is a chrono data_type.

Chrono types include cudf timestamp types, which represent a point in time, and cudf duration types that represent a time interval.

Parameters
typeThe data_type to verify
Returns
true type is a chrono type
false type is not a chrono type

◆ is_compound() [1/2]

template<typename T >
constexpr bool cudf::is_compound ( )
inlineconstexpr

Indicates whether the type T is a compound type.

columns with "compound" elements are logically a single column of elements, but may be concretely implemented with two or more columns. For example, a STRING column could contain a column of offsets and a child column of characters.

Template Parameters
TThe type to verify
Returns
true T corresponds to a "compound" type
false T corresponds to a "simple" type

Definition at line 545 of file traits.hpp.

◆ is_compound() [2/2]

bool cudf::is_compound ( data_type  type)

Indicates whether elements of type are compound.

columns with "compound" elements are logically a single column of elements, but may be concretely implemented with two or more columns. For example, a STRING column could contain a column of offsets and a child column of characters.

Parameters
typeThe data_type to verify
Returns
true type is a compound type
false type is a simple type

◆ is_dictionary() [1/2]

template<typename T >
constexpr bool cudf::is_dictionary ( )
inlineconstexpr

Indicates whether the type T is a dictionary type.

Template Parameters
TThe type to verify
Returns
true T is a dictionary-type
false T is not dictionary-type

Definition at line 488 of file traits.hpp.

◆ is_dictionary() [2/2]

bool cudf::is_dictionary ( data_type  type)

Indicates whether type is a dictionary data_type.

Parameters
typeThe data_type to verify
Returns
true type is a dictionary type
false type is not a dictionary type

◆ is_duration() [1/2]

template<typename T >
constexpr bool cudf::is_duration ( )
inlineconstexpr

Indicates whether the type T is a duration type.

Template Parameters
TThe type to verify
Returns
true T is a duration
false T is not a duration

Definition at line 420 of file traits.hpp.

◆ is_duration() [2/2]

bool cudf::is_duration ( data_type  type)

Indicates whether type is a duration data_type.

"Duration" types are int32_t or int64_t tick counts representing a time interval.

Parameters
typeThe data_type to verify
Returns
true type is a duration
false type is not a duration

◆ is_equality_comparable() [1/2]

template<typename L , typename R >
constexpr bool cudf::is_equality_comparable ( )
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.

Template Parameters
LType of the first object
RType of the second object
Returns
true Objects of types L and R can be compared for equality
false Objects of types L and R cannot be compared

Definition at line 152 of file traits.hpp.

◆ is_equality_comparable() [2/2]

bool cudf::is_equality_comparable ( data_type  type)

Checks whether data_type type supports equality comparisons.

Parameters
typeData_type for comparison.
Returns
true If type supports equality comparisons.
false If type does not support equality comparisons.

◆ is_fixed_point() [1/2]

template<typename T >
constexpr bool cudf::is_fixed_point ( )
inlineconstexpr

Indicates whether the type T is a fixed-point type.

Template Parameters
TThe type to verify
Returns
true T is a fixed-point type
false T is not a fixed-point type

Definition at line 397 of file traits.hpp.

◆ is_fixed_point() [2/2]

bool cudf::is_fixed_point ( data_type  type)

Indicates whether type is a fixed point data_type.

Parameters
typeThe data_type to verify
Returns
true type is a fixed point type
false type is not a fixed point type

◆ is_fixed_width() [1/2]

template<typename T >
constexpr bool cudf::is_fixed_width ( )
inlineconstexpr

Indicates whether elements of type T are fixed-width.

Elements of a fixed-width type all have the same size in bytes.

Template Parameters
TThe C++ type to verify
Returns
true T corresponds to a fixed-width element type
false T corresponds to a variable-width element type

Definition at line 512 of file traits.hpp.

◆ is_fixed_width() [2/2]

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.

Parameters
typeThe data_type to verify
Returns
true type is fixed-width
false type is variable-width

◆ is_floating_point() [1/2]

template<typename T >
constexpr bool cudf::is_floating_point ( )
inlineconstexpr

Indicates whether the type T is a floating point type.

Template Parameters
TThe type to verify
Returns
true T is floating point
false T is not floating point

Definition at line 314 of file traits.hpp.

◆ is_floating_point() [2/2]

bool cudf::is_floating_point ( data_type  type)

Indicates whether type is a floating point data_type.

"Floating point" types are fundamental floating point types such as FLOAT*.

Parameters
typeThe data_type to verify
Returns
true type is floating point
false type is not floating point

◆ is_index_type() [1/2]

template<typename T >
constexpr bool cudf::is_index_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'.

Template Parameters
TThe type to verify
Returns
true T is index type
false T is not index type

Definition at line 204 of file traits.hpp.

◆ is_index_type() [2/2]

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'.

Parameters
typeThe data_type to verify
Returns
true type is index type
false type is not index type

◆ is_integral() [1/2]

template<typename T >
constexpr bool cudf::is_integral ( )
inlineconstexpr

Indicates whether the type T is an integral type.

Template Parameters
TThe type to verify
Returns
true T is integral
false T is not integral

Definition at line 266 of file traits.hpp.

◆ is_integral() [2/2]

bool cudf::is_integral ( data_type  type)

Indicates whether type is a integral data_type.

"Integral" types are fundamental integer types such as INT* and UINT*.

Parameters
typeThe data_type to verify
Returns
true type is integral
false type is integral

◆ is_integral_not_bool() [1/2]

template<typename T >
constexpr bool cudf::is_integral_not_bool ( )
inlineconstexpr

Indicates whether the type T is an integral type but not bool type.

Template Parameters
TThe type to verify
Returns
true T is integral but not bool
false T is not integral or is bool

Definition at line 290 of file traits.hpp.

◆ is_integral_not_bool() [2/2]

bool cudf::is_integral_not_bool ( data_type  type)

Indicates whether type is a integral data_type and not BOOL8.

"Integral" types are fundamental integer types such as INT* and UINT*.

Parameters
typeThe data_type to verify
Returns
true type is integral but not bool
false type is integral or is bool

◆ is_nested() [1/2]

template<typename T >
constexpr bool cudf::is_nested ( )
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.

Parameters
TThe type to verify
Returns
true T is a nested type
false T is not a nested type

Definition at line 577 of file traits.hpp.

◆ is_nested() [2/2]

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.

Parameters
typeThe data_type to verify
Returns
true type is a nested type
false type is not a nested type

◆ is_numeric() [1/2]

template<typename T >
constexpr bool cudf::is_numeric ( )
inlineconstexpr

Indicates whether the type T is a numeric type.

Template Parameters
TThe type to verify
Returns
true T is numeric
false T is not numeric

Definition at line 174 of file traits.hpp.

◆ is_numeric() [2/2]

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.

Parameters
typeThe data_type to verify
Returns
true type is numeric
false type is not numeric

◆ is_relationally_comparable() [1/2]

template<typename L , typename R >
constexpr bool cudf::is_relationally_comparable ( )
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.

Template Parameters
LType of the first object
RType of the second object
Returns
true Objects of types L and R can be relationally be compared
false Objects of types L and R cannot be compared

Definition at line 125 of file traits.hpp.

◆ is_relationally_comparable() [2/2]

bool cudf::is_relationally_comparable ( data_type  type)

Checks whether data_type type supports relational comparisons.

Parameters
typeData_type for comparison.
Returns
true If type supports relational comparisons.
false If type does not support relational comparisons.

◆ is_rep_layout_compatible()

template<typename T >
constexpr bool cudf::is_rep_layout_compatible ( )
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.

Returns
true if T is layout compatible with its "representation" type

Definition at line 474 of file traits.hpp.

◆ is_signed_iterator()

template<typename Iterator >
constexpr bool cudf::is_signed_iterator ( )
inlineconstexpr

Indicates whether the Iterator value type is unsigned.

Template Parameters
IteratorThe type to verify
Returns
true if the iterator's value type is unsigned

Definition at line 253 of file traits.hpp.

◆ is_timestamp() [1/2]

template<typename T >
constexpr bool cudf::is_timestamp ( )
inlineconstexpr

Indicates whether the type T is a timestamp type.

Template Parameters
TThe type to verify
Returns
true T is a timestamp
false T is not a timestamp

Definition at line 373 of file traits.hpp.

◆ is_timestamp() [2/2]

bool cudf::is_timestamp ( data_type  type)

Indicates whether type is a timestamp data_type.

"Timestamp" types are int32_t or int64_t durations since the unix epoch.

Parameters
typeThe data_type to verify
Returns
true type is a timestamp
false type is not a timestamp

◆ is_unsigned() [1/2]

template<typename T >
constexpr bool cudf::is_unsigned ( )
inlineconstexpr

Indicates whether the type T is a unsigned numeric type.

Template Parameters
TThe type to verify
Returns
true T is unsigned numeric
false T is signed numeric

Definition at line 230 of file traits.hpp.

◆ is_unsigned() [2/2]

bool cudf::is_unsigned ( data_type  type)

Indicates whether type is a unsigned numeric data_type.

"Unsigned Numeric" types are fundamental integral types such as UINT*.

Parameters
typeThe data_type to verify
Returns
true type is unsigned numeric
false type is signed numeric

◆ operator!=()

bool cudf::operator!= ( data_type const &  lhs,
data_type const &  rhs 
)
inline

Compares two data_type objects for inequality.

// TODO Define exactly what it means for two data_types to be equal. e.g., are two timestamps with different resolutions equal? How about decimals with different scale/precision?

Parameters
lhsThe first data_type to compare
rhsThe second data_type to compare
Returns
true lhs is not equal to rhs
false lhs is equal to rhs

Definition at line 332 of file types.hpp.

◆ operator==()

constexpr bool cudf::operator== ( data_type const &  lhs,
data_type const &  rhs 
)
constexpr

Compares two data_type objects for equality.

// TODO Define exactly what it means for two data_types to be equal. e.g., are two timestamps with different resolutions equal? How about decimals with different scale/precision?

Parameters
lhsThe first data_type to compare
rhsThe second data_type to compare
Returns
true lhs is equal to rhs
false lhs is not equal to rhs

Definition at line 314 of file types.hpp.

◆ size_of()

std::size_t cudf::size_of ( data_type  t)

Returns the size in bytes of elements of the specified data_type

Note
Only fixed-width types are supported
Exceptions
cudf::logic_errorif is_fixed_width(element_type) == false
Parameters
tThe data_type to get the size of
Returns
Size in bytes of an element of the specified data_type