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

Remove warnings related to unused captured variables #2525

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/1d_stencil/1d_stencil_6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <hpx/hpx_init.hpp>
#include <hpx/hpx.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/util/unused.hpp>

#include <boost/shared_array.hpp>

Expand Down Expand Up @@ -282,6 +283,9 @@ struct stepper
[left, middle, right](partition_data const& l, partition_data const& m,
partition_data const& r)
{
HPX_UNUSED(left);
HPX_UNUSED(right);

// The new partition_data will be allocated on the same locality
// as 'middle'.
return partition(middle.get_id(), heat_part_data(l, m, r));
Expand Down
6 changes: 6 additions & 0 deletions examples/1d_stencil/1d_stencil_7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <hpx/hpx_init.hpp>
#include <hpx/hpx.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/util/unused.hpp>

#include <boost/shared_array.hpp>

Expand Down Expand Up @@ -268,6 +269,8 @@ struct stepper
unwrapped(
[middle](partition_data const& m) -> partition_data
{
HPX_UNUSED(middle);

// All local operations are performed once the middle data of
// the previous time step becomes available.
std::size_t size = m.size();
Expand All @@ -285,6 +288,9 @@ struct stepper
[left, middle, right](partition_data next, partition_data const& l,
partition_data const& m, partition_data const& r) -> partition
{
HPX_UNUSED(left);
HPX_UNUSED(right);

// Calculate the missing boundary elements once the
// corresponding data has become available.
std::size_t size = m.size();
Expand Down
6 changes: 6 additions & 0 deletions examples/1d_stencil/1d_stencil_8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <hpx/hpx.hpp>
#include <hpx/lcos/gather.hpp>
#include <hpx/runtime/serialization/serialize.hpp>
#include <hpx/util/unused.hpp>

#include <boost/shared_array.hpp>

Expand Down Expand Up @@ -487,6 +488,8 @@ partition stepper_server::heat_part(partition const& left,
hpx::util::unwrapped(
[middle](partition_data const& m) -> partition_data
{
HPX_UNUSED(middle);

// All local operations are performed once the middle data of
// the previous time step becomes available.
std::size_t size = m.size();
Expand All @@ -504,6 +507,9 @@ partition stepper_server::heat_part(partition const& left,
[left, middle, right](partition_data next, partition_data const& l,
partition_data const& m, partition_data const& r) -> partition
{
HPX_UNUSED(left);
HPX_UNUSED(right);

// Calculate the missing boundary elements once the
// corresponding data has become available.
std::size_t size = m.size();
Expand Down
2 changes: 2 additions & 0 deletions examples/quickstart/shared_mutex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <hpx/include/lcos.hpp>
#include <hpx/include/threads.hpp>
#include <hpx/include/iostreams.hpp>
#include <hpx/util/unused.hpp>

#include <boost/atomic.hpp>
#include <boost/random.hpp>
Expand Down Expand Up @@ -65,6 +66,7 @@ int main()
threads.emplace_back(
[&ready, &stm, k, i]
{
HPX_UNUSED(k);
boost::random::mt19937 urng(
static_cast<std::uint32_t>(std::time(nullptr)));
boost::random::uniform_int_distribution<int> dist(1, 1000);
Expand Down
2 changes: 2 additions & 0 deletions hpx/lcos/gather.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ namespace hpx { namespace lcos
#include <hpx/runtime/naming/id_type.hpp>
#include <hpx/runtime/naming/unmanaged.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/util/unused.hpp>

#include <boost/preprocessor/cat.hpp>

Expand Down Expand Up @@ -251,6 +252,7 @@ namespace hpx { namespace lcos
return async(action_type(), id, site, result.get()).then(
[id](hpx::future<std::vector<T> > && f)
{
HPX_UNUSED(id);
return f.get();
});
}
Expand Down
2 changes: 2 additions & 0 deletions hpx/parallel/util/foreach_partitioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <hpx/util/decay.hpp>
#include <hpx/util/deferred_call.hpp>
#include <hpx/util/tuple.hpp>
#include <hpx/util/unused.hpp>

#include <hpx/parallel/algorithms/detail/predicates.hpp>
#include <hpx/parallel/execution_policy.hpp>
Expand Down Expand Up @@ -171,6 +172,7 @@ namespace hpx { namespace parallel { namespace util
std::vector<hpx::future<Result> > && r2) mutable
-> FwdIter
{
HPX_UNUSED(scoped_param);
handle_local_exceptions<ExPolicy>::call(r1, errors);
handle_local_exceptions<ExPolicy>::call(r2, errors);

Expand Down
2 changes: 2 additions & 0 deletions hpx/runtime/parcelset/put_parcel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <hpx/util/bind.hpp>
#include <hpx/util/decay.hpp>
#include <hpx/util/detail/pack.hpp>
#include <hpx/util/unused.hpp>

#include <cstddef>
#include <memory>
Expand Down Expand Up @@ -134,6 +135,7 @@ namespace hpx { namespace parcelset {
naming::address&& addr_,
typename util::decay<Args>::type&&... args_)
{
HPX_UNUSED(dest);
pp_(detail::create_parcel::call(
is_continuation,
f.get(), std::move(addr_),
Expand Down
2 changes: 2 additions & 0 deletions src/lcos/barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <hpx/runtime/basename_registration.hpp>
#include <hpx/runtime/launch_policy.hpp>
#include <hpx/util/runtime_configuration.hpp>
#include <hpx/util/unused.hpp>

#include <boost/intrusive_ptr.hpp>

Expand Down Expand Up @@ -107,6 +108,7 @@ namespace hpx { namespace lcos {
hpx::launch::sync,
[node](hpx::future<void> f)
{
HPX_UNUSED(node);
f.get();
}
).get();
Expand Down