Commit 25d18c11 by FritzFlorian

Rework lock-free-work-stealing-deque to be simpler and fit 'classic' approach.

parent bd826491
Pipeline #1160 passed with stages
in 3 minutes 33 seconds
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <vector> #include <vector>
static constexpr int CUTOFF = 16; static constexpr int CUTOFF = 16;
static constexpr int NUM_ITERATIONS = 1000;
static constexpr int INPUT_SIZE = 2064; static constexpr int INPUT_SIZE = 2064;
typedef std::vector<std::complex<double>> complex_vector; typedef std::vector<std::complex<double>> complex_vector;
......
...@@ -23,7 +23,6 @@ void fork_join_sub_task::execute() { ...@@ -23,7 +23,6 @@ void fork_join_sub_task::execute() {
PROFILE_WORK_BLOCK("execute sub_task") PROFILE_WORK_BLOCK("execute sub_task")
tbb_task_->currently_executing_ = this; tbb_task_->currently_executing_ = this;
if (executed) { if (executed) {
int my_id = base::this_thread::state<thread_state>()->id_;
PLS_ERROR("Double Execution!") PLS_ERROR("Double Execution!")
} }
executed = true; executed = true;
...@@ -64,9 +63,7 @@ fork_join_sub_task *fork_join_task::get_local_sub_task() { ...@@ -64,9 +63,7 @@ fork_join_sub_task *fork_join_task::get_local_sub_task() {
} }
fork_join_sub_task *fork_join_task::get_stolen_sub_task() { fork_join_sub_task *fork_join_task::get_stolen_sub_task() {
auto tmp = deque_.save_state(); return deque_.pop_head();
auto result = deque_.pop_head();
return result;
} }
bool fork_join_task::internal_stealing(abstract_task *other_task) { bool fork_join_task::internal_stealing(abstract_task *other_task) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment