Loading src/TNL/Algorithms/reduce.h +14 −14 Original line number Diff line number Diff line Loading @@ -118,14 +118,14 @@ Result reduce( const Index begin, template< typename Device, typename Index, typename Fetch, typename Reduction > typename Reduction = TNL::Plus > auto reduce( const Index begin, const Index end, Fetch&& fetch, Reduction&& reduction ) Reduction&& reduction = TNL::Plus{} ) { using Result = std::decay_t< decltype( fetch( 0 ) ) >; return detail::Reduction< Device >::reduce( begin, return reduce< Device >( begin, end, std::forward< Fetch >( fetch ), std::forward< Reduction >( reduction ), Loading Loading @@ -153,7 +153,7 @@ auto reduce( const Index begin, * \param reduction is a lambda function defining the reduction operation and managing the elements positions. * \param zero is the idempotent element for the reduction operation, i.e. element which * does not change the result of the reduction. * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first' * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first` * is the element position and `pair.second` is the reduction result. * * The `fetch` lambda function takes one argument which is index of the element to be fetched: Loading Loading @@ -218,7 +218,7 @@ reduceWithArgument( const Index begin, * \param reduction is a lambda function defining the reduction operation and managing the elements positions. * \param zero is the idempotent element for the reduction operation, i.e. element which * does not change the result of the reduction. * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first' * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first` * is the element position and `pair.second` is the reduction result. * * The `fetch` lambda function takes one argument which is index of the element to be fetched: Loading Loading @@ -252,7 +252,7 @@ reduceWithArgument( const Index begin, Reduction&& reduction ) { using Result = std::decay_t< decltype( fetch( 0 ) ) >; return detail::Reduction< Device >::reduceWithArgument( begin, return reduceWithArgument< Device >( begin, end, std::forward< Fetch >( fetch ), std::forward< Reduction >( reduction ), Loading Loading
src/TNL/Algorithms/reduce.h +14 −14 Original line number Diff line number Diff line Loading @@ -118,14 +118,14 @@ Result reduce( const Index begin, template< typename Device, typename Index, typename Fetch, typename Reduction > typename Reduction = TNL::Plus > auto reduce( const Index begin, const Index end, Fetch&& fetch, Reduction&& reduction ) Reduction&& reduction = TNL::Plus{} ) { using Result = std::decay_t< decltype( fetch( 0 ) ) >; return detail::Reduction< Device >::reduce( begin, return reduce< Device >( begin, end, std::forward< Fetch >( fetch ), std::forward< Reduction >( reduction ), Loading Loading @@ -153,7 +153,7 @@ auto reduce( const Index begin, * \param reduction is a lambda function defining the reduction operation and managing the elements positions. * \param zero is the idempotent element for the reduction operation, i.e. element which * does not change the result of the reduction. * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first' * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first` * is the element position and `pair.second` is the reduction result. * * The `fetch` lambda function takes one argument which is index of the element to be fetched: Loading Loading @@ -218,7 +218,7 @@ reduceWithArgument( const Index begin, * \param reduction is a lambda function defining the reduction operation and managing the elements positions. * \param zero is the idempotent element for the reduction operation, i.e. element which * does not change the result of the reduction. * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first' * \return result of the reduction in a form of std::pair< Index, Result> structure. `pair.first` * is the element position and `pair.second` is the reduction result. * * The `fetch` lambda function takes one argument which is index of the element to be fetched: Loading Loading @@ -252,7 +252,7 @@ reduceWithArgument( const Index begin, Reduction&& reduction ) { using Result = std::decay_t< decltype( fetch( 0 ) ) >; return detail::Reduction< Device >::reduceWithArgument( begin, return reduceWithArgument< Device >( begin, end, std::forward< Fetch >( fetch ), std::forward< Reduction >( reduction ), Loading