#pragma once
#include <cudf/reduction.hpp>
#include <cudf/types.hpp>
#include <memory>
#include "rust/cxx.h"
#include "column_shim.h"
#include "scalar_shim.h"
namespace cudf_shims {
std::unique_ptr<OwnedScalar> reduce(
const OwnedColumn& col,
int32_t agg_kind,
int32_t output_type_id);
std::unique_ptr<OwnedColumn> scan(
const OwnedColumn& col,
int32_t agg_kind,
bool inclusive);
std::unique_ptr<OwnedColumn> segmented_reduce(
const OwnedColumn& col,
const OwnedColumn& offsets,
int32_t agg_kind,
int32_t output_type_id,
bool include_nulls);
struct MinMaxResult {
std::unique_ptr<OwnedScalar> min_val;
std::unique_ptr<OwnedScalar> max_val;
};
std::unique_ptr<MinMaxResult> minmax(const OwnedColumn& col);
std::unique_ptr<OwnedScalar> minmax_take_min(MinMaxResult& result);
std::unique_ptr<OwnedScalar> minmax_take_max(MinMaxResult& result);
std::unique_ptr<OwnedScalar> reduce_with_init(
const OwnedColumn& col,
int32_t agg_kind,
int32_t output_type_id,
const OwnedScalar& init);
bool is_valid_reduction_aggregation(int32_t source_type_id, int32_t agg_kind);
std::unique_ptr<OwnedScalar> reduce_var_with_ddof(
const OwnedColumn& col,
int32_t ddof,
int32_t output_type_id);
std::unique_ptr<OwnedScalar> reduce_std_with_ddof(
const OwnedColumn& col,
int32_t ddof,
int32_t output_type_id);
}