9#ifndef __MATH_BITS_INLINE_C__
10#define __MATH_BITS_INLINE_C__
24 _BitScanForward(&ctz, a);
27 return (
unsigned int)__builtin_ctz(a);
36 _BitScanForward64(&ctz, a);
39 return (
unsigned int)__builtin_ctzll(a);
65 _BitScanReverse(&clz, a);
68 return (
unsigned int)__builtin_clz(a);
77 _BitScanReverse64(&clz, a);
80 return (
unsigned int)__builtin_clzll(a);
92 *a &= ~(0x80000000 >>
i);
111 n |= (
unsigned short)(n >> 1);
112 n |= (
unsigned short)(n >> 2);
113 n |= (
unsigned short)(n >> 4);
114 n |= (
unsigned short)(n >> 8);
115 return (
unsigned short)(n - (n >> 1));
118#if !(COMPILER_GCC || COMPILER_CLANG || COMPILER_MSVC)
122 i =
i - ((
i >> 1) & 0x55555555);
123 i = (
i & 0x33333333) + ((
i >> 2) & 0x33333333);
124 return (((
i + (
i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;
unsigned long long int uint64_t
MINLINE int float_as_int(float f)
MINLINE unsigned int bitscan_forward_uint(unsigned int a)
MINLINE int count_bits_uint64(const uint64_t a)
MINLINE int bitscan_forward_clear_i(int *a)
MINLINE float xor_fl(float x, int y)
MINLINE unsigned int bitscan_forward_clear_uint(unsigned int *a)
MINLINE float int_as_float(int i)
MINLINE int count_bits_i(unsigned int i)
MINLINE unsigned int float_as_uint(float f)
MINLINE unsigned int bitscan_reverse_uint(unsigned int a)
MINLINE int bitscan_reverse_clear_i(int *a)
MINLINE unsigned short highest_order_bit_s(unsigned short n)
MINLINE float uint_as_float(unsigned int i)
MINLINE int bitscan_forward_i(int a)
MINLINE unsigned int bitscan_forward_uint64(unsigned long long a)
MINLINE unsigned int bitscan_reverse_clear_uint(unsigned int *a)
MINLINE unsigned int highest_order_bit_uint(unsigned int n)
MINLINE int bitscan_reverse_i(int a)
MINLINE unsigned int bitscan_reverse_uint64(unsigned long long a)