Namespaces | Classes | Typedefs | Enumerations | Functions
cudf Namespace Reference

cuDF interfaces More...

Namespaces

 dictionary
 Dictionary column APIs.
 
 groupby
 groupby APIs
 
 io
 IO interfaces.
 
 strings
 Strings column APIs.
 

Classes

class  aggregation
 Base class for specifying the desired aggregation in an aggregation_request. More...
 
class  column
 
class  column_device_view
 An immutable, non-owning view of device data as a column of elements that is trivially copyable and usable in CUDA device code. More...
 
class  column_view
 A non-owning, immutable view of device data as a column of elements, some of which may be null as indicated by a bitmask. More...
 
struct  contiguous_split_result
 The result(s) of a contiguous_split More...
 
struct  cuda_error
 Exception thrown when a CUDA error is encountered. More...
 
class  data_type
 Indicator for the logical data type of an element in a column. More...
 
class  dictionary_column_view
 A wrapper class for operations on a dictionary column. More...
 
struct  dictionary_wrapper
 A strongly typed wrapper for indices in a DICTIONARY type column. More...
 
class  element_equality_comparator
 Performs an equality comparison between two elements in two columns. More...
 
class  element_hasher
 Computes the hash value of an element in the given column. More...
 
class  element_relational_comparator
 Performs a relational comparison between two elements in two columns. More...
 
struct  id_to_type_impl
 
struct  is_boolean_impl
 
struct  is_compound_impl
 
struct  is_equality_comparable_impl
 
struct  is_equality_comparable_impl< L, R, void_t< equality_comparable< L, R > > >
 
struct  is_fixed_width_impl
 
struct  is_nested_impl
 
struct  is_numeric_impl
 
struct  is_relationally_comparable_impl
 
struct  is_relationally_comparable_impl< L, R, void_t< less_comparable< L, R >, greater_comparable< L, R > > >
 
struct  is_simple_impl
 
struct  is_timestamp_impl
 
class  list_view
 A non-owning, immutable view of device data that represents a list of elements of arbitrary type (including further nested lists). More...
 
struct  logic_error
 Exception thrown when logical precondition is violated. More...
 
class  mutable_column_device_view
 A mutable, non-owning view of device data as a column of elements that is trivially copyable and usable in CUDA device code. More...
 
class  mutable_column_view
 A non-owning, mutable view of device data as a column of elements, some of which may be null as indicated by a bitmask. More...
 
class  mutable_table_device_view
 
class  mutable_table_view
 A set of mutable_column_views of the same size. More...
 
class  numeric_scalar
 An owning class to represent a numerical value in device memory. More...
 
class  numeric_scalar_device_view
 A type of scalar_device_view that stores a pointer to a numerical value. More...
 
struct  order_info
 Indicates how a collection of values has been ordered. More...
 
class  row_equality_comparator
 
class  row_hasher
 Computes the hash value of a row in the given table. More...
 
class  row_hasher_initial_values
 Computes the hash value of a row in the given table, combined with an initial hash value for each column. More...
 
class  row_lexicographic_comparator
 Computes whether one row is lexicographically less than another row. More...
 
class  scalar
 An owning class to represent a singular value. More...
 
class  string_scalar
 An owning class to represent a string in device memory. More...
 
class  string_scalar_device_view
 A type of scalar_device_view that stores a pointer to a string value. More...
 
class  string_view
 A non-owning, immutable view of device data that is a variable length char array representing a UTF-8 string. More...
 
class  strings_column_view
 Given a column-view of strings type, an instance of this class provides a wrapper on this compound column for strings operations. More...
 
class  table
 
class  table_device_view
 
class  table_view
 A set of column_views of the same size. More...
 
class  timestamp_scalar
 An owning class to represent a timestamp value in device memory. More...
 
class  timestamp_scalar_device_view
 A type of scalar_device_view that stores a pointer to a timestamp value. More...
 
struct  type_to_name
 
struct  type_to_scalar_type_impl
 
struct  type_to_scalar_type_impl< cudf::dictionary32 >
 
struct  type_to_scalar_type_impl< cudf::list_view >
 
struct  type_to_scalar_type_impl< cudf::string_view >
 
struct  type_to_scalar_type_impl< std::string >
 

Typedefs

using char_utf8 = uint32_t
 
using size_type = int32_t
 
using bitmask_type = uint32_t
 
using valid_type = uint8_t
 
template<typename... >
using void_t = void
 
template<typename L , typename R >
using less_comparable = decltype(std::declval< L >()< std::declval< R >())
 
template<typename L , typename R >
using greater_comparable = decltype(std::declval< L >() > std::declval< R >())
 
template<typename L , typename R >
using equality_comparable = decltype(std::declval< L >()==std::declval< R >())
 
template<typename T >
using is_timestamp_t = simt::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 > >
 
template<cudf::type_id Id>
using 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 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 scalar_device_type_t = typename type_to_scalar_type_impl< T >::ScalarDeviceType
 
using dictionary32 = dictionary_wrapper< int32_t >
 
using timestamp_D = detail::timestamp< simt::std::chrono::duration< int32_t, simt::std::ratio< 86400 > >>
 Type alias representing an int32_t duration of days since the unix epoch.
 
