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::HashAggregateGlobalSourceState Class Reference
Inheritance diagram for duckdb::HashAggregateGlobalSourceState:
Collaboration diagram for duckdb::HashAggregateGlobalSourceState:

Public Member Functions

 HashAggregateGlobalSourceState (ClientContext &context, const PhysicalHashAggregate &op)
idx_t MaxThreads () override
Public Member Functions inherited from duckdb::GlobalSourceState
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const
Public Member Functions inherited from duckdb::StateWithBlockableTasks
unique_lock< mutex > Lock ()
void PreventBlocking (const unique_lock< mutex > &guard)
bool BlockTask (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
 Add a task to 'blocked_tasks' before returning SourceResultType::BLOCKED (must hold the lock).
bool CanBlock (const unique_lock< mutex > &guard) const
bool UnblockTasks (const unique_lock< mutex > &guard)
 Unblock all tasks (must hold the lock).
SinkResultType BlockSink (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
SourceResultType BlockSource (const unique_lock< mutex > &guard, const InterruptState &interrupt_state)
void VerifyLock (const unique_lock< mutex > &guard) const

Public Attributes

const PhysicalHashAggregate & op
atomic< idx_t > state_index
vector< unique_ptr< GlobalSourceState > > radix_states

Constructor & Destructor Documentation

◆ HashAggregateGlobalSourceState()

duckdb::HashAggregateGlobalSourceState::HashAggregateGlobalSourceState ( ClientContext & context,
const PhysicalHashAggregate & op )
inline
160759 : op(op), state_index(0) {
160760 for (auto &grouping : op.groupings) {
160761 auto &rt = grouping.table_data;
160762 radix_states.push_back(rt.GetGlobalSourceState(context));
160763 }
160764 }

Member Function Documentation

◆ MaxThreads()

idx_t duckdb::HashAggregateGlobalSourceState::MaxThreads ( )
inlineoverridevirtual

Reimplemented from duckdb::GlobalSourceState.

160772 {
160773 // If there are no tables, we only need one thread.
160774 if (op.groupings.empty()) {
160775 return 1;
160776 }
160777
160778 auto &ht_state = op.sink_state->Cast<HashAggregateGlobalSinkState>();
160779 idx_t threads = 0;
160780 for (size_t sidx = 0; sidx < op.groupings.size(); ++sidx) {
160781 auto &grouping = op.groupings[sidx];
160782 auto &grouping_gstate = ht_state.grouping_states[sidx];
160783 threads += grouping.table_data.MaxThreads(*grouping_gstate.table_state);
160784 }
160785 return MaxValue<idx_t>(1, threads);
160786 }
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

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