Computes the number of non 0 elements.
{
template< eve::value T >
}
template< eve::top_bits M >
as_wide_as<unsigned, M>
any(M m)
noexcept;
}
constexpr callable_any_ any
Computes a bool value which is true if and only if any elements of x is not zero.
Definition: any.hpp:71
constexpr callable_count_true_ count_true
Computes the number of non 0 elements.
Definition: count_true.hpp:66
Definition: all_of.hpp:22
The value of the number of non 0 elements is returned.
#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::logical<eve::wide<float, eve::fixed<4>>>;
int main()
{
eve::logical<float> xf = true;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
wide_ft pf = {true,false,true,false};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
return 0;
}