using timestamp_s = detail::timestamp< simt::std::chrono::duration< int64_t, simt::std::ratio< 1 > >>
 Type alias representing an int64_t duration of seconds since the unix epoch.
 
using timestamp_ms = detail::timestamp< simt::std::chrono::duration< int64_t, simt::std::milli > >
 Type alias representing an int64_t duration of milliseconds since the unix epoch.
 
using timestamp_us = detail::timestamp< simt::std::chrono::duration< int64_t, simt::std::micro > >
 Type alias representing an int64_t duration of microseconds since the unix epoch.
 
using timestamp_ns = detail::timestamp< simt::std::chrono::duration< int64_t, simt::std::nano > >
 Type alias representing an int64_t duration of nanoseconds since the unix epoch.
 

Enumerations

enum  udf_type : bool { CUDA, PTX }
 
enum  binary_operator : int32_t {
  binary_operator::ADD, binary_operator::SUB, binary_operator::MUL, binary_operator::DIV,
  binary_operator::TRUE_DIV, binary_operator::FLOOR_DIV, binary_operator::MOD, binary_operator::PYMOD,
  binary_operator::POW, binary_operator::EQUAL, binary_operator::NOT_EQUAL, binary_operator::LESS,
  binary_operator::GREATER, binary_operator::LESS_EQUAL, binary_operator::GREATER_EQUAL, binary_operator::BITWISE_AND,
  binary_operator::BITWISE_OR, binary_operator::BITWISE_XOR, binary_operator::LOGICAL_AND, binary_operator::LOGICAL_OR,
  binary_operator::COALESCE, binary_operator::GENERIC_BINARY, binary_operator::SHIFT_LEFT, binary_operator::SHIFT_RIGHT,
  binary_operator::SHIFT_RIGHT_UNSIGNED, binary_operator::LOG_BASE, binary_operator::ATAN2, binary_operator::PMOD,
  binary_operator::NULL_EQUALS, binary_operator::NULL_MAX, binary_operator::NULL_MIN, binary_operator::INVALID_BINARY
}
 Types of binary operations that can be performed on data. More...
 
enum  mask_allocation_policy { mask_allocation_policy::NEVER, mask_allocation_policy::RETAIN, mask_allocation_policy::ALWAYS }
 Indicates when to allocate a mask, based on an existing mask. More...
 
enum  scan_type : bool { INCLUSIVE, EXCLUSIVE }
 
enum  rank_method {
  rank_method::FIRST, rank_method::AVERAGE, rank_method::MIN, rank_method::MAX,
  rank_method::DENSE
}
 Tie-breaker method to use for ranking the column. More...
 
enum  duplicate_keep_option { duplicate_keep_option::KEEP_FIRST = 0, duplicate_keep_option::KEEP_LAST, duplicate_keep_option::KEEP_NONE }
 Choices for drop_duplicates API for retainment of duplicate rows. More...
 
enum  weak_ordering { weak_ordering::LESS, weak_ordering::EQUIVALENT, weak_ordering::GREATER }
 Result type of the element_relational_comparator function object. More...
 
enum  order : bool { order::ASCENDING, order::DESCENDING }
 Indicates the order in which elements should be sorted. More...
 
enum  null_policy : bool { null_policy::EXCLUDE, null_policy::INCLUDE }
 Enum to specify whether to include nulls or exclude nulls. More...
 
enum  nan_policy : bool { nan_policy::NAN_IS_NULL, nan_policy::NAN_IS_VALID }
 Enum to treat NaN floating point value as null or non-null element. More...
 
enum  null_equality : bool { null_equality::EQUAL, null_equality::UNEQUAL }
 
enum  null_order : bool { null_order::AFTER, null_order::BEFORE }
 Indicates how null values compare against all other values. More...
 
enum  sorted : bool { NO, YES }
 Indicates whether a collection of values is known to be sorted.
 
enum  mask_state : int32_t { mask_state::UNALLOCATED, mask_state::UNINITIALIZED, mask_state::ALL_VALID, mask_state::ALL_NULL }
 Controls the allocation/initialization of a null mask. More...
 
enum  interpolation : int32_t {
  interpolation::LINEAR, interpolation::LOWER, interpolation::HIGHER, interpolation::MIDPOINT,
  interpolation::NEAREST
}
 Interpolation method to use when the desired quantile lies between two data points i and j. More...
 
enum  type_id {
  EMPTY = 0, INT8, INT16, INT32,
  INT64, FLOAT32, FLOAT64, BOOL8,
  TIMESTAMP_DAYS, TIMESTAMP_SECONDS, TIMESTAMP_MILLISECONDS, TIMESTAMP_MICROSECONDS,
  TIMESTAMP_NANOSECONDS, DICTIONARY32, STRING, LIST,
  NUM_TYPE_IDS
}
 Identifies a column's logical element type. More...
 
enum  unary_op : int32_t {
  SIN, COS, TAN, ARCSIN,
  ARCCOS, ARCTAN, SINH, COSH,
  TANH, ARCSINH, ARCCOSH, ARCTANH,
  EXP, LOG, SQRT, CBRT,
  CEIL, FLOOR, ABS, RINT,
  BIT_INVERT, NOT
}
 

Functions

