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

◆ iterate_selected

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
{
(bool l, irregular_predicate<std::ptrdiff_t> auto&& f) -> bool; // (3)
}
std::predicate but doesn't require regularity
Definition invocable.hpp:97
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
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition translation.hpp:107
EVE Main Namespace.
Definition abi.hpp:19

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