|
template<std::ranges::input_range TRange, std::weakly_incrementable TOut, std::copy_constructible TUnaryOp> |
constexpr void | sl::vec::transform_unseq (TRange &&range, TOut result, TUnaryOp unaryOp) |
| Applies the given unary operation to each element and writes into result. More...
|
|
template<std::ranges::input_range TRange1, std::ranges::input_range TRange2, std::weakly_incrementable TOut, std::copy_constructible TBinaryOp> |
constexpr void | sl::vec::transform_unseq (TRange1 &&range1, TRange2 &&range2, TOut result, TBinaryOp binaryOp) |
| Applies the given unary operation to each element and writes into result. More...
|
|
template<std::ranges::input_range TRange, std::move_constructible T, std::copy_constructible TBinaryOp, std::copy_constructible TUnaryOp> |
constexpr T | sl::vec::transform_reduce_unseq (TRange &&range, T init, TBinaryOp binaryOp, TUnaryOp unaryOp) |
| Applies the unaryOp to each elements from the range and reduces the results (possibly permuted and aggregated unspecified manner) along with the initial value init over binaryOp. More...
|
|
template<std::ranges::input_range TRange1, std::ranges::input_range TRange2, std::move_constructible T, std::copy_constructible TBinaryOp1, std::copy_constructible TBinaryOp2> |
constexpr T | sl::vec::transform_reduce_unseq (TRange1 &&range1, TRange2 &&range2, T init, TBinaryOp1 binaryOp1, TBinaryOp2 binaryOp2) |
| Applies the binaryOp2 to each pair of elements from both ranges and reduces the results (possibly permuted and aggregated unspecified manner) along with the initial value init over binaryOp1. More...
|
|
template<std::ranges::input_range TRange, std::move_constructible T, std::copy_constructible TBinaryOp, std::copy_constructible TUnaryOp>
constexpr T sl::vec::transform_reduce_unseq |
( |
TRange && |
range, |
|
|
T |
init, |
|
|
TBinaryOp |
binaryOp, |
|
|
TUnaryOp |
unaryOp |
|
) |
| |
|
constexpr |
Applies the unaryOp to each elements from the range and reduces the results (possibly permuted and aggregated unspecified manner) along with the initial value init over binaryOp.
- Template Parameters
-
TRange | Type of range |
T | result type |
TBinaryOp | Type of binary operation |
TUnaryOp | Type of unary operation |
- Parameters
-
range | source range1 |
init | initial value |
binaryOp | binary operation applied to the results of unaryOp along with the initial value |
unaryOp | unary operation applied to each elements from the range |
This functions serves as a convenient wrapper, which is used for enabling constexpr when possible and otherwise use the potentially benefit of vectorization. If this function is called in a non-constant-evaluated context it uses the std::execution::unseq policy. Due to the lack of a constexpr declaration of these overload, this function will otherwise fallback to the std::transform_reduce algorithm. For further details read here: https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t
template<std::ranges::input_range TRange1, std::ranges::input_range TRange2, std::move_constructible T, std::copy_constructible TBinaryOp1, std::copy_constructible TBinaryOp2>
constexpr T sl::vec::transform_reduce_unseq |
( |
TRange1 && |
range1, |
|
|
TRange2 && |
range2, |
|
|
T |
init, |
|
|
TBinaryOp1 |
binaryOp1, |
|
|
TBinaryOp2 |
binaryOp2 |
|
) |
| |
|
constexpr |
Applies the binaryOp2 to each pair of elements from both ranges and reduces the results (possibly permuted and aggregated unspecified manner) along with the initial value init over binaryOp1.
- Template Parameters
-
TRange1 | Type of range1 |
TRange2 | Type of range2 |
T | result type |
TBinaryOp1 | Type of inner binary operation |
TBinaryOp2 | Type of outer binary operation |
- Parameters
-
range1 | source range1 |
range2 | source range2 |
init | initial value |
binaryOp1 | binary operation applied to the results of binaryOp2 along with the initial value |
binaryOp2 | binary operation applied to each pair of elements from both ranges |
This functions serves as a convenient wrapper, which is used for enabling constexpr when possible and otherwise use the potentially benefit of vectorization. If this function is called in a non-constant-evaluated context it uses the std::execution::unseq policy. Due to the lack of a constexpr declaration of these overload, this function will otherwise fallback to the std::transform_reduce algorithm. For further details read here: https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t
template<std::ranges::input_range TRange, std::weakly_incrementable TOut, std::copy_constructible TUnaryOp>
constexpr void sl::vec::transform_unseq |
( |
TRange && |
range, |
|
|
TOut |
result, |
|
|
TUnaryOp |
unaryOp |
|
) |
| |
|
constexpr |
Applies the given unary operation to each element and writes into result.
- Template Parameters
-
TRange | Type of range |
TOut | result destination |
TUnaryOp | Type of unary operation |
- Parameters
-
range | source range |
result | destination where the result will be written to |
unaryOp | unary operation applied to each element of the source range |
This functions serves as a convenient wrapper, which is used for enabling constexpr when possible and otherwise use the potentially benefit of vectorization. If this function is called in a non-constant-evaluated context it uses the std::execution::unseq policy. Due to the lack of a constexpr declaration of these overload, this function will otherwise fallback to the std::ranges::transform algorithm. For further details read here: https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t
template<std::ranges::input_range TRange1, std::ranges::input_range TRange2, std::weakly_incrementable TOut, std::copy_constructible TBinaryOp>
constexpr void sl::vec::transform_unseq |
( |
TRange1 && |
range1, |
|
|
TRange2 && |
range2, |
|
|
TOut |
result, |
|
|
TBinaryOp |
binaryOp |
|
) |
| |
|
constexpr |
Applies the given unary operation to each element and writes into result.
- Template Parameters
-
TRange1 | Type of range1 |
TRange2 | Type of range2 |
TOut | result destination |
TBinaryOp | Type of binary operation |
- Parameters
-
range1 | source range1 |
range2 | source range2 |
result | destination where the result will be written to |
binaryOp | binary operation applied to each pair of elements of both source ranges |
This functions serves as a convenient wrapper, which is used for enabling constexpr when possible and otherwise use the potentially benefit of vectorization. If this function is called in a non-constant-evaluated context it uses the std::execution::unseq policy. Due to the lack of a constexpr declaration of these overload, this function will otherwise fallback to the std::ranges::transform algorithm. For further details read here: https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t