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

◆ iterate_selected

auto eve::iterate_selected = functor<iterate_selected_t>
inlineconstexpr
See also
eve::algo::for_each_selected

Header file

#include <eve/module/core.hpp>

Sometimes (for example in parsing) you need to perform scalar operations for each element that matches a predicate. This is a low level utility to help you do that. The predicate for iteration should return true if you want to break, false otherwise.

Callable Signatures

namespace eve
{
<logical_simd_value L>(L l, irregular_predicate<std::ptrdiff_t> auto&& f) -> bool; // (1)
(bool l, irregular_predicate<std::ptrdiff_t> auto&& f) -> bool; // (3)
}
std::predicate but doesn't require regularity
Definition invocable.hpp:95
Specify that a type represents a logical SIMD value. The concept logical_simd_value<T> is satisfied i...
Definition simd.hpp:46
Specifies that a type is a Conditional Expression using relative mask.
Definition conditional.hpp:52
constexpr auto iterate_selected
a utility to do scalar iteration over all true elements in a logical.
Definition iterate_selected.hpp:82
EVE Main Namespace.
Definition abi.hpp:18
The cheapest to get bitset for simd logical.
Definition forward.hpp:16

Parameters

  • ignore - ignored elements are considered false
  • l - logical value (either logical_simd_value, top_bits or just 1 bool).
  • f - callback, that's invoked for every true index. Return false to break.

Return value

  • true iff the user broke the exeuction (f returned true).