Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::UngroupedAggregateState Struct Reference
Collaboration diagram for duckdb::UngroupedAggregateState:

Public Member Functions

 UngroupedAggregateState (const vector< unique_ptr< Expression > > &aggregate_expressions)
void Move (UngroupedAggregateState &other)

Public Attributes

const vector< unique_ptr< Expression > > & aggregate_expressions
 Aggregates.
vector< unsafe_unique_array< data_t > > aggregate_data
 The aggregate values.
vector< optional_ptr< FunctionData > > bind_data
 The bind data.
vector< aggregate_destructor_t > destructors
 The destructors.
unique_array< atomic< idx_t > > counts
 Counts (used for verification).

Constructor & Destructor Documentation

◆ UngroupedAggregateState()

duckdb::UngroupedAggregateState::UngroupedAggregateState ( const vector< unique_ptr< Expression > > & aggregate_expressions)
explicit
162621 counts = make_uniq_array<atomic<idx_t>>(aggregate_expressions.size());
162622 for (idx_t i = 0; i < aggregate_expressions.size(); i++) {
162623 auto &aggregate = aggregate_expressions[i];
162624 D_ASSERT(aggregate->GetExpressionClass() == ExpressionClass::BOUND_AGGREGATE);
162625 auto &aggr = aggregate->Cast<BoundAggregateExpression>();
162626 auto state = make_unsafe_uniq_array_uninitialized<data_t>(aggr.function.GetStateSizeCallback()(aggr.function));
162627 aggr.function.GetStateInitCallback()(aggr.function, state.get());
162628 aggregate_data.push_back(std::move(state));
162629 bind_data.push_back(aggr.bind_info.get());
162630 destructors.push_back(aggr.function.GetStateDestructorCallback());
162631#ifdef DEBUG
162632 counts[i] = 0;
162633#endif
162634 }
162635}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
vector< optional_ptr< FunctionData > > bind_data
The bind data.
Definition duckdb.cpp:160997
vector< unsafe_unique_array< data_t > > aggregate_data
The aggregate values.
Definition duckdb.cpp:160995
unique_array< atomic< idx_t > > counts
Counts (used for verification).
Definition duckdb.cpp:161001
const vector< unique_ptr< Expression > > & aggregate_expressions
Aggregates.
Definition duckdb.cpp:160993
vector< aggregate_destructor_t > destructors
The destructors.
Definition duckdb.cpp:160999

◆ ~UngroupedAggregateState()

duckdb::UngroupedAggregateState::~UngroupedAggregateState ( )
162636 {
162637 D_ASSERT(destructors.size() == aggregate_data.size());
162638 for (idx_t i = 0; i < destructors.size(); i++) {
162639 if (!destructors[i]) {
162640 continue;
162641 }
162642 Vector state_vector(Value::POINTER(CastPointerToValue(aggregate_data[i].get())));
162643 state_vector.SetVectorType(VectorType::FLAT_VECTOR);
162644
162645 ArenaAllocator allocator(Allocator::DefaultAllocator());
162646 AggregateInputData aggr_input_data(bind_data[i], allocator);
162647 destructors[i](state_vector, aggr_input_data, 1);
162648 }
162649}
static DUCKDB_API Value POINTER(uintptr_t value)
Create a pointer Value from a specified value.
Definition duckdb.cpp:132331
__host__ cudaTextureObject_t get() const noexcept

Member Function Documentation

◆ Move()

void duckdb::UngroupedAggregateState::Move ( UngroupedAggregateState & other)
162651 {
162652 other.aggregate_data = std::move(aggregate_data);
162653 other.destructors = std::move(destructors);
162654}

The documentation for this struct was generated from the following file: