26 #include <rmm/cuda_stream_view.hpp>
27 #include <rmm/mr/device/per_device_resource.hpp>
38 class sort_groupby_helper;
76 std::vector<std::unique_ptr<groupby_scan_aggregation>>
aggregations;
88 std::vector<std::unique_ptr<column>>
results{};
128 sorted keys_are_sorted = sorted::NO,
129 std::vector<order>
const& column_order = {},
130 std::vector<null_order>
const& null_precedence = {});
185 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
187 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
194 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
196 rmm::cuda_stream_view stream,
197 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
249 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
scan(
251 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
303 std::pair<std::unique_ptr<table>, std::unique_ptr<table>>
shift(
306 std::vector<std::reference_wrapper<scalar const>>
const& fill_values,
307 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
336 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
376 rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
382 sorted _keys_are_sorted{sorted::NO};
383 std::vector<order> _column_order{};
385 std::vector<null_order> _null_precedence{};
388 std::unique_ptr<detail::sort::sort_groupby_helper>
398 detail::sort::sort_groupby_helper& helper();
404 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> dispatch_aggregation(
405 host_span<aggregation_request const> requests,
406 rmm::cuda_stream_view stream,
407 rmm::mr::device_memory_resource* mr);
410 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_aggregate(
411 host_span<aggregation_request const> requests,
412 rmm::cuda_stream_view stream,
413 rmm::mr::device_memory_resource* mr);
415 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_scan(
416 host_span<scan_request const> requests,
417 rmm::cuda_stream_view stream,
418 rmm::mr::device_memory_resource* 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.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations 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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs grouped shifts for specified values.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > scan(host_span< scan_request const > requests, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs grouped scans on the specified values.
groups get_groups(cudf::table_view values={}, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Get the grouped keys and values corresponding to a groupby operation on a set of 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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs grouped replace nulls on value.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations on the 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::mr::device_memory_resource *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.