30 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4.1"), __min_vector_width__(128))) 33 #define _MM_FROUND_TO_NEAREST_INT 0x00 34 #define _MM_FROUND_TO_NEG_INF 0x01 35 #define _MM_FROUND_TO_POS_INF 0x02 36 #define _MM_FROUND_TO_ZERO 0x03 37 #define _MM_FROUND_CUR_DIRECTION 0x04 39 #define _MM_FROUND_RAISE_EXC 0x00 40 #define _MM_FROUND_NO_EXC 0x08 42 #define _MM_FROUND_NINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_NEAREST_INT) 43 #define _MM_FROUND_FLOOR (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_NEG_INF) 44 #define _MM_FROUND_CEIL (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_POS_INF) 45 #define _MM_FROUND_TRUNC (_MM_FROUND_RAISE_EXC | _MM_FROUND_TO_ZERO) 46 #define _MM_FROUND_RINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_CUR_DIRECTION) 47 #define _MM_FROUND_NEARBYINT (_MM_FROUND_NO_EXC | _MM_FROUND_CUR_DIRECTION) 64 #define _mm_ceil_ps(X) _mm_round_ps((X), _MM_FROUND_CEIL) 81 #define _mm_ceil_pd(X) _mm_round_pd((X), _MM_FROUND_CEIL) 106 #define _mm_ceil_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_CEIL) 131 #define _mm_ceil_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_CEIL) 148 #define _mm_floor_ps(X) _mm_round_ps((X), _MM_FROUND_FLOOR) 165 #define _mm_floor_pd(X) _mm_round_pd((X), _MM_FROUND_FLOOR) 190 #define _mm_floor_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_FLOOR) 215 #define _mm_floor_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_FLOOR) 247 #define _mm_round_ps(X, M) \ 248 (__m128)__builtin_ia32_roundps((__v4sf)(__m128)(X), (M)) 288 #define _mm_round_ss(X, Y, M) \ 289 (__m128)__builtin_ia32_roundss((__v4sf)(__m128)(X), \ 290 (__v4sf)(__m128)(Y), (M)) 322 #define _mm_round_pd(X, M) \ 323 (__m128d)__builtin_ia32_roundpd((__v2df)(__m128d)(X), (M)) 363 #define _mm_round_sd(X, Y, M) \ 364 (__m128d)__builtin_ia32_roundsd((__v2df)(__m128d)(X), \ 365 (__v2df)(__m128d)(Y), (M)) 392 #define _mm_blend_pd(V1, V2, M) \ 393 (__m128d) __builtin_ia32_blendpd ((__v2df)(__m128d)(V1), \ 394 (__v2df)(__m128d)(V2), (int)(M)) 420 #define _mm_blend_ps(V1, V2, M) \ 421 (__m128) __builtin_ia32_blendps ((__v4sf)(__m128)(V1), \ 422 (__v4sf)(__m128)(V2), (int)(M)) 447 return (__m128d) __builtin_ia32_blendvpd ((__v2df)__V1, (__v2df)__V2,
474 return (__m128) __builtin_ia32_blendvps ((__v4sf)__V1, (__v4sf)__V2,
501 return (__m128i) __builtin_ia32_pblendvb128 ((__v16qi)__V1, (__v16qi)__V2,
529 #define _mm_blend_epi16(V1, V2, M) \ 530 (__m128i) __builtin_ia32_pblendw128 ((__v8hi)(__m128i)(V1), \ 531 (__v8hi)(__m128i)(V2), (int)(M)) 550 return (__m128i) ((__v4su)__V1 * (__v4su)__V2);
570 return (__m128i) __builtin_ia32_pmuldq128 ((__v4si)__V1, (__v4si)__V2);
606 #define _mm_dp_ps(X, Y, M) \ 607 (__m128) __builtin_ia32_dpps((__v4sf)(__m128)(X), \ 608 (__v4sf)(__m128)(Y), (M)) 641 #define _mm_dp_pd(X, Y, M) \ 642 (__m128d) __builtin_ia32_dppd((__v2df)(__m128d)(X), \ 643 (__v2df)(__m128d)(Y), (M)) 661 return (__m128i) __builtin_nontemporal_load ((
const __v2di *) __V);
681 return (__m128i) __builtin_ia32_pminsb128 ((__v16qi) __V1, (__v16qi) __V2);
700 return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi) __V1, (__v16qi) __V2);
719 return (__m128i) __builtin_ia32_pminuw128 ((__v8hi) __V1, (__v8hi) __V2);
738 return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi) __V1, (__v8hi) __V2);
757 return (__m128i) __builtin_ia32_pminsd128 ((__v4si) __V1, (__v4si) __V2);
776 return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si) __V1, (__v4si) __V2);
795 return (__m128i) __builtin_ia32_pminud128((__v4si) __V1, (__v4si) __V2);
814 return (__m128i) __builtin_ia32_pmaxud128((__v4si) __V1, (__v4si) __V2);
858 #define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N)) 882 #define _mm_extract_ps(X, N) (__extension__ \ 883 ({ union { int __i; float __f; } __t; \ 884 __t.__f = __builtin_ia32_vec_ext_v4sf((__v4sf)(__m128)(X), (int)(N)); \ 889 #define _MM_EXTRACT_FLOAT(D, X, N) \ 890 { (D) = __builtin_ia32_vec_ext_v4sf((__v4sf)(__m128)(X), (int)(N)); } 894 #define _MM_MK_INSERTPS_NDX(X, Y, Z) (((X) << 6) | ((Y) << 4) | (Z)) 897 #define _MM_PICK_OUT_PS(X, N) _mm_insert_ps (_mm_setzero_ps(), (X), \ 898 _MM_MK_INSERTPS_NDX((N), 0, 0x0e)) 941 #define _mm_insert_epi8(X, I, N) \ 942 (__m128i)__builtin_ia32_vec_set_v16qi((__v16qi)(__m128i)(X), \ 973 #define _mm_insert_epi32(X, I, N) \ 974 (__m128i)__builtin_ia32_vec_set_v4si((__v4si)(__m128i)(X), \ 1004 #define _mm_insert_epi64(X, I, N) \ 1005 (__m128i)__builtin_ia32_vec_set_v2di((__v2di)(__m128i)(X), \ 1006 (long long)(I), (int)(N)) 1047 #define _mm_extract_epi8(X, N) \ 1048 (int)(unsigned char)__builtin_ia32_vec_ext_v16qi((__v16qi)(__m128i)(X), \ 1073 #define _mm_extract_epi32(X, N) \ 1074 (int)__builtin_ia32_vec_ext_v4si((__v4si)(__m128i)(X), (int)(N)) 1096 #define _mm_extract_epi64(X, N) \ 1097 (long long)__builtin_ia32_vec_ext_v2di((__v2di)(__m128i)(X), (int)(N)) 1116 return __builtin_ia32_ptestz128((__v2di)__M, (__v2di)__V);
1134 return __builtin_ia32_ptestc128((__v2di)__M, (__v2di)__V);
1153 return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V);
1171 #define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V))) 1190 #define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V)) 1208 #define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V)) 1226 return (__m128i)((__v2di)__V1 == (__v2di)__V2);
1248 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);
1269 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3), __v4si);
1290 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1), __v2di);
1309 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1, 2, 3), __v4si);
1328 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1), __v2di);
1347 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v4si)__V, (__v4si)__V, 0, 1), __v2di);
1367 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);
1386 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3), __v4si);
1405 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1), __v2di);
1424 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1, 2, 3), __v4si);
1443 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1), __v2di);
1462 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v4su)__V, (__v4su)__V, 0, 1), __v2di);
1491 return (__m128i) __builtin_ia32_packusdw128((__v4si)__V1, (__v4si)__V2);
1530 #define _mm_mpsadbw_epu8(X, Y, M) \ 1531 (__m128i) __builtin_ia32_mpsadbw128((__v16qi)(__m128i)(X), \ 1532 (__v16qi)(__m128i)(Y), (M)) 1550 return (__m128i) __builtin_ia32_phminposuw128((__v8hi)__V);
1558 #undef __DEFAULT_FN_ATTRS 1559 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("sse4.2"))) 1562 #define _SIDD_UBYTE_OPS 0x00 1563 #define _SIDD_UWORD_OPS 0x01 1564 #define _SIDD_SBYTE_OPS 0x02 1565 #define _SIDD_SWORD_OPS 0x03 1568 #define _SIDD_CMP_EQUAL_ANY 0x00 1569 #define _SIDD_CMP_RANGES 0x04 1570 #define _SIDD_CMP_EQUAL_EACH 0x08 1571 #define _SIDD_CMP_EQUAL_ORDERED 0x0c 1574 #define _SIDD_POSITIVE_POLARITY 0x00 1575 #define _SIDD_NEGATIVE_POLARITY 0x10 1576 #define _SIDD_MASKED_POSITIVE_POLARITY 0x20 1577 #define _SIDD_MASKED_NEGATIVE_POLARITY 0x30 1580 #define _SIDD_LEAST_SIGNIFICANT 0x00 1581 #define _SIDD_MOST_SIGNIFICANT 0x40 1584 #define _SIDD_BIT_MASK 0x00 1585 #define _SIDD_UNIT_MASK 0x40 1640 #define _mm_cmpistrm(A, B, M) \ 1641 (__m128i)__builtin_ia32_pcmpistrm128((__v16qi)(__m128i)(A), \ 1642 (__v16qi)(__m128i)(B), (int)(M)) 1694 #define _mm_cmpistri(A, B, M) \ 1695 (int)__builtin_ia32_pcmpistri128((__v16qi)(__m128i)(A), \ 1696 (__v16qi)(__m128i)(B), (int)(M)) 1754 #define _mm_cmpestrm(A, LA, B, LB, M) \ 1755 (__m128i)__builtin_ia32_pcmpestrm128((__v16qi)(__m128i)(A), (int)(LA), \ 1756 (__v16qi)(__m128i)(B), (int)(LB), \ 1813 #define _mm_cmpestri(A, LA, B, LB, M) \ 1814 (int)__builtin_ia32_pcmpestri128((__v16qi)(__m128i)(A), (int)(LA), \ 1815 (__v16qi)(__m128i)(B), (int)(LB), \ 1865 #define _mm_cmpistra(A, B, M) \ 1866 (int)__builtin_ia32_pcmpistria128((__v16qi)(__m128i)(A), \ 1867 (__v16qi)(__m128i)(B), (int)(M)) 1914 #define _mm_cmpistrc(A, B, M) \ 1915 (int)__builtin_ia32_pcmpistric128((__v16qi)(__m128i)(A), \ 1916 (__v16qi)(__m128i)(B), (int)(M)) 1962 #define _mm_cmpistro(A, B, M) \ 1963 (int)__builtin_ia32_pcmpistrio128((__v16qi)(__m128i)(A), \ 1964 (__v16qi)(__m128i)(B), (int)(M)) 2012 #define _mm_cmpistrs(A, B, M) \ 2013 (int)__builtin_ia32_pcmpistris128((__v16qi)(__m128i)(A), \ 2014 (__v16qi)(__m128i)(B), (int)(M)) 2062 #define _mm_cmpistrz(A, B, M) \ 2063 (int)__builtin_ia32_pcmpistriz128((__v16qi)(__m128i)(A), \ 2064 (__v16qi)(__m128i)(B), (int)(M)) 2116 #define _mm_cmpestra(A, LA, B, LB, M) \ 2117 (int)__builtin_ia32_pcmpestria128((__v16qi)(__m128i)(A), (int)(LA), \ 2118 (__v16qi)(__m128i)(B), (int)(LB), \ 2170 #define _mm_cmpestrc(A, LA, B, LB, M) \ 2171 (int)__builtin_ia32_pcmpestric128((__v16qi)(__m128i)(A), (int)(LA), \ 2172 (__v16qi)(__m128i)(B), (int)(LB), \ 2223 #define _mm_cmpestro(A, LA, B, LB, M) \ 2224 (int)__builtin_ia32_pcmpestrio128((__v16qi)(__m128i)(A), (int)(LA), \ 2225 (__v16qi)(__m128i)(B), (int)(LB), \ 2278 #define _mm_cmpestrs(A, LA, B, LB, M) \ 2279 (int)__builtin_ia32_pcmpestris128((__v16qi)(__m128i)(A), (int)(LA), \ 2280 (__v16qi)(__m128i)(B), (int)(LB), \ 2332 #define _mm_cmpestrz(A, LA, B, LB, M) \ 2333 (int)__builtin_ia32_pcmpestriz128((__v16qi)(__m128i)(A), (int)(LA), \ 2334 (__v16qi)(__m128i)(B), (int)(LB), \ 2354 return (__m128i)((__v2di)__V1 > (__v2di)__V2);
2375 return __builtin_ia32_crc32qi(__C, __D);
2395 return __builtin_ia32_crc32hi(__C, __D);
2415 return __builtin_ia32_crc32si(__C, __D);
2434 _mm_crc32_u64(
unsigned long long __C,
unsigned long long __D)
2436 return __builtin_ia32_crc32di(__C, __D);
2440 #undef __DEFAULT_FN_ATTRS static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_min_epi32(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [4 x i32] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi16_epi64(__m128i __V)
Sign-extends each of the lower two 16-bit integer elements of a 128-bit integer vector of [8 x i16] t...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_max_epu32(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [4 x u32] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cmpeq_epi64(__m128i __V1, __m128i __V2)
Compares each of the corresponding 64-bit values of the 128-bit integer vectors for equality...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_packus_epi32(__m128i __V1, __m128i __V2)
Converts 32-bit signed integers from both 128-bit integer vector operands into 16-bit unsigned intege...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_max_epi32(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [4 x i32] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_stream_load_si128(__m128i const *__V)
Loads integer values from a 128-bit aligned memory location to a 128-bit integer vector.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu16_epi64(__m128i __V)
Zero-extends each of the lower two 16-bit integer elements of a 128-bit integer vector of [8 x i16] t...
static __inline__ unsigned int __DEFAULT_FN_ATTRS _mm_crc32_u16(unsigned int __C, unsigned short __D)
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned short operand.
static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_blendv_pd(__m128d __V1, __m128d __V2, __m128d __M)
Returns a 128-bit vector of [2 x double] where the values are selected from either the first or secon...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_min_epi8(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [16 x i8] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi32_epi64(__m128i __V)
Sign-extends each of the lower two 32-bit integer elements of a 128-bit integer vector of [4 x i32] t...
static __inline__ unsigned int __DEFAULT_FN_ATTRS _mm_crc32_u32(unsigned int __C, unsigned int __D)
Adds the first unsigned integer operand to the CRC-32C checksum of the second unsigned integer operan...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mullo_epi32(__m128i __V1, __m128i __V2)
Multiples corresponding elements of two 128-bit vectors of [4 x i32] and returns the lower 32 bits of...
static __inline__ int __DEFAULT_FN_ATTRS _mm_testz_si128(__m128i __M, __m128i __V)
Tests whether the specified bits in a 128-bit integer vector are all zeros.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_blendv_epi8(__m128i __V1, __m128i __V2, __m128i __M)
Returns a 128-bit vector of [16 x i8] where the values are selected from either of the first or secon...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cmpgt_epi64(__m128i __V1, __m128i __V2)
Compares each of the corresponding 64-bit values of the 128-bit integer vectors to determine if the v...
static __inline__ int __DEFAULT_FN_ATTRS _mm_testnzc_si128(__m128i __M, __m128i __V)
Tests whether the specified bits in a 128-bit integer vector are neither all zeros nor all ones...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu8_epi16(__m128i __V)
Zero-extends each of the lower eight 8-bit integer elements of a 128-bit vector of [16 x i8] to 16-bi...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_min_epu16(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [8 x u16] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_max_epu16(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [8 x u16] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mul_epi32(__m128i __V1, __m128i __V2)
Multiplies corresponding even-indexed elements of two 128-bit vectors of [4 x i32] and returns a 128-...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu8_epi64(__m128i __V)
Zero-extends each of the lower two 8-bit integer elements of a 128-bit integer vector of [16 x i8] to...
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_blendv_ps(__m128 __V1, __m128 __V2, __m128 __M)
Returns a 128-bit vector of [4 x float] where the values are selected from either the first or second...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_max_epi8(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [16 x i8] and returns a 128-bit vector ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu16_epi32(__m128i __V)
Zero-extends each of the lower four 16-bit integer elements of a 128-bit integer vector of [8 x i16] ...
static __inline__ unsigned int __DEFAULT_FN_ATTRS _mm_crc32_u8(unsigned int __C, unsigned char __D)
Adds the unsigned integer operand to the CRC-32C checksum of the unsigned char operand.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi8_epi64(__m128i __V)
Sign-extends each of the lower two 8-bit integer elements of a 128-bit integer vector of [16 x i8] to...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_minpos_epu16(__m128i __V)
Finds the minimum unsigned 16-bit element in the input 128-bit vector of [8 x u16] and returns it and...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_min_epu32(__m128i __V1, __m128i __V2)
Compares the corresponding elements of two 128-bit vectors of [4 x u32] and returns a 128-bit vector ...
#define __DEFAULT_FN_ATTRS
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi16_epi32(__m128i __V)
Sign-extends each of the lower four 16-bit integer elements of a 128-bit integer vector of [8 x i16] ...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi8_epi32(__m128i __V)
Sign-extends each of the lower four 8-bit integer elements of a 128-bit vector of [16 x i8] to 32-bit...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu32_epi64(__m128i __V)
Zero-extends each of the lower two 32-bit integer elements of a 128-bit integer vector of [4 x i32] t...
static __inline__ int __DEFAULT_FN_ATTRS _mm_testc_si128(__m128i __M, __m128i __V)
Tests whether the specified bits in a 128-bit integer vector are all ones.
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepu8_epi32(__m128i __V)
Zero-extends each of the lower four 8-bit integer elements of a 128-bit vector of [16 x i8] to 32-bit...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_cvtepi8_epi16(__m128i __V)
Sign-extends each of the lower eight 8-bit integer elements of a 128-bit vector of [16 x i8] to 16-bi...