10#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
11#error "Never use <lzcntintrin.h> directly; include <x86intrin.h> instead."
14#ifndef __LZCNTINTRIN_H
15#define __LZCNTINTRIN_H
18#if defined(__cplusplus) && (__cplusplus >= 201103L)
19#define __DEFAULT_FN_ATTRS \
20 __attribute__((__always_inline__, __nodebug__, __target__("lzcnt"))) constexpr
22#define __DEFAULT_FN_ATTRS \
23 __attribute__((__always_inline__, __nodebug__, __target__("lzcnt")))
37#define __lzcnt16(X) __builtin_ia32_lzcnt_u16((unsigned short)(X))
53 return __builtin_ia32_lzcnt_u32(__X);
69 return __builtin_ia32_lzcnt_u32(__X);
85#define __lzcnt64(X) __builtin_ia32_lzcnt_u64((unsigned long long)(X))
100_lzcnt_u64(
unsigned long long __X) {
101 return __builtin_ia32_lzcnt_u64(__X);
105#undef __DEFAULT_FN_ATTRS
static __inline__ unsigned int __DEFAULT_FN_ATTRS __lzcnt32(unsigned int __X)
Counts the number of leading zero bits in the operand.
static __inline__ unsigned int __DEFAULT_FN_ATTRS _lzcnt_u32(unsigned int __X)
Counts the number of leading zero bits in the operand.
#define __DEFAULT_FN_ATTRS