E.V.E
v2023.02.15
Loading...
Searching...
No Matches

Detailed Description

Optimises a filtering algorithm for few elements kept per step.

Variables

constexpr auto eve::algo::sparse_output = (density_key = eve::sparse)

Variable Documentation

◆ sparse_output

auto eve::algo::sparse_output = (density_key = eve::sparse)
inlineconstexpr
Header file #include <eve/module/algo.hpp>
namespace eve::algo
{
inline constexpr auto sparse_output = eve_implementation_defined;
}
constexpr auto sparse_output
Definition traits.hpp:831

Shapes a filtering algorithm for a step that keeps a handful of lanes. eve::algo::copy_if, eve::algo::remove_if and eve::algo::set_intersection write what they keep, and their loop has one shape per expected density; eve::algo::dense_output, the default, suits a step that keeps most of its lanes.

std::vector<int> in(1024), out(1024);
// One element in a hundred passes: a step keeps a handful of lanes.
auto end = copy_if[sparse_output](in, out, [](auto x) { return x > 990; });
constexpr auto copy_if
SIMD variation on std::copy_if.
Definition copy_if.hpp:149
See also
dense_output