std::unique_ptr< aggregationmake_sum_aggregation ()
 Factory to create a SUM aggregation.
 
std::unique_ptr< aggregationmake_product_aggregation ()
 Factory to create a PRODUCT aggregation.
 
std::unique_ptr< aggregationmake_min_aggregation ()
 Factory to create a MIN aggregation.
 
std::unique_ptr< aggregationmake_max_aggregation ()
 Factory to create a MAX aggregation.
 
std::unique_ptr< aggregationmake_count_aggregation (null_policy null_handling=null_policy::EXCLUDE)
 Factory to create a COUNT aggregation. More...
 
std::unique_ptr< aggregationmake_any_aggregation ()
 Factory to create a ANY aggregation.
 
std::unique_ptr< aggregationmake_all_aggregation ()
 Factory to create a ALL aggregation.
 
std::unique_ptr< aggregationmake_sum_of_squares_aggregation ()
 Factory to create a SUM_OF_SQUARES aggregation.
 
std::unique_ptr< aggregationmake_mean_aggregation ()
 Factory to create a MEAN aggregation.
 
std::unique_ptr< aggregationmake_variance_aggregation (size_type ddof=1)
 Factory to create a VARIANCE aggregation. More...
 
std::unique_ptr< aggregationmake_std_aggregation (size_type ddof=1)
 Factory to create a STD aggregation. More...
 
std::unique_ptr< aggregationmake_median_aggregation ()
 Factory to create a MEDIAN aggregation.
 
std::unique_ptr< aggregationmake_quantile_aggregation (std::vector< double > const &q, interpolation i=interpolation::LINEAR)
 Factory to create a QUANTILE aggregation. More...
 
std::unique_ptr< aggregationmake_argmax_aggregation ()
 Factory to create an argmax aggregation. More...
 
std::unique_ptr< aggregationmake_argmin_aggregation ()
 Factory to create an argmin aggregation. More...
 
std::unique_ptr< aggregationmake_nunique_aggregation (null_policy null_handling=null_policy::EXCLUDE)
 Factory to create a nunique aggregation. More...
 
std::unique_ptr< aggregationmake_nth_element_aggregation (size_type n, null_policy null_handling=null_policy::INCLUDE)
 Factory to create a nth_element aggregation. More...
 
std::unique_ptr< aggregationmake_row_number_aggregation ()
 Factory to create a ROW_NUMBER aggregation.
 
std::unique_ptr< aggregationmake_udf_aggregation (udf_type type, std::string const &user_defined_aggregator, data_type output_type)
 Factory to create an aggregation base on UDF for PTX or CUDA. More...
 
std::unique_ptr< columnbinary_operation (scalar const &lhs, column_view const &rhs, binary_operator op, data_type output_type, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a binary operation between a scalar and a column. More...
 
std::unique_ptr< columnbinary_operation (column_view const &lhs, scalar const &rhs, binary_operator op, data_type output_type, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a binary operation between a column and a scalar. More...
 
std::unique_ptr< columnbinary_operation (column_view const &lhs, column_view const &rhs, binary_operator op, data_type output_type, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a binary operation between two columns. More...
 
std::unique_ptr< columnbinary_operation (column_view const &lhs, column_view const &rhs, std::string const &ptx, data_type output_type, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a binary operation between two columns using a user-defined PTX function. More...
 
size_type count_descendants (column_view parent)
 Counts the number of descendants of the specified parent. More...
 
rmm::device_buffer concatenate_masks (std::vector< column_view > const &views, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Concatenates views[i]'s bitmask from the bits [views[i].offset(), views[i].offset() + views[i].size()) for all elements views[i] in views into a device_buffer More...
 
std::unique_ptr< columnconcatenate (std::vector< column_view > const &columns_to_concat, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Concatenates multiple columns into a single column. More...
 
std::unique_ptr< tableconcatenate (std::vector< table_view > const &tables_to_concat, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Columns of tables_to_concat are concatenated vertically to return a single table_view. More...
 
std::unique_ptr< tablegather (table_view const &source_table, column_view const &gather_map, bool check_bounds=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Gathers the specified rows (including null values) of a set of columns. More...
 
std::unique_ptr< tablescatter (table_view const &source, column_view const &scatter_map, table_view const &target, bool check_bounds=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Scatters the rows of the source table into a copy of the target table according to a scatter map. More...
 
std::unique_ptr< tablescatter (std::vector< std::unique_ptr< scalar >> const &source, column_view const &indices, table_view const &target, bool check_bounds=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Scatters a row of scalar values into a copy of the target table according to a scatter map. More...
 
std::unique_ptr< columnempty_like (column_view const &input)
 Initializes and returns an empty column of the same type as the input. More...
 
std::unique_ptr< columnallocate_like (column_view const &input, mask_allocation_policy mask_alloc=mask_allocation_policy::RETAIN, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates an uninitialized new column of the same size and type as the input. Supports only fixed-width types. More...
 
std::unique_ptr< columnallocate_like (column_view const &input, size_type size, mask_allocation_policy mask_alloc=mask_allocation_policy::RETAIN, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates an uninitialized new column of the specified size and same type as the input. Supports only fixed-width types. More...
 
std::unique_ptr< tableempty_like (table_view const &input_table)
 Creates a table of empty columns with the same types as the input_table More...
 
void copy_range_in_place (column_view const &source, mutable_column_view &target, size_type source_begin, size_type source_end, size_type target_begin)
 Copies a range of elements in-place from one column to another. More...
 
std::unique_ptr< columncopy_range (column_view const &source, column_view const &target, size_type source_begin, size_type source_end, size_type target_begin, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Copies a range of elements out-of-place from one column to another. More...
 
std::vector< column_viewslice (column_view const &input, std::vector< size_type > const &indices)
 Slices a column_view into a set of column_views according to a set of indices. More...
 
std::vector< table_viewslice (table_view const &input, std::vector< size_type > const &indices)
 Slices a table_view into a set of table_views according to a set of indices. More...
 
std::vector< column_viewsplit (column_view const &input, std::vector< size_type > const &splits)
 Splits a column_view into a set of column_views according to a set of indices derived from expected splits. More...
 
std::vector< table_viewsplit (table_view const &input, std::vector< size_type > const &splits)
 Splits a table_view into a set of table_views according to a set of indices derived from expected splits. More...
 
std::vector< contiguous_split_resultcontiguous_split (cudf::table_view const &input, std::vector< size_type > const &splits, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a deep-copy split of a table_view into a set of table_views into a single contiguous block of memory. More...
 
std::unique_ptr< columncopy_if_else (column_view const &lhs, column_view const &rhs, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns a new column, where each element is selected from either lhs or rhs based on the value of the corresponding element in boolean_mask. More...
 
std::unique_ptr< columnshift (column_view const &input, size_type offset, scalar const &fill_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource(), cudaStream_t stream=0)
 Creates a new column by shifting all values by an offset. More...
 
std::unique_ptr< columncopy_if_else (scalar const &lhs, column_view const &rhs, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns a new column, where each element is selected from either lhs or rhs based on the value of the corresponding element in boolean_mask. More...
 
std::unique_ptr< columncopy_if_else (column_view const &lhs, scalar const &rhs, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns a new column, where each element is selected from either lhs or rhs based on the value of the corresponding element in boolean_mask. More...
 
std::unique_ptr< columncopy_if_else (scalar const &lhs, scalar const &rhs, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns a new column, where each element is selected from either lhs or rhs based on the value of the corresponding element in boolean_mask. More...
 
std::unique_ptr< tableboolean_mask_scatter (table_view const &input, table_view const &target, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Scatters rows from the input table to rows of the output corresponding to true values in a boolean mask. More...
 
std::unique_ptr< tableboolean_mask_scatter (std::vector< std::reference_wrapper< scalar >> const &input, table_view const &target, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Scatters scalar values to rows of the output corresponding to true values in a boolean mask. More...
 
std::unique_ptr< scalarget_element (column_view const &input, size_type index, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Get the element at specified index from a column. More...
 
std::unique_ptr< columnmake_dictionary_column (column_view const &keys_column, column_view const &indices_column, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource(), cudaStream_t stream=0)
 Construct a dictionary column by copying the provided keys and indices. More...
 
std::unique_ptr< columnmake_dictionary_column (std::unique_ptr< column > keys_column, std::unique_ptr< column > indices_column, rmm::device_buffer &&null_mask, size_type null_count)
 Construct a dictionary column by taking ownership of the provided keys and indices columns. More...
 
std::unique_ptr< tablefrom_dlpack (DLManagedTensor const *managed_tensor, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Convert a DLPack DLTensor into a cudf table. More...
 
DLManagedTensor * to_dlpack (table_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Convert a cudf table into a DLPack DLTensor. More...
 
void fill_in_place (mutable_column_view &destination, size_type begin, size_type end, scalar const &value)
 Fills a range of elements in-place in a column with a scalar value. More...
 
std::unique_ptr< columnfill (column_view const &input, size_type begin, size_type end, scalar const &value, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Fills a range of elements in a column out-of-place with a scalar value. More...
 
std::unique_ptr< tablerepeat (table_view const &input_table, column_view const &count, bool check_count=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Repeat rows of a Table. More...
 
std::unique_ptr< tablerepeat (table_view const &input_table, scalar const &count, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Repeat rows of a Table. More...
 
std::unique_ptr< columnsequence (size_type size, scalar const &init, scalar const &step, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Fills a column with a sequence of value specified by an initial value and a step. More...
 
std::unique_ptr< columnsequence (size_type size, scalar const &init, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Fills a column with a sequence of value specified by an initial value and a step of 1. More...
 
std::unique_ptr< columnhash (table_view const &input, std::vector< uint32_t > const &initial_hash={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the hash value of each row in the input set of columns. More...
 
std::unique_ptr< cudf::tableinner_join (cudf::table_view const &left, cudf::table_view const &right, std::vector< cudf::size_type > const &left_on, std::vector< cudf::size_type > const &right_on, std::vector< std::pair< cudf::size_type, cudf::size_type >> const &columns_in_common, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs an inner join on the specified columns of two tables (left, right) More...
 
std::unique_ptr< cudf::tableleft_join (cudf::table_view const &left, cudf::table_view const &right, std::vector< cudf::size_type > const &left_on, std::vector< cudf::size_type > const &right_on, std::vector< std::pair< cudf::size_type, cudf::size_type >> const &columns_in_common, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a left join (also known as left outer join) on the specified columns of two tables (left, right) More...
 
std::unique_ptr< cudf::tablefull_join (cudf::table_view const &left, cudf::table_view const &right, std::vector< cudf::size_type > const &left_on, std::vector< cudf::size_type > const &right_on, std::vector< std::pair< cudf::size_type, cudf::size_type >> const &columns_in_common, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a full join (also known as full outer join) on the specified columns of two tables (left, right) More...
 
std::unique_ptr< cudf::tableleft_semi_join (cudf::table_view const &left, cudf::table_view const &right, std::vector< cudf::size_type > const &left_on, std::vector< cudf::size_type > const &right_on, std::vector< cudf::size_type > const &return_columns, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a left semi join on the specified columns of two tables (left, right) More...
 
std::unique_ptr< cudf::tableleft_anti_join (cudf::table_view const &left, cudf::table_view const &right, std::vector< cudf::size_type > const &left_on, std::vector< cudf::size_type > const &right_on, std::vector< cudf::size_type > const &return_columns, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a left anti join on the specified columns of two tables (left, right) More...
 
std::unique_ptr< cudf::tablemerge (std::vector< table_view > const &tables_to_merge, std::vector< cudf::size_type > const &key_cols, std::vector< cudf::order > const &column_order, std::vector< cudf::null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Merge a set of sorted tables. More...
 
size_type state_null_count (mask_state state, size_type size)
 Returns the null count for a null mask of the specified state representing size elements. More...
 
std::size_t bitmask_allocation_size_bytes (size_type number_of_bits, std::size_t padding_boundary=64)
 Computes the required bytes necessary to represent the specified number of bits with a given padding boundary. More...
 
size_type num_bitmask_words (size_type number_of_bits)
 Returns the number of bitmask_type words required to represent the specified number of bits. More...
 
rmm::device_buffer create_null_mask (size_type size, mask_state state, cudaStream_t stream=0, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a device_buffer for use as a null value indicator bitmask of a column. More...
 
void set_null_mask (bitmask_type *bitmask, size_type begin_bit, size_type end_bit, bool valid, cudaStream_t stream=0)
 Sets a pre-allocated bitmask buffer to a given state in the range [begin_bit, end_bit) More...
 
cudf::size_type count_set_bits (bitmask_type const *bitmask, size_type start, size_type stop)
 Given a bitmask, counts the number of set (1) bits in the range [start, stop) More...
 
cudf::size_type count_unset_bits (bitmask_type const *bitmask, size_type start, size_type stop)
 Given a bitmask, counts the number of unset (0) bits in the range [start, stop). More...
 
std::vector< size_type > segmented_count_set_bits (bitmask_type const *bitmask, std::vector< cudf::size_type > const &indices)
 Given a bitmask, counts the number of set (1) bits in every range [indices[2*i], indices[(2*i)+1]) (where 0 <= i < indices.size() / 2). More...
 
std::vector< size_type > segmented_count_unset_bits (bitmask_type const *bitmask, std::vector< cudf::size_type > const &indices)
 Given a bitmask, counts the number of unset (0) bits in every range [indices[2*i], indices[(2*i)+1]) (where 0 <= i < indices.size() / 2). More...
 
rmm::device_buffer copy_bitmask (bitmask_type const *mask, size_type begin_bit, size_type end_bit, cudaStream_t stream=0, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a device_buffer from a slice of bitmask defined by a range of indices [begin_bit, end_bit). More...
 
rmm::device_buffer copy_bitmask (column_view const &view, cudaStream_t stream=0, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Copies view's bitmask from the bits [view.offset(), view.offset() + view.size()) into a device_buffer More...
 
rmm::device_buffer bitmask_and (table_view const &view, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource(), cudaStream_t stream=0)
 Returns a bitwise AND of the bitmasks of columns of a table. More...
 
std::pair< std::unique_ptr< table >, std::vector< size_type > > partition (table_view const &t, column_view const &partition_map, size_type num_partitions, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Partitions rows of t according to the mapping specified by partition_map. More...
 
std::pair< std::unique_ptr< table >, std::vector< size_type > > hash_partition (table_view const &input, std::vector< size_type > const &columns_to_hash, int num_partitions, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Partitions rows from the input table into multiple output tables. More...
 
std::pair< std::unique_ptr< cudf::table >, std::vector< cudf::size_type > > round_robin_partition (table_view const &input, cudf::size_type num_partitions, cudf::size_type start_partition=0, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Round-robin partition. More...
 
std::unique_ptr< columnquantile (column_view const &input, std::vector< double > const &q, interpolation interp=interpolation::LINEAR, column_view const &ordered_indices={}, bool exact=true, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes quantiles with interpolation. More...
 
std::unique_ptr< tablequantiles (table_view const &input, std::vector< double > const &q, interpolation interp=interpolation::NEAREST, cudf::sorted is_input_sorted=sorted::NO, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns the rows of the input corresponding to the requested quantiles. More...
 
std::unique_ptr< scalarreduce (const column_view &col, std::unique_ptr< aggregation > const &agg, data_type output_dtype, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the reduction of the values in all rows of a column. More...
 
std::unique_ptr< columnscan (const column_view &input, std::unique_ptr< aggregation > const &agg, scan_type inclusive, null_policy null_handling=null_policy::EXCLUDE, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the scan of a column. More...
 
std::unique_ptr< columnreplace_nulls (column_view const &input, column_view const &replacement, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces all null values in a column with corresponding values of another column. More...
 
std::unique_ptr< columnreplace_nulls (column_view const &input, scalar const &replacement, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces all null values in a column with a scalar. More...
 
std::unique_ptr< columnreplace_nans (column_view const &input, column_view const &replacement, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces all NaN values in a column with corresponding values from another column. More...
 
std::unique_ptr< columnreplace_nans (column_view const &input, scalar const &replacement, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces all NaN values in a column with a scalar. More...
 
std::unique_ptr< columnfind_and_replace_all (column_view const &input_col, column_view const &values_to_replace, column_view const &replacement_values, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Return a copy of input_col replacing any values_to_replace[i] found with replacement_values[i]. More...
 
std::unique_ptr< columnclamp (column_view const &input, scalar const &lo, scalar const &lo_replace, scalar const &hi, scalar const &hi_replace, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces values less than lo in input with lo_replace, and values greater than hi with hi_replace. More...
 
std::unique_ptr< columnclamp (column_view const &input, scalar const &lo, scalar const &hi, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Replaces values less than lo in input with lo, and values greater than hi with hi. More...
 
std::unique_ptr< columnnormalize_nans_and_zeros (column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Copies from a column of floating-point elements and replaces -NaN and -0.0 with +NaN and +0.0, respectively. More...
 
void normalize_nans_and_zeros (mutable_column_view &in_out)
 Modifies a column of floating-point elements to replace all -NaN and -0.0 with +NaN and +0.0, respectively. More...
 
std::unique_ptr< columninterleave_columns (table_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Interleave columns of a table into a single column. More...
 
std::unique_ptr< tabletile (table_view const &input, size_type count, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Repeats the rows from input table count times to form a new table. More...
 
std::unique_ptr< columnrolling_window (column_view const &input, size_type preceding_window, size_type following_window, size_type min_periods, std::unique_ptr< aggregation > const &agg, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Applies a fixed-size rolling window function to the values in a column. More...
 
std::unique_ptr< columngrouped_rolling_window (table_view const &group_keys, column_view const &input, size_type preceding_window, size_type following_window, size_type min_periods, std::unique_ptr< aggregation > const &aggr, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Applies a grouping-aware, fixed-size rolling window function to the values in a column. More...
 
std::unique_ptr< columngrouped_time_range_rolling_window (table_view const &group_keys, column_view const &timestamp_column, cudf::order const &timestamp_order, column_view const &input, size_type preceding_window_in_days, size_type following_window_in_days, size_type min_periods, std::unique_ptr< aggregation > const &aggr, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Applies a grouping-aware, timestamp-based rolling window function to the values in a column. More...
 
std::unique_ptr< columnrolling_window (column_view const &input, column_view const &preceding_window, column_view const &following_window, size_type min_periods, std::unique_ptr< aggregation > const &agg, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Applies a variable-size rolling window function to the values in a column. More...
 
template<typename T >
auto get_scalar_device_view (numeric_scalar< T > &s)
 Get the device view of a numeric_scalar.
 
auto get_scalar_device_view (string_scalar &s)
 Get the device view of a string_scalar.
 
template<typename T >
auto get_scalar_device_view (timestamp_scalar< T > &s)
 Get the device view of a timestamp_scalar.
 
std::unique_ptr< columnlower_bound (table_view const &t, table_view const &values, std::vector< order > const &column_order, std::vector< null_order > const &null_precedence, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Find smallest indices in a sorted table where values should be inserted to maintain order. More...
 
std::unique_ptr< columnupper_bound (table_view const &t, table_view const &values, std::vector< order > const &column_order, std::vector< null_order > const &null_precedence, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Find largest indices in a sorted table where values should be inserted to maintain order. More...
 
bool contains (column_view const &col, scalar const &value, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Find if the value is present in the col More...
 
std::unique_ptr< columncontains (column_view const &haystack, column_view const &needles, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Returns a new column of type bool identifying for each element of haystack column, if that element is contained in needles column. More...
 
std::unique_ptr< columnsorted_order (table_view input, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the row indices that would produce input in a lexicographical sorted order. More...
 
std::unique_ptr< columnstable_sorted_order (table_view input, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the row indices that would produce input in a stable lexicographical sorted order. More...
 
bool is_sorted (cudf::table_view const &table, std::vector< order > const &column_order, std::vector< null_order > const &null_precedence)
 Checks whether the rows of a table are sorted in a lexicographical order. More...
 
std::unique_ptr< tablesort (table_view input, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a lexicographic sort of the rows of a table. More...
 
std::unique_ptr< tablesort_by_key (table_view const &values, table_view const &keys, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs a key-value sort. More...
 
std::unique_ptr< columnrank (column_view const &input, rank_method method, order column_order, null_policy null_handling, null_order null_precedence, bool percentage, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Computes the ranks of input column in sorted order. More...
 
std::unique_ptr< tabledrop_nulls (table_view const &input, std::vector< size_type > const &keys, cudf::size_type keep_threshold, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Filters a table to remove null elements with threshold count. More...
 
std::unique_ptr< tabledrop_nulls (table_view const &input, std::vector< size_type > const &keys, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Filters a table to remove null elements. More...
 
std::unique_ptr< tableapply_boolean_mask (table_view const &input, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Filters input using boolean_mask of boolean values as a mask. More...
 
std::unique_ptr< tabledrop_duplicates (table_view const &input, std::vector< size_type > const &keys, duplicate_keep_option keep, null_equality nulls_equal=null_equality::EQUAL, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Create a new table without duplicate rows. More...
 
cudf::size_type unique_count (column_view const &input, null_policy null_handling, nan_policy nan_handling)
 Count the unique elements in the column_view. More...
 
template<typename Element , std::enable_if_t< std::is_floating_point< Element >::value > * = nullptr>
__device__ weak_ordering relational_compare (Element lhs, Element rhs)
 A specialization for non-floating-point Element type relational comparison to derive the order of the elements with respect to lhs. More...
 
template<typename Element , std::enable_if_t< std::is_floating_point< Element >::value > * = nullptr>
__device__ bool equality_compare (Element lhs, Element rhs)
 A specialization for floating-point Element type to check if lhs is equivalent to rhs. nan == nan. More...
 
bool has_nulls (table_view view)
 
bool have_same_types (table_view const &lhs, table_view const &rhs)
 
std::unique_ptr< columntransform (column_view const &input, std::string const &unary_udf, data_type output_type, bool is_ptx, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a new column by applying a unary function against every element of an input column. More...
 
std::pair< std::unique_ptr< rmm::device_buffer >, size_type > nans_to_nulls (column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a null_mask from input by converting NaN to null and preserving existing null values and also returns new null_count. More...
 
std::pair< std::unique_ptr< rmm::device_buffer >, cudf::size_type > bools_to_mask (column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a bitmask from a column of boolean elements. More...
 
std::pair< std::unique_ptr< column >, table_viewtranspose (table_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Transposes a table. More...
 
bool operator== (data_type const &lhs, data_type const &rhs)
 Compares two data_type objects for equality. More...
 
std::size_t size_of (data_type t)
 Returns the size in bytes of elements of the specified data_type More...
 
std::unique_ptr< cudf::columnunary_operation (cudf::column_view const &input, cudf::unary_op op, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Performs unary op on all values in column. More...
 
std::unique_ptr< cudf::columnis_null (cudf::column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a column of BOOL8 elements where for every element in input true indicates the value is null and false indicates the value is valid. More...
 
std::unique_ptr< cudf::columnis_valid (cudf::column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a column of BOOL8 elements where for every element in input true indicates the value is valid and false indicates the value is null. More...
 
std::unique_ptr< columncast (column_view const &input, data_type out_type, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Casts data from dtype specified in input to dtype specified in output. Supports only fixed-width types. More...
 
std::unique_ptr< columnis_nan (cudf::column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a column of BOOL8 elements indicating the presence of NaN values in a column of floating point values. The output element at row i is true if the element in input at row i is NAN, else false More...
 
std::unique_ptr< columnis_not_nan (cudf::column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_default_resource())
 Creates a column of BOOL8 elements indicating the absence of NaN values in a column of floating point values. The output element at row i is false if the element in input at row i is NAN, else true More...
 
constexpr CUDA_HOST_DEVICE_CALLABLE size_type word_index (size_type bit_index)
 Returns the index of the word containing the specified bit.
 
constexpr CUDA_HOST_DEVICE_CALLABLE size_type intra_word_index (size_type bit_index)
 Returns the position within a word of the specified bit.
 
CUDA_HOST_DEVICE_CALLABLE void set_bit_unsafe (bitmask_type *bitmask, size_type bit_index)
 Sets the specified bit to 1 More...
 
CUDA_HOST_DEVICE_CALLABLE void clear_bit_unsafe (bitmask_type *bitmask, size_type bit_index)
 Sets the specified bit to 0 More...
 
CUDA_HOST_DEVICE_CALLABLE bool bit_is_set (bitmask_type const *bitmask, size_type bit_index)
 Indicates whether the specified bit is set to 1 More...
 
constexpr CUDA_HOST_DEVICE_CALLABLE bitmask_type set_least_significant_bits (size_type n)
 Returns a bitmask word with the n least significant bits set. More...
 
constexpr CUDA_HOST_DEVICE_CALLABLE bitmask_type set_most_significant_bits (size_type n)
 Returns a bitmask word with the n most significant bits set. More...
 
template<typename L , typename R >
constexpr bool is_relationally_comparable ()
 Indicates whether objects of types L and R can be relationally compared. More...
 
template<typename L , typename R >
constexpr bool is_equality_comparable ()
 Indicates whether objects of types L and R can be compared for equality. More...
 
template<typename T >
constexpr bool is_numeric ()
 Indicates whether the type T is a numeric type. More...
 
constexpr bool is_numeric (data_type type)
 Indicates whether type is a numeric data_type. More...
 
template<typename T >
constexpr bool is_boolean ()
 Indicates whether T is a Boolean type. More...
 
constexpr bool is_boolean (data_type type)
 Indicates whether type is a Boolean data_type. More...
 
template<typename T >
constexpr bool is_timestamp ()
 Indicates whether the type T is a timestamp type. More...
 
constexpr bool is_timestamp (data_type type)
 Indicates whether type is a timestamp data_type. More...
 
template<typename T >
constexpr bool is_fixed_width ()
 Indicates whether elements of type T are fixed-width. More...
 
constexpr bool is_fixed_width (data_type type)
 Indicates whether elements of type are fixed-width. More...
 
template<typename T >
constexpr bool is_compound ()
 Indicates whether the type T is a compound type. More...
 
constexpr bool is_compound (data_type type)
 Indicates whether elements of type are compound. More...
 
template<typename T >
constexpr bool is_simple ()
 Indicates whether the type T is a simple type. More...
 
constexpr bool is_simple (data_type type)
 Indicates whether elements of type are simple. More...
 
template<typename T >
constexpr bool is_nested ()
 Indicates whether T is a nested type. More...
 
constexpr bool is_nested (data_type type)
 Indicates whether type is a nested type. More...
 
template<typename T >
constexpr type_id type_to_id ()
 Maps a C++ type to it's corresponding cudf::type_id More...
 
 CUDF_TYPE_MAPPING (bool, type_id::BOOL8)
 Defines all of the mappings between C++ types and their corresponding cudf::type_id values.
 
 CUDF_TYPE_MAPPING (int8_t, type_id::INT8)
 
 CUDF_TYPE_MAPPING (int16_t, type_id::INT16)
 
 CUDF_TYPE_MAPPING (int32_t, type_id::INT32)
 
 CUDF_TYPE_MAPPING (int64_t, type_id::INT64)
 
 CUDF_TYPE_MAPPING (float, type_id::FLOAT32)
 
 CUDF_TYPE_MAPPING (double, type_id::FLOAT64)
 
 CUDF_TYPE_MAPPING (cudf::string_view, type_id::STRING)
 
 CUDF_TYPE_MAPPING (cudf::timestamp_D, type_id::TIMESTAMP_DAYS)
 
 CUDF_TYPE_MAPPING (cudf::timestamp_s, type_id::TIMESTAMP_SECONDS)
 
 CUDF_TYPE_MAPPING (cudf::timestamp_ms, type_id::TIMESTAMP_MILLISECONDS)
 
 CUDF_TYPE_MAPPING (cudf::timestamp_us, type_id::TIMESTAMP_MICROSECONDS)
 
 CUDF_TYPE_MAPPING (cudf::timestamp_ns, type_id::TIMESTAMP_NANOSECONDS)
 
 CUDF_TYPE_MAPPING (dictionary32, type_id::DICTIONARY32)
 
 CUDF_TYPE_MAPPING (cudf::list_view, type_id::LIST)
 
 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 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<typename Integer >
CUDA_HOST_DEVICE_CALLABLE bool operator== (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 
template<typename Integer >
CUDA_HOST_DEVICE_CALLABLE bool operator!= (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 
template<typename Integer >
CUDA_HOST_DEVICE_CALLABLE bool operator<= (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 
template<typename Integer >
CUDA_HOST_DEVICE_CALLABLE bool operator>= (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 
template<typename Integer >
constexpr CUDA_HOST_DEVICE_CALLABLE bool operator< (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 
template<typename Integer >
CUDA_HOST_DEVICE_CALLABLE bool operator> (dictionary_wrapper< Integer > const &lhs, dictionary_wrapper< Integer > const &rhs)
 

Detailed Description

cuDF interfaces

Enumeration Type Documentation

◆ weak_ordering

enum cudf::weak_ordering
strong

Result type of the element_relational_comparator function object.

Indicates how two elements a and b compare with one and another.

Equivalence is defined as not (a<b) and not (b<a). Elements that are EQUIVALENT may not necessarily be equal.

Enumerator
LESS 

Indicates a is less than (ordered before) b

EQUIVALENT 

Indicates a is ordered neither before nor after b

GREATER 

Indicates a is greater than (ordered after) b

Function Documentation

◆ count_descendants()

size_type cudf::count_descendants ( column_view  parent)

Counts the number of descendants of the specified parent.

Parameters
parentThe parent whose descendants will be counted
Returns
size_type The number of descendants of the parent

◆ equality_compare()

template<typename Element , std::enable_if_t< std::is_floating_point< Element >::value > * = nullptr>
__device__ bool cudf::equality_compare ( Element  lhs,
Element  rhs 
)

A specialization for floating-point Element type to check if lhs is equivalent to rhs. nan == nan.

A specialization for non-floating-point Element type to check if lhs is equivalent to rhs.

Parameters
[in]lhsfirst element
[in]rhssecond element
Returns
bool true if lhs == rhs else false.

◆ relational_compare()

template<typename Element , std::enable_if_t< std::is_floating_point< Element >::value > * = nullptr>
__device__ weak_ordering cudf::relational_compare ( Element  lhs,
Element  rhs 
)

A specialization for non-floating-point Element type relational comparison to derive the order of the elements with respect to lhs.

Parameters
[in]lhsfirst element
[in]rhssecond element
Returns
weak_ordering Indicates the relationship between the elements in the lhs and rhs columns.