#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <immintrin.h>
Go to the source code of this file.
◆ u32
◆ __asm__() [1/2]
__asm__ |
( |
"popcount3: popcnt % | eax, |
|
|
%edi\n" "ret\n" | ) |
◆ __asm__() [2/2]
__asm__ |
( |
"popcount8:\n" " xor | rax, |
|
|
rax\n" ".L0:\n" " shr % | edi, |
|
|
1\n" " jz .L1\n" " adc % | eax, |
|
|
0\n" " jmp .L0\n" ".L1:\n" " adc % | eax, |
|
|
0\n" " ret\n" | ) |
◆ popcount0()
◆ popcount1()
◆ popcount10()
◆ popcount2()
◆ popcount3()
◆ popcount4()
◆ popcount5()
◆ popcount6()
◆ popcount7()
◆ popcount8()
◆ popcount9()
◆ U32_BIT
u32 U32_BIT = sizeof(u32) * CHAR_BIT |
|
inlinestatic |