Simple-Vector v1.3.0
Algorithm.hpp File Reference
#include "Concepts.hpp"
#include <algorithm>
#include <concepts>
#include <execution>
#include <ranges>

Go to the source code of this file.

Namespaces

namespace  sl
 
namespace  sl::vec
 

Functions

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...