generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Taking out csr of path finding operator
- Loading branch information
Showing
15 changed files
with
332 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#include "duckpgq/core/operator/event/csr_edge_creation_event.hpp" | ||
#include <duckpgq/core/operator/task/csr_edge_creation_task.hpp> | ||
|
||
namespace duckpgq { | ||
namespace core { | ||
|
||
CSREdgeCreationEvent::CSREdgeCreationEvent(PathFindingGlobalState &gstate_p, Pipeline &pipeline_p, const PhysicalOperator &op_p) | ||
: BasePipelineEvent(pipeline_p), gstate(gstate_p), op(op_p) {} | ||
|
||
void CSREdgeCreationEvent::Schedule() { | ||
auto &context = pipeline->GetClientContext(); | ||
auto &ts = TaskScheduler::GetScheduler(context); | ||
idx_t num_threads = ts.NumberOfThreads(); | ||
auto &scan_state = gstate.scan_state; | ||
auto &global_inputs = gstate.global_inputs; | ||
|
||
global_inputs->InitializeScan(scan_state); | ||
|
||
vector<shared_ptr<Task>> tasks; | ||
for (idx_t tnum = 0; tnum < num_threads; tnum++) { | ||
tasks.push_back(make_uniq<PhysicalCSREdgeCreationTask>(shared_from_this(), | ||
context, gstate, op)); | ||
} | ||
SetTasks(std::move(tasks)); | ||
} | ||
|
||
void CSREdgeCreationEvent::FinishEvent() { | ||
auto &gstate = this->gstate; | ||
auto &global_csr = gstate.global_csr; | ||
global_csr->is_ready = true; | ||
} | ||
|
||
} // namespace core | ||
} // namespace duckpgq | ||
// #include "duckpgq/core/operator/event/csr_edge_creation_event.hpp" | ||
// #include <duckpgq/core/operator/task/csr_edge_creation_task.hpp> | ||
// | ||
// namespace duckpgq { | ||
// namespace core { | ||
// | ||
// CSREdgeCreationEvent::CSREdgeCreationEvent(PathFindingGlobalState &gstate_p, Pipeline &pipeline_p, const PhysicalOperator &op_p) | ||
// : BasePipelineEvent(pipeline_p), gstate(gstate_p), op(op_p) {} | ||
// | ||
// void CSREdgeCreationEvent::Schedule() { | ||
// auto &context = pipeline->GetClientContext(); | ||
// auto &ts = TaskScheduler::GetScheduler(context); | ||
// idx_t num_threads = ts.NumberOfThreads(); | ||
// auto &scan_state = gstate.scan_state; | ||
// auto &global_inputs = gstate.global_csr_id; | ||
// | ||
// global_inputs->InitializeScan(scan_state); | ||
// | ||
// vector<shared_ptr<Task>> tasks; | ||
// for (idx_t tnum = 0; tnum < num_threads; tnum++) { | ||
// tasks.push_back(make_uniq<PhysicalCSREdgeCreationTask>(shared_from_this(), | ||
// context, gstate, op)); | ||
// } | ||
// SetTasks(std::move(tasks)); | ||
// } | ||
// | ||
// void CSREdgeCreationEvent::FinishEvent() { | ||
// auto &gstate = this->gstate; | ||
// auto &global_csr = gstate.global_csr; | ||
// global_csr->is_ready = true; | ||
// } | ||
// | ||
// } // namespace core | ||
// } // namespace duckpgq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.