Skip to content

Commit

Permalink
More various tweaks and minor optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Feb 23, 2024
1 parent bd9e3cb commit 4b1b968
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2007-2022 Hartmut Kaiser
// Copyright (c) 2007-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand Down Expand Up @@ -252,8 +252,8 @@ namespace hpx::detail {
lcos::local::futures_factory<result_type()> p(
util::deferred_call(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...));

threads::thread_id_ref_type tid =
p.post(pool, desc.get_description(), policy);
threads::thread_id_ref_type tid = p.post(
pool, desc.get_description(), HPX_FORWARD(Policy, policy));

// make sure this thread is executed last
threads::thread_id_type const tid_self = threads::get_self_id();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2017-2022 Hartmut Kaiser
// Copyright (c) 2017-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2007-2022 Hartmut Kaiser
// Copyright (c) 2007-2023 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ namespace hpx::execution {
#else
hpx::threads::thread_description desc(f);
#endif
auto pool = exec.pool_ ?
auto* pool = exec.pool_ ?
exec.pool_ :
threads::detail::get_self_or_default_pool();
return hpx::detail::async_launch_policy_dispatch<Policy>::call(
Expand Down Expand Up @@ -410,7 +410,7 @@ namespace hpx::execution {
#else
hpx::threads::thread_description desc(f);
#endif
auto pool =
auto* pool =
pool_ ? pool_ : threads::detail::get_self_or_default_pool();
hpx::detail::post_policy_dispatch<Policy>::call(
policy_, desc, pool, HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...);
Expand Down Expand Up @@ -440,7 +440,7 @@ namespace hpx::execution {
#else
hpx::threads::thread_description desc(f);
#endif
auto pool = exec.pool_ ?
auto* pool = exec.pool_ ?
exec.pool_ :
threads::detail::get_self_or_default_pool();

Expand All @@ -450,6 +450,8 @@ namespace hpx::execution {
hpx::threads::do_not_combine_tasks(
exec.policy().get_hint().sharing_mode());

// use scheduling based on index_queue if no hierarchical threshold
// is given and tasks are allowed to be combined
if (exec.hierarchical_threshold_ == 0 && !do_not_combine_tasks)
{
return parallel::execution::detail::
Expand Down
4 changes: 2 additions & 2 deletions libs/core/futures/src/future_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ namespace hpx::lcos::detail {
},
[&](std::exception_ptr ep) {
// If an exception while creating the new task or inside the
// completion handler is thrown, there is nothing we can do...
// ... but terminate and report the error
// completion handler is thrown, there is nothing we can
// do... ... but terminate and report the error
if (run_on_completed_error_handler)
{
run_on_completed_error_handler(HPX_MOVE(ep));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <mutex>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

#include <hpx/config/warnings_prefix.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ namespace hpx::threads::detail {
<< std::bitset<HPX_HAVE_MAX_CPU_COUNT>(get_used_processing_units())
#endif
<< '\n';
os << "on numa domains : \n" << get_numa_domain_bitmap() << '\n';
os << "pool offset : \n"
<< std::dec << static_cast<std::uint64_t>(this->thread_offset_)
<< "\n";
os << "on numa domains: " << get_numa_domain_bitmap() << '\n';
os << "pool offset: " << std::dec << this->thread_offset_ << "\n";
}

template <typename Scheduler>
Expand Down

0 comments on commit 4b1b968

Please sign in to comment.