From 1df5d77baacfc1bbd07743713dfce953fae02fdd Mon Sep 17 00:00:00 2001 From: Tim Niklas Uhl Date: Mon, 20 Jan 2025 16:09:11 +0100 Subject: [PATCH] Remove unncessary `auto&&` in gather. --- include/kamping/collectives/gather.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/kamping/collectives/gather.hpp b/include/kamping/collectives/gather.hpp index bf76d1640..79f590265 100644 --- a/include/kamping/collectives/gather.hpp +++ b/include/kamping/collectives/gather.hpp @@ -96,12 +96,12 @@ auto kamping::Communicator::gather(Args... arg assert::light_communication ); - auto&& send_buf = + auto send_buf = internal::select_parameter_type(args...).construct_buffer_or_rebind(); using send_value_type = typename std::remove_reference_t::value_type; using default_send_count_type = decltype(kamping::send_count_out()); - auto&& send_count = + auto send_count = internal::select_parameter_type_or_default( std::tuple(), args... @@ -114,7 +114,7 @@ auto kamping::Communicator::gather(Args... arg using default_recv_buf_type = decltype(kamping::recv_buf(alloc_new>)); - auto&& recv_buf = + auto recv_buf = internal::select_parameter_type_or_default( std::tuple(), args... @@ -123,14 +123,14 @@ auto kamping::Communicator::gather(Args... arg using recv_value_type = typename std::remove_reference_t::value_type; // Get send_type and recv_type - auto&& [send_type, recv_type] = + auto [send_type, recv_type] = internal::determine_mpi_datatypes(args...); [[maybe_unused]] constexpr bool recv_type_is_in_param = !has_to_be_computed; // Optional parameter: recv_count() // Default: compute value based on send_buf.size on root using default_recv_count_type = decltype(kamping::recv_count_out()); - auto&& recv_count = + auto recv_count = internal::select_parameter_type_or_default( std::tuple(), args... @@ -228,13 +228,13 @@ auto kamping::Communicator::gatherv(Args... ar ); // get send buffer - auto&& send_buf = + auto send_buf = internal::select_parameter_type(args...).construct_buffer_or_rebind(); using send_value_type = typename std::remove_reference_t::value_type; // get recv buffer using default_recv_buf_type = decltype(kamping::recv_buf(alloc_new>)); - auto&& recv_buf = + auto recv_buf = internal::select_parameter_type_or_default( std::tuple(), args... @@ -249,13 +249,13 @@ auto kamping::Communicator::gatherv(Args... ar ); // get send and recv type - auto&& [send_type, recv_type] = + auto [send_type, recv_type] = internal::determine_mpi_datatypes(args...); [[maybe_unused]] constexpr bool recv_type_is_in_param = !has_to_be_computed; // get recv counts using default_recv_counts_type = decltype(kamping::recv_counts_out(alloc_new>)); - auto&& recv_counts = + auto recv_counts = internal::select_parameter_type_or_default( std::tuple(), args... @@ -279,7 +279,7 @@ auto kamping::Communicator::gatherv(Args... ar ); using default_send_count_type = decltype(kamping::send_count_out()); - auto&& send_count = + auto send_count = internal::select_parameter_type_or_default( std::tuple(), args... @@ -292,7 +292,7 @@ auto kamping::Communicator::gatherv(Args... ar // get recv displs using default_recv_displs_type = decltype(kamping::recv_displs_out(alloc_new>)); - auto&& recv_displs = + auto recv_displs = internal::select_parameter_type_or_default( std::tuple(), args...