#include <eve/module/core.hpp>
Should you check for any?
The function is considering the case when nothing is set to be likely, checking for eve::any before hand is not going to be helpful. At the moment there isn't a function that would do it otherwise.
What if I know there is a match?
We would recommend *evefirst_true(m)
- this is likely to trigger compiler optimizations, based on it being UB otherwise.
template <logical_simd_value L>
template <logical_simd_value L>
template <relative_conditional_expr C, logical_simd_value L>
std::optional<std::ptrdiff_t>
first_true[C ignore](L m);
constexpr callable_first_true_ first_true
A function to find a first true value, if there is one.
Definition first_true.hpp:65
The cheapest to get bitset for simd logical.
Definition forward.hpp:16
Parameters
Return value
Returns std::nullopt
if eve::none(m). Otherwise returns 0 based index.
#include <eve/module/core.hpp>
#include <iostream>
int main()
{
eve::wide wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout << "<- wu0 = " << wu0 << "\n";
}
constexpr callable_maximum_ maximum
Computes the maximal value in a simd vector.
Definition maximum.hpp:55
Conditional expression ignoring the k first lanes from a eve::simd_value.
Definition conditional.hpp:459
Wrapper for SIMD registers.
Definition wide.hpp:86