E.V.E
v2023.02.15
Loading...
Searching...
No Matches
Algorithms and Views

Detailed Description

SIMD versions of the standard range-based algorithms.

An algorithm of this module processes its data with SIMD operations, through eve::wide, with the loop, the alignment and the tail handled by the library. A call looks like its std::ranges counterpart, and the callable receives SIMD values in place of scalars:

std::vector<float> in(1024), out(1024);
eve::algo::transform_to(in, out, [](auto x) { return x * x; });
constexpr auto transform_to
SIMD version of std::transform.
Definition transform.hpp:112

Two things differ from the standard:

  • an algorithm takes ranges, never an iterator pair, which eve::algo::as_range turns into a range;
  • the callable is called on eve::wide values of any cardinal, so it is written for a SIMD value and never for a scalar alone.

Required header:

#include <eve/module/algo.hpp>

Contents

 Algorithms
 SIMD implementations of the standard algorithms.
 Algorithms Concepts
 Concepts a range or an iterator satisfies to enter an algorithm, and the types that model them.
 Options
 Options that tune how an algorithm runs.
 Views
 Views that adapt a range for an algorithm without copying it.