vir-simd 0.4.189
Parallelism TS 2 extensions and simd fallback implementation
|
Reduces the range along with the initial value init
over op
.
More...
Functions | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_iterator It> | |
constexpr std::iter_value_t< It > | vir::reduce (ExecutionPolicy policy, It first, It last) |
Sum the given range (iterator overload) | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_iterator It, typename T> | |
constexpr T | vir::reduce (ExecutionPolicy policy, It first, It last, T init) |
Sum the given range with initial value init (iterator overload) | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_iterator It, typename T, typename BinaryReductionOp> | |
constexpr T | vir::reduce (ExecutionPolicy policy, It first, It last, T init, BinaryReductionOp op) |
Reduce the given range with initial value init over op (iterator overload) | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_range Rg> | |
constexpr std::ranges::range_value_t< Rg > | vir::reduce (ExecutionPolicy policy, Rg &&rg) |
Sum the given range (range overload) | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_range Rg, typename T> | |
constexpr T | vir::reduce (ExecutionPolicy policy, Rg &&rg, T init) |
Sum the given range with initial value init (range overload) | |
template<detail::simd_execution_policy ExecutionPolicy, detail::simd_execution_range Rg, typename T, typename BinaryReductionOp> | |
constexpr T | vir::reduce (ExecutionPolicy policy, Rg &&rg, T init, BinaryReductionOp op) |
Reduce the given range with initial value init over op (range overload) | |
template<vir::detail::simd_execution_policy ExecutionPolicy, vir::detail::simd_execution_iterator It> | |
constexpr std::iter_value_t< It > | std::reduce (ExecutionPolicy policy, It first, It last) |
Overloads std::reduce for vir::execution::simd. | |
template<vir::detail::simd_execution_policy ExecutionPolicy, vir::detail::simd_execution_iterator It, typename T> | |
constexpr T | std::reduce (ExecutionPolicy policy, It first, It last, T init) |
Overloads std::reduce for vir::execution::simd. | |
template<vir::detail::simd_execution_policy ExecutionPolicy, vir::detail::simd_execution_iterator It, typename T, typename BinaryReductionOp> | |
constexpr T | std::reduce (ExecutionPolicy policy, It first, It last, T init, BinaryReductionOp op) |
Overloads std::reduce for vir::execution::simd. | |
Reduces the range along with the initial value init
over op
.
policy | Needs to be vir::execution::simd or one of the derived types returned from its modifiers. (vir::detail::simd_execution_policy) |
first,last | Iterator pair modelling vir::detail::simd_execution_iterator. |
rg | Input ranges modelling vir::detail::simd_execution_range. |
op | Callable to be invoked with two simd objects of input elements or intermediate results. |
init
(if given) and the elements of the input range over op
/ std::plus.