12 #include <cudf/utilities/export.hpp>
23 namespace CUDF_EXPORT
cudf {
245 return window_bounds(
true, std::numeric_limits<cudf::size_type>::max());
265 : _is_unbounded{is_unbounded_}, _value{value_}
269 bool const _is_unbounded;
594 std::span<rolling_request const> requests,
Representation for specifying desired aggregations from aggregation-based APIs, e....
Kind
Possible aggregation operations.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Indicator for the logical data type of an element in a column.
Derived class intended for rolling_window specific aggregation usage.
An owning class to represent a singular value.
A set of cudf::column_view's of the same size.
APIs for querying the default CUDA stream and per-thread default stream status.
std::pair< std::unique_ptr< column >, std::unique_ptr< column > > make_range_windows(table_view const &group_keys, column_view const &orderby, order order, null_order null_order, range_window_type preceding, range_window_type following, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Constructs preceding and following columns given window range specifications.
std::unique_ptr< column > grouped_rolling_window(table_view const &group_keys, column_view const &input, column_view const &default_outputs, window_bounds preceding_window, window_bounds following_window, size_type min_periods, rolling_aggregation const &aggr, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Applies a grouping-aware, fixed-size rolling window function to the values in a column.
bool is_valid_rolling_aggregation(data_type source, aggregation::Kind kind)
Indicate if a rolling aggregation is supported for a source datatype.
std::variant< unbounded, current_row, bounded_closed, bounded_open > range_window_type
The type of the range-based rolling window endpoint.
std::unique_ptr< table > grouped_range_rolling_window(table_view const &group_keys, table_view const &orderby, host_span< order const > orders, host_span< null_order const > null_orders, range_window_type preceding, range_window_type following, host_span< rolling_request const > requests, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Apply a grouping-aware range-based rolling window function to a sequence of columns,...
std::unique_ptr< column > rolling_window(column_view const &input, column_view const &preceding_window, column_view const &following_window, size_type min_periods, rolling_aggregation const &agg, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Applies a variable-size rolling window function to the values in a column.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
null_order
Indicates how null values compare against all other values.
int32_t size_type
Row index type for columns and tables.
order
Indicates the order in which elements should be sorted.
APIs for getting and setting the current device memory resource.
Class defining range-based window boundary sizes for rolling window operations.
Strongly typed wrapper for bounded closed rolling windows.
cudf::scalar const * delta() const noexcept
Return pointer to the row delta scalar.
bounded_closed(cudf::scalar const &delta)
Construct a bounded closed rolling window.
cudf::scalar const & delta_
Strongly typed wrapper for bounded open rolling windows.
cudf::scalar const & delta_
bounded_open(cudf::scalar const &delta)
Construct a bounded open rolling window.
cudf::scalar const * delta() const noexcept
Return pointer to the row delta scalar.
Strongly typed wrapper for current_row rolling windows.
constexpr cudf::scalar const * delta() const noexcept
Return a null row delta.
Host span, a non-owning view over a contiguous sequence of host-accessible elements.
Abstraction for window boundary sizes, to be used with grouped_range_rolling_window().
A request for a rolling aggregation on a column.
std::unique_ptr< rolling_aggregation > aggregation
Desired aggregation.
column_view values
Elements to aggregate.
size_type min_periods
Minimum number of observations required for the window to be valid.
Strongly typed wrapper for unbounded rolling windows.
constexpr cudf::scalar const * delta() const noexcept
Return a null row delta.
Abstraction for window boundary sizes.
static window_bounds unbounded()
Construct unbounded window boundary.
size_type value() const
Gets the row-boundary for this window_bounds.
bool is_unbounded() const
static window_bounds get(size_type value)
Construct bounded window boundary.
Type declarations for libcudf.