transform
#
Interface#
MP#
-
void dr::mp::transform(rng::forward_range auto &&in, dr::distributed_iterator auto out, auto op)#
SP#
-
template<class ExecutionPolicy>
auto dr::sp::transform(ExecutionPolicy &&policy, dr::distributed_range auto &&in, dr::distributed_iterator auto out, auto &&fn)# Applies the given function to a range and stores the result in another range, beginning at out.
- Parameters:
policy – use
dr::sp::par_unseq
here onlyin – the range of elements to transform
out – the beginning of the destination range, may be equal to the beginning of
in
rangefn – operation to apply to input elements
- Returns:
an unary_transform_result containing an input iterator equal to the end of
in
range and an output iterator to the element past the last element transformed
-
template<dr::distributed_range R, dr::distributed_iterator Iter, typename Fn>
auto dr::sp::transform(R &&in, Iter out, Fn &&fn)#
Description#
See also
- std::transform
C++ model
- std::ranges::transform
C++ range-based model
- reduce
related algorithm