Lines Matching refs:x

599   #define ECB_CLANG_BUILTIN(x) __has_builtin (x)  argument
601 #define ECB_CLANG_BUILTIN(x) 0 argument
605 #define ECB_CLANG_EXTENSION(x) __has_extension (x) argument
607 #define ECB_CLANG_EXTENSION(x) 0 argument
855 #define ecb_decltype(x) ecb_decltype_t<decltype (x)>::type argument
857 #define ecb_decltype(x) __typeof__ (x) argument
921 #define ecb_ld32(x) (__builtin_clz (x) ^ 31) argument
922 #define ecb_ld64(x) (__builtin_clzll (x) ^ 63) argument
923 #define ecb_ctz32(x) __builtin_ctz (x) argument
924 #define ecb_ctz64(x) __builtin_ctzll (x) argument
925 #define ecb_popcount32(x) __builtin_popcount (x) argument
928 ecb_function_ ecb_const int ecb_ctz32 (uint32_t x);
930 ecb_ctz32 (uint32_t x) in ecb_ctz32() argument
934 _BitScanForward (&r, x); in ecb_ctz32()
939 x &= ~x + 1; /* this isolates the lowest bit */ in ecb_ctz32()
942 r += !!(x & 0xaaaaaaaa) << 0; in ecb_ctz32()
943 r += !!(x & 0xcccccccc) << 1; in ecb_ctz32()
944 r += !!(x & 0xf0f0f0f0) << 2; in ecb_ctz32()
945 r += !!(x & 0xff00ff00) << 3; in ecb_ctz32()
946 r += !!(x & 0xffff0000) << 4; in ecb_ctz32()
948 if (x & 0xaaaaaaaa) r += 1; in ecb_ctz32()
949 if (x & 0xcccccccc) r += 2; in ecb_ctz32()
950 if (x & 0xf0f0f0f0) r += 4; in ecb_ctz32()
951 if (x & 0xff00ff00) r += 8; in ecb_ctz32()
952 if (x & 0xffff0000) r += 16; in ecb_ctz32()
959 ecb_function_ ecb_const int ecb_ctz64 (uint64_t x);
961 ecb_ctz64 (uint64_t x) in ecb_ctz64() argument
965 _BitScanForward64 (&r, x); in ecb_ctz64()
968 int shift = x & 0xffffffff ? 0 : 32; in ecb_ctz64()
969 return ecb_ctz32 (x >> shift) + shift; in ecb_ctz64()
973 ecb_function_ ecb_const int ecb_popcount32 (uint32_t x);
975 ecb_popcount32 (uint32_t x) in ecb_popcount32() argument
977 x -= (x >> 1) & 0x55555555; in ecb_popcount32()
978 x = ((x >> 2) & 0x33333333) + (x & 0x33333333); in ecb_popcount32()
979 x = ((x >> 4) + x) & 0x0f0f0f0f; in ecb_popcount32()
980 x *= 0x01010101; in ecb_popcount32()
982 return x >> 24; in ecb_popcount32()
985 ecb_function_ ecb_const int ecb_ld32 (uint32_t x);
986 ecb_function_ ecb_const int ecb_ld32 (uint32_t x) in ecb_ld32() argument
990 _BitScanReverse (&r, x); in ecb_ld32()
995 if (x >> 16) { x >>= 16; r += 16; } in ecb_ld32()
996 if (x >> 8) { x >>= 8; r += 8; } in ecb_ld32()
997 if (x >> 4) { x >>= 4; r += 4; } in ecb_ld32()
998 if (x >> 2) { x >>= 2; r += 2; } in ecb_ld32()
999 if (x >> 1) { r += 1; } in ecb_ld32()
1005 ecb_function_ ecb_const int ecb_ld64 (uint64_t x);
1006 ecb_function_ ecb_const int ecb_ld64 (uint64_t x) in ecb_ld64() argument
1010 _BitScanReverse64 (&r, x); in ecb_ld64()
1015 if (x >> 32) { x >>= 32; r += 32; } in ecb_ld64()
1017 return r + ecb_ld32 (x); in ecb_ld64()
1022 ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x);
1023 ecb_function_ ecb_const ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); } in ecb_is_pot32() argument
1024 ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x);
1025 ecb_function_ ecb_const ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); } in ecb_is_pot64() argument
1027 ecb_function_ ecb_const uint8_t ecb_bitrev8 (uint8_t x);
1028 ecb_function_ ecb_const uint8_t ecb_bitrev8 (uint8_t x) in ecb_bitrev8() argument
1030 return ( (x * 0x0802U & 0x22110U) in ecb_bitrev8()
1031 | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; in ecb_bitrev8()
1034 ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x);
1035 ecb_function_ ecb_const uint16_t ecb_bitrev16 (uint16_t x) in ecb_bitrev16() argument
1037 x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1); in ecb_bitrev16()
1038 x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2); in ecb_bitrev16()
1039 x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4); in ecb_bitrev16()
1040 x = ( x >> 8 ) | ( x << 8); in ecb_bitrev16()
1042 return x; in ecb_bitrev16()
1045 ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x);
1046 ecb_function_ ecb_const uint32_t ecb_bitrev32 (uint32_t x) in ecb_bitrev32() argument
1048 x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); in ecb_bitrev32()
1049 x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); in ecb_bitrev32()
1050 x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4); in ecb_bitrev32()
1051 x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8); in ecb_bitrev32()
1052 x = ( x >> 16 ) | ( x << 16); in ecb_bitrev32()
1054 return x; in ecb_bitrev32()
1059 ecb_function_ ecb_const int ecb_popcount64 (uint64_t x);
1061 ecb_popcount64 (uint64_t x) in ecb_popcount64() argument
1063 return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); in ecb_popcount64()
1066 ecb_inline ecb_const uint8_t ecb_rotl8 (uint8_t x, unsigned int count);
1067 ecb_inline ecb_const uint8_t ecb_rotr8 (uint8_t x, unsigned int count);
1068 ecb_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count);
1069 ecb_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count);
1070 ecb_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count);
1071 ecb_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count);
1072 ecb_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count);
1073 ecb_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count);
1075 …_inline ecb_const uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)… in ecb_rotl8() argument
1076 …_inline ecb_const uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)… in ecb_rotr8() argument
1077 …_inline ecb_const uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)… in ecb_rotl16() argument
1078 …_inline ecb_const uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)… in ecb_rotr16() argument
1079 …_inline ecb_const uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)… in ecb_rotl32() argument
1080 …_inline ecb_const uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)… in ecb_rotr32() argument
1081 …_inline ecb_const uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)… in ecb_rotl64() argument
1082 …_inline ecb_const uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)… in ecb_rotr64() argument
1086 #define ecb_bswap16(x) __builtin_bswap16 (x) argument
1088 #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16) argument
1090 #define ecb_bswap32(x) __builtin_bswap32 (x) argument
1091 #define ecb_bswap64(x) __builtin_bswap64 (x) argument
1094 #define ecb_bswap16(x) ((uint16_t)_byteswap_ushort ((uint16_t)(x))) argument
1095 #define ecb_bswap32(x) ((uint32_t)_byteswap_ulong ((uint32_t)(x))) argument
1096 #define ecb_bswap64(x) ((uint64_t)_byteswap_uint64 ((uint64_t)(x))) argument
1098 ecb_function_ ecb_const uint16_t ecb_bswap16 (uint16_t x);
1100 ecb_bswap16 (uint16_t x) in ecb_bswap16() argument
1102 return ecb_rotl16 (x, 8); in ecb_bswap16()
1105 ecb_function_ ecb_const uint32_t ecb_bswap32 (uint32_t x);
1107 ecb_bswap32 (uint32_t x) in ecb_bswap32() argument
1109 return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16); in ecb_bswap32()
1112 ecb_function_ ecb_const uint64_t ecb_bswap64 (uint64_t x);
1114 ecb_bswap64 (uint64_t x) in ecb_bswap64() argument
1116 return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32); in ecb_bswap64()
1197 ecb_function_ ecb_const uint32_t ecb_binary16_to_binary32 (uint32_t x);
1199 ecb_binary16_to_binary32 (uint32_t x) in ecb_binary16_to_binary32() argument
1201 unsigned int s = (x & 0x8000) << (31 - 15); in ecb_binary16_to_binary32()
1202 int e = (x >> 10) & 0x001f; in ecb_binary16_to_binary32()
1203 unsigned int m = x & 0x03ff; in ecb_binary16_to_binary32()
1229 ecb_function_ ecb_const uint16_t ecb_binary32_to_binary16 (uint32_t x);
1231 ecb_binary32_to_binary16 (uint32_t x) in ecb_binary32_to_binary16() argument
1233 unsigned int s = (x >> 16) & 0x00008000; /* sign bit, the easy part */ in ecb_binary32_to_binary16()
1234 unsigned int e = ((x >> 23) & 0x000000ff) - (127 - 15); /* the desired exponent */ in ecb_binary32_to_binary16()
1235 unsigned int m = x & 0x007fffff; in ecb_binary32_to_binary16()
1237 x &= 0x7fffffff; in ecb_binary32_to_binary16()
1240 if (ecb_expect_true (0x38800000 <= x && x <= 0x477fefff)) in ecb_binary32_to_binary16()
1256 if (ecb_expect_true (0x477fefff < x && x <= 0x7f800000)) in ecb_binary32_to_binary16()
1260 if (ecb_expect_true (x < 0x38800000)) in ecb_binary32_to_binary16()
1263 if (ecb_expect_true (!x)) in ecb_binary32_to_binary16()
1337 #define ecb_ldexpf(x,e) ldexpf ((x), (e)) argument
1338 #define ecb_frexpf(x,e) frexpf ((x), (e)) argument
1340 #define ecb_ldexpf(x,e) (float) ldexp ((double) (x), (e)) argument
1341 #define ecb_frexpf(x,e) (float) frexp ((double) (x), (e)) argument
1345 ecb_function_ ecb_const uint32_t ecb_float_to_binary32 (float x);
1347 ecb_float_to_binary32 (float x) in ecb_float_to_binary32() argument
1352 memcpy (&r, &x, 4); in ecb_float_to_binary32()
1358 if (x == 0e0f ) return 0x00000000U; in ecb_float_to_binary32()
1359 if (x > +3.40282346638528860e+38f) return 0x7f800000U; in ecb_float_to_binary32()
1360 if (x < -3.40282346638528860e+38f) return 0xff800000U; in ecb_float_to_binary32()
1361 if (x != x ) return 0x7fbfffffU; in ecb_float_to_binary32()
1363 m = ecb_frexpf (x, &e) * 0x1000000U; in ecb_float_to_binary32()
1385 ecb_function_ ecb_const float ecb_binary32_to_float (uint32_t x);
1387 ecb_binary32_to_float (uint32_t x) in ecb_binary32_to_float() argument
1392 memcpy (&r, &x, 4); in ecb_binary32_to_float()
1395 int neg = x >> 31; in ecb_binary32_to_float()
1396 int e = (x >> 23) & 0xffU; in ecb_binary32_to_float()
1398 x &= 0x7fffffU; in ecb_binary32_to_float()
1401 x |= 0x800000U; in ecb_binary32_to_float()
1406 r = ecb_ldexpf (x * (0.5f / 0x800000U), e - 126); in ecb_binary32_to_float()
1415 ecb_function_ ecb_const uint64_t ecb_double_to_binary64 (double x);
1417 ecb_double_to_binary64 (double x) in ecb_double_to_binary64() argument
1422 memcpy (&r, &x, 8); in ecb_double_to_binary64()
1428 if (x == 0e0 ) return 0x0000000000000000U; in ecb_double_to_binary64()
1429 if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U; in ecb_double_to_binary64()
1430 if (x < -1.79769313486231470e+308) return 0xfff0000000000000U; in ecb_double_to_binary64()
1431 if (x != x ) return 0X7ff7ffffffffffffU; in ecb_double_to_binary64()
1433 m = frexp (x, &e) * 0x20000000000000U; in ecb_double_to_binary64()
1455 ecb_function_ ecb_const double ecb_binary64_to_double (uint64_t x);
1457 ecb_binary64_to_double (uint64_t x) in ecb_binary64_to_double() argument
1462 memcpy (&r, &x, 8); in ecb_binary64_to_double()
1465 int neg = x >> 63; in ecb_binary64_to_double()
1466 int e = (x >> 52) & 0x7ffU; in ecb_binary64_to_double()
1468 x &= 0xfffffffffffffU; in ecb_binary64_to_double()
1471 x |= 0x10000000000000U; in ecb_binary64_to_double()
1476 r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022); in ecb_binary64_to_double()
1485 ecb_function_ ecb_const uint16_t ecb_float_to_binary16 (float x);
1487 ecb_float_to_binary16 (float x) in ecb_float_to_binary16() argument
1489 return ecb_binary32_to_binary16 (ecb_float_to_binary32 (x)); in ecb_float_to_binary16()
1493 ecb_function_ ecb_const float ecb_binary16_to_float (uint16_t x);
1495 ecb_binary16_to_float (uint16_t x) in ecb_binary16_to_float() argument
1497 return ecb_binary32_to_float (ecb_binary16_to_binary32 (x)); in ecb_binary16_to_float()