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

◆ countl_one

auto eve::countl_one = functor<countl_one_t>
inlineconstexpr
  1. The operation is performed conditionnaly.

External references

Example

// revision 0
#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";
std::cout << "-> countl_one(wu0) = " << eve::countl_one(wu0) << "\n";
std::cout << "-> countl_one[ignore_last(2)](wu0) = " << eve::countl_one[eve::ignore_last(2)](wu0) << "\n";
std::cout << "-> countl_one[wu0 != 0](wu0) = " << eve::countl_one[wu0 != 0](wu0) << "\n";
}
constexpr auto countl_one
elementwise_callableobject computing the number of consecutive bits unset in a value starting from le...
Definition countl_one.hpp:72
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:332
Wrapper for SIMD registers.
Definition wide.hpp:70