Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing #1757 #1758

Merged
merged 2 commits into from Sep 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hpx_init.cpp
Expand Up @@ -585,7 +585,7 @@ namespace hpx

std::size_t get_pu_offset(util::command_line_handling const& cfg)
{
std::size_t pu_offset = 0;
std::size_t pu_offset = -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a static_cast<std::size_t>(-1) to avoid a warning.

#if defined(HPX_HAVE_HWLOC)
if (cfg.pu_offset_ != 0) {
pu_offset = cfg.pu_offset_;
Expand Down
6 changes: 3 additions & 3 deletions src/runtime/threads/policies/parse_affinity_options.cpp
Expand Up @@ -573,7 +573,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());
num_pus.resize(num_threads);

for (std::size_t num_thread = 0; num_thread != num_threads; /**/)
Expand Down Expand Up @@ -608,7 +608,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());

std::vector<std::size_t> num_pus_cores(num_cores, 0);
num_pus.resize(num_threads);
Expand Down Expand Up @@ -642,7 +642,7 @@ namespace hpx { namespace threads { namespace detail
std::vector<std::size_t>& num_pus, error_code& ec)
{
std::size_t num_threads = affinities.size();
std::size_t num_cores = max_cores % (t.get_number_of_cores()+1);
std::size_t num_cores = (std::min)(max_cores, t.get_number_of_cores());

std::vector<std::size_t> num_pus_cores(num_cores, 0);
num_pus.resize(num_threads);
Expand Down