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

Public Member Functions

 HashJoinFinalizeEvent (Pipeline &pipeline_p, HashJoinGlobalSinkState &sink)
void Schedule () override
void FinishEvent () override
 Called right after the event is finished.
Public Member Functions inherited from duckdb::BasePipelineEvent
 BasePipelineEvent (shared_ptr< Pipeline > pipeline)
 BasePipelineEvent (Pipeline &pipeline)
void PrintPipeline () override
Public Member Functions inherited from duckdb::Event
 Event (Executor &executor)
virtual void FinalizeFinish ()
 Called after the event is entirely finished.
void FinishTask ()
void Finish ()
void AddDependency (Event &event)
bool HasDependencies () const
const vector< reference< Event > > & GetParentsVerification () const
void CompleteDependency ()
void SetTasks (vector< shared_ptr< Task > > tasks)
void InsertEvent (shared_ptr< Event > replacement_event)
bool IsFinished () const
ClientContext & GetClientContext ()
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const
Public Member Functions inherited from duckdb::enable_shared_from_this< Event >
shared_ptr< Event > shared_from_this ()

Public Attributes

HashJoinGlobalSinkState & sink
Public Attributes inherited from duckdb::BasePipelineEvent
shared_ptr< Pipeline > pipeline
 The pipeline that this event belongs to.

Static Public Attributes

static constexpr idx_t CHUNKS_PER_TASK = 64

Additional Inherited Members

Protected Member Functions inherited from duckdb::enable_shared_from_this< Event >
enable_shared_from_this & operator= (enable_shared_from_this const &) noexcept
Protected Attributes inherited from duckdb::Event
Executor & executor
atomic< idx_t > finished_tasks
 The current threads working on the event.
atomic< idx_t > total_tasks
 The maximum amount of threads that can work on the event.
atomic< idx_t > finished_dependencies
idx_t total_dependencies
 The total amount of dependencies.
vector< weak_ptr< Event > > parents
 The events that depend on this event to run.
vector< reference< Event > > parents_raw
 Raw pointers to the parents (used for verification only).
atomic< bool > finished
 Whether or not the event is finished executing.

Constructor & Destructor Documentation

◆ HashJoinFinalizeEvent()

duckdb::HashJoinFinalizeEvent::HashJoinFinalizeEvent ( Pipeline & pipeline_p,
HashJoinGlobalSinkState & sink )
inline
184763 : BasePipelineEvent(pipeline_p), sink(sink) {
184764 }

Member Function Documentation

◆ Schedule()

void duckdb::HashJoinFinalizeEvent::Schedule ( )
inlineoverridevirtual

Implements duckdb::Event.

184769 {
184770 auto &context = pipeline->GetClientContext();
184771
184772 vector<shared_ptr<Task>> finalize_tasks;
184773 auto &ht = *sink.hash_table;
184774 const auto chunk_count = ht.GetDataCollection().ChunkCount();
184775
184776 // if the keys are too skewed, we finalize single-threaded
184777 if (FinalizeSingleThreaded(sink, true)) {
184778 // Single-threaded finalize
184779 finalize_tasks.push_back(
184780 make_uniq<HashJoinFinalizeTask>(shared_from_this(), context, sink, 0U, chunk_count, false, sink.op));
184781 } else {
184782 // Parallel finalize
184783 const idx_t chunks_per_task = context.config.verify_parallelism ? 1 : CHUNKS_PER_TASK;
184784 for (idx_t chunk_idx = 0; chunk_idx < chunk_count; chunk_idx += chunks_per_task) {
184785 auto chunk_idx_to = MinValue<idx_t>(chunk_idx + chunks_per_task, chunk_count);
184786 finalize_tasks.push_back(make_uniq<HashJoinFinalizeTask>(shared_from_this(), context, sink, chunk_idx,
184787 chunk_idx_to, true, sink.op));
184788 }
184789 }
184790 SetTasks(std::move(finalize_tasks));
184791 }
shared_ptr< Pipeline > pipeline
The pipeline that this event belongs to.
Definition duckdb.cpp:35137
static bool FinalizeSingleThreaded(const HashJoinGlobalSinkState &sink, const bool consider_skew)
Definition duckdb.cpp:184609
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ FinishEvent()

void duckdb::HashJoinFinalizeEvent::FinishEvent ( )
inlineoverridevirtual

Called right after the event is finished.

Reimplemented from duckdb::Event.

184793 {
184794 sink.hash_table->GetDataCollection().VerifyEverythingPinned();
184795 sink.hash_table->finalized = true;
184796 }

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