Skip to content

Commit

Permalink
Making inspect happy
Browse files Browse the repository at this point in the history
 - Decreasing line length
 - Adding missing includes
  • Loading branch information
Thomas Heller committed Sep 11, 2017
1 parent 4cc9e6f commit de6c7d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Expand Up @@ -471,7 +471,8 @@ namespace hpx { namespace threads { namespace policies
while (true)
{
auto const& rp = resource::get_partitioner();
auto mask = rp.get_pu_mask(num_thread + parent_pool_->get_thread_offset());
auto mask = rp.get_pu_mask(
num_thread + parent_pool_->get_thread_offset());
if(bit_and(mask, parent_pool_->get_used_processing_units()))
break;
else
Expand Down
3 changes: 2 additions & 1 deletion hpx/runtime/threads/policies/local_queue_scheduler.hpp
Expand Up @@ -315,7 +315,8 @@ namespace hpx { namespace threads { namespace policies
while (true)
{
auto const& rp = resource::get_partitioner();
auto mask = rp.get_pu_mask(num_thread + parent_pool_->get_thread_offset());
auto mask = rp.get_pu_mask(
num_thread + parent_pool_->get_thread_offset());
if(bit_and(mask, parent_pool_->get_used_processing_units()))
break;
else
Expand Down
11 changes: 9 additions & 2 deletions tests/unit/resource/throttle.cpp
Expand Up @@ -10,11 +10,17 @@
#include <hpx/include/threads.hpp>
#include <hpx/util/lightweight_test.hpp>

#include <cstddef>
#include <string>
#include <utility>
#include <vector>

int hpx_main(int argc, char* argv[])
{
HPX_TEST_EQ(std::size_t(4), hpx::resource::get_num_threads("default"));

hpx::threads::detail::thread_pool_base& tp = hpx::resource::get_thread_pool("default");
hpx::threads::detail::thread_pool_base& tp =
hpx::resource::get_thread_pool("default");

HPX_TEST_EQ(hpx::threads::count(tp.get_used_processing_units()), std::size_t(4));

Expand Down Expand Up @@ -101,7 +107,8 @@ int hpx_main(int argc, char* argv[])
}
else
{
tp.add_processing_unit(num_thread - 1, num_thread + tp.get_thread_offset() - 1);
tp.add_processing_unit(
num_thread - 1, num_thread + tp.get_thread_offset() - 1);
--num_thread;
if (num_thread == 0)
{
Expand Down

0 comments on commit de6c7d7

Please sign in to comment.