Skip to content

Commit

Permalink
Renaming some function arguments to avoid clashes with a macro used i…
Browse files Browse the repository at this point in the history
…n FLECSI
  • Loading branch information
hkaiser committed Jul 22, 2017
1 parent 8e258e5 commit 8c1b4aa
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions hpx/runtime/components/binpacking_distribution_policy.hpp
Expand Up @@ -252,65 +252,66 @@ namespace hpx { namespace components
///
/// \param locs [in] The list of localities the new instance should
/// represent
/// \param counter_name [in] The name of the performance counter which
/// \param perf_counter_name [in] The name of the performance counter which
/// should be used as the distribution criteria
/// (by default the overall number of existing
/// instances of the given component type will be
/// used).
///
binpacking_distribution_policy operator()(
std::vector<id_type> const& locs,
char const* counter_name = default_binpacking_counter_name) const
char const* perf_counter_name = default_binpacking_counter_name) const
{
#if defined(HPX_DEBUG)
for (id_type const& loc: locs)
{
HPX_ASSERT(naming::is_locality(loc));
}
#endif
return binpacking_distribution_policy(locs, counter_name);
return binpacking_distribution_policy(locs, perf_counter_name);
}

/// Create a new \a default_distribution policy representing the given
/// set of localities.
///
/// \param locs [in] The list of localities the new instance should
/// represent
/// \param counter_name [in] The name of the performance counter which
/// \param perf_counter_name [in] The name of the performance counter which
/// should be used as the distribution criteria
/// (by default the overall number of existing
/// instances of the given component type will be
/// used).
///
binpacking_distribution_policy operator()(
std::vector<id_type> && locs,
char const* counter_name = default_binpacking_counter_name) const
char const* perf_counter_name = default_binpacking_counter_name) const
{
#if defined(HPX_DEBUG)
for (id_type const& loc: locs)
{
HPX_ASSERT(naming::is_locality(loc));
}
#endif
return binpacking_distribution_policy(std::move(locs), counter_name);
return binpacking_distribution_policy(std::move(locs),
perf_counter_name);
}

/// Create a new \a default_distribution policy representing the given
/// locality
///
/// \param loc [in] The locality the new instance should
/// represent
/// \param counter_name [in] The name of the performance counter which
/// \param perf_counter_name [in] The name of the performance counter which
/// should be used as the distribution criteria
/// (by default the overall number of existing
/// instances of the given component type will be
/// used).
///
binpacking_distribution_policy operator()(id_type const& loc,
char const* counter_name = default_binpacking_counter_name) const
char const* perf_counter_name = default_binpacking_counter_name) const
{
HPX_ASSERT(naming::is_locality(loc));
return binpacking_distribution_policy(loc, counter_name);
return binpacking_distribution_policy(loc, perf_counter_name);
}

/// Create one object on one of the localities associated by
Expand Down Expand Up @@ -432,20 +433,20 @@ namespace hpx { namespace components
protected:
/// \cond NOINTERNAL
binpacking_distribution_policy(std::vector<id_type> const& localities,
char const* counter_name)
char const* perf_counter_name)
: localities_(localities),
counter_name_(counter_name)
counter_name_(perf_counter_name)
{}

binpacking_distribution_policy(std::vector<id_type> && localities,
char const* counter_name)
char const* perf_counter_name)
: localities_(std::move(localities)),
counter_name_(counter_name)
counter_name_(perf_counter_name)
{}

binpacking_distribution_policy(id_type const& locality,
char const* counter_name)
: counter_name_(counter_name)
char const* perf_counter_name)
: counter_name_(perf_counter_name)
{
localities_.push_back(locality);
}
Expand Down

0 comments on commit 8c1b4aa

Please sign in to comment.