Callable object computing a generalized scan operation.
Required header: #include <eve/function/scan.hpp>
Member Functions
Member | Effect |
operator() | the computation of a generalized scan operation |
template<simd_value T, Callable F, typename Zero>
auto operator()( T v, F binary_op, Zero
zero )
const noexcept;
constexpr callable_zero_ zero
Callable object computing the O value.
Definition: zero.hpp:50
Parameters
v
: simd value to scan.
binary_op
: Binary callable object that perform a binary, commutative and associative operation.
zero
: An identity element for binary_op
(binary_op(zero, v) == v) for any v. Acceptable: T anything convertible to T eve::zero
eve::zero
Return value
Generalized scan of v.get(0)
, v.get(1)
, ... v.get(v.size()-1)
over binary_op
, T(v.get(0), binary_op(v.get(0), v.get(1)), binary_op(binary_op(v.get(0), v.get(1)), v.get(2)) ...)
template<simd_value T> auto operator()( T v ) const noexcept;
Same as scan(v, eve::plus, eve::zero)