26 #include <rmm/cuda_stream_view.hpp>
27 #include <rmm/mr/device/per_device_resource.hpp>
28 #include <rmm/resource_ref.hpp>
39 class sort_groupby_helper;
77 std::vector<std::unique_ptr<groupby_scan_aggregation>>
aggregations;
89 std::vector<std::unique_ptr<column>>
results{};
129 sorted keys_are_sorted = sorted::NO,
130 std::vector<order>
const& column_order = {},
131 std::vector<null_order>
const& null_precedence = {});
186 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
188 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
195 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
197 rmm::cuda_stream_view stream,
198 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
250 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
scan(
252 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
304 std::pair<std::unique_ptr<table>, std::unique_ptr<table>>
shift(
307 std::vector<std::reference_wrapper<scalar const>>
const& fill_values,
308 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
337 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
377 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
383 sorted _keys_are_sorted{sorted::NO};
384 std::vector<order> _column_order{};
386 std::vector<null_order> _null_precedence{};
389 std::unique_ptr<detail::sort::sort_groupby_helper>
399 detail::sort::sort_groupby_helper& helper();
405 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> dispatch_aggregation(
406 host_span<aggregation_request const> requests,
407 rmm::cuda_stream_view stream,
408 rmm::device_async_resource_ref mr);
411 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_aggregate(
412 host_span<aggregation_request const> requests,
413 rmm::cuda_stream_view stream,
414 rmm::device_async_resource_ref mr);
416 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_scan(
417 host_span<scan_request const> requests,
418 rmm::cuda_stream_view stream,
419 rmm::device_async_resource_ref mr);
Representation for specifying desired aggregations from aggregation-based APIs, e....
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Groups values by keys and computes aggregations on those groups.
groups get_groups(cudf::table_view values={}, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Get the grouped keys and values corresponding to a groupby operation on a set of values.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations on the specified values.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations on the specified values.
groupby(table_view const &keys, null_policy null_handling=null_policy::EXCLUDE, sorted keys_are_sorted=sorted::NO, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={})
Construct a groupby object with the specified keys
std::pair< std::unique_ptr< table >, std::unique_ptr< table > > replace_nulls(table_view const &values, host_span< cudf::replace_policy const > replace_policies, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped replace nulls on value.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > scan(host_span< scan_request const > requests, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped scans on the specified values.
std::pair< std::unique_ptr< table >, std::unique_ptr< table > > shift(table_view const &values, host_span< size_type const > offsets, std::vector< std::reference_wrapper< scalar const >> const &fill_values, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped shifts for specified values.
A set of cudf::column_view's of the same size.
column view class definitions
std::unique_ptr< table > sort(table_view const &input, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs a lexicographic sort of the rows of a table.
null_policy
Enum to specify whether to include nulls or exclude nulls.
sorted
Indicates whether a collection of values is known to be sorted.
@ EXCLUDE
exclude null elements
Request for groupby aggregation(s) to perform on a column.
std::vector< std::unique_ptr< groupby_aggregation > > aggregations
Desired aggregations.
column_view values
The elements to aggregate.
The result(s) of an aggregation_request
std::vector< std::unique_ptr< column > > results
Columns of results from an aggregation_request
The grouped data corresponding to a groupby operation on a set of values.
std::unique_ptr< table > keys
Table of grouped keys.
std::vector< size_type > offsets
Group Offsets.
std::unique_ptr< table > values
Table of grouped values.
Request for groupby aggregation(s) for scanning a column.
column_view values
The elements to aggregate.
std::vector< std::unique_ptr< groupby_scan_aggregation > > aggregations
Desired aggregations.
C++20 std::span with reduced feature set.
Class definitions for (mutable)_table_view
Type declarations for libcudf.