From 95a44718cb9eb58f71a0f6b21fd393c72cad0358 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 7 May 2018 15:37:19 +0200 Subject: [PATCH] Removing async splits. --- allscale/detail/work_item_impl.hpp | 37 +++++------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/allscale/detail/work_item_impl.hpp b/allscale/detail/work_item_impl.hpp index 83a3d31..360950c 100644 --- a/allscale/detail/work_item_impl.hpp +++ b/allscale/detail/work_item_impl.hpp @@ -462,20 +462,8 @@ namespace allscale { namespace detail { hpx::future >::type split(bool sync, hpx::util::tuple<> && reqs, std::size_t this_id) { - if (sync && id().last() % 2 == 1) - { - do_split(std::move(reqs)); - return hpx::make_ready_future(std::size_t(-2)); - } - else - { - auto this_ = shared_this(); - return hpx::async([this_ = std::move(this_)]() - { - this_->do_split(hpx::util::tuple<>()); - return std::size_t(-2); - }); - } + do_split(std::move(reqs)); + return hpx::make_ready_future(std::size_t(-2)); } template @@ -527,26 +515,13 @@ namespace allscale { namespace detail { , data_item_manager::acquire(reqs, infos)); }, "allscale::work_item::spli::locate_cont"); - if (sync && id().last() % 2 == 1) - { - return hpx::dataflow(hpx::launch::sync, std::move(continuation), + return hpx::dataflow(hpx::launch::sync, std::move(continuation), #if defined(ALLSCALE_DEBUG_DIM) - data_item_manager::locate(std::move(s), std::forward(reqs)) + data_item_manager::locate(std::move(s), std::forward(reqs)) #else - data_item_manager::locate(std::forward(reqs)) + data_item_manager::locate(std::forward(reqs)) #endif - ); - } - else - { - return hpx::dataflow(std::move(continuation), -#if defined(ALLSCALE_DEBUG_DIM) - data_item_manager::locate(std::move(s), std::forward(reqs)) -#else - data_item_manager::locate(std::forward(reqs)) -#endif - ); - } + ); } template