E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
popcount
eve::popcount = functor<popcount_t>
inline
constexpr
Header file
#include <eve/module/core.hpp>
Callable Signatures
namespace
eve
{
constexpr
auto
popcount
(
unsigned_value
auto
x
)
noexcept
;
}
eve::unsigned_value
The concept unsigned_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:84
eve::popcount
constexpr auto popcount
elementwise_callable object computing elementwise the number of bits set in the parameter.
Definition
popcount.hpp:61
eve::translate_t
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition
translation.hpp:107
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
unsigned argument
.
Return value
The value of number of bits set in the value
x
is returned.
Example
// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int
main
()
{
eve::wide
wu0
{0
u
, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
std::cout <<
"<- wu0 = "
<<
wu0
<<
"\n"
;
std::cout <<
"-> popcount(wu0) = "
<<
eve::popcount
(
wu0
) <<
"\n"
;
}
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve