template <relaxed_logical_value L>
std::optional<std::ptrdiff_t>
last_true(L m)
noexcept;
template <logical_simd_value L>
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:134
constexpr auto last_true
Returns the index of the last element in the input which evaluates to true, if there is one.
Definition last_true.hpp:84
The cheapest to get bitset for simd logical.
Definition top_bits.hpp:80
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 otherwise.
#include <eve/module/core.hpp>
#include <iostream>
#include <optional>
void show(char const* what, std::optional<std::ptrdiff_t> r)
{
std::cout << what;
if( r ) std::cout << *r << "\n"; else std::cout << "nullopt\n";
}
int main()
{
auto m = w > 0;
std::cout << "<- w = " << w << "\n";
std::cout << "<- m = (w > 0) = " << m << "\n";
}
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:361
Wrapper for SIMD registers.
Definition wide.hpp:94