clang API Documentation
00001 /*===---- avx512vlbwintrin.h - AVX512VL and AVX512BW intrinsics ----------=== 00002 * 00003 * Permission is hereby granted, free of charge, to any person obtaining a copy 00004 * of this software and associated documentation files (the "Software"), to deal 00005 * in the Software without restriction, including without limitation the rights 00006 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00007 * copies of the Software, and to permit persons to whom the Software is 00008 * furnished to do so, subject to the following conditions: 00009 * 00010 * The above copyright notice and this permission notice shall be included in 00011 * all copies or substantial portions of the Software. 00012 * 00013 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00014 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00015 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00016 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00017 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00018 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00019 * THE SOFTWARE. 00020 * 00021 *===-----------------------------------------------------------------------=== 00022 */ 00023 00024 #ifndef __IMMINTRIN_H 00025 #error "Never use <avx512vlbwintrin.h> directly; include <immintrin.h> instead." 00026 #endif 00027 00028 #ifndef __AVX512VLBWINTRIN_H 00029 #define __AVX512VLBWINTRIN_H 00030 00031 /* Integer compare */ 00032 00033 static __inline__ __mmask16 __attribute__((__always_inline__, __nodebug__)) 00034 _mm_cmpeq_epi8_mask(__m128i __a, __m128i __b) { 00035 return (__mmask16)__builtin_ia32_pcmpeqb128_mask((__v16qi)__a, (__v16qi)__b, 00036 (__mmask16)-1); 00037 } 00038 00039 static __inline__ __mmask16 __attribute__((__always_inline__, __nodebug__)) 00040 _mm_mask_cmpeq_epi8_mask(__mmask16 __u, __m128i __a, __m128i __b) { 00041 return (__mmask16)__builtin_ia32_pcmpeqb128_mask((__v16qi)__a, (__v16qi)__b, 00042 __u); 00043 } 00044 00045 00046 static __inline__ __mmask32 __attribute__((__always_inline__, __nodebug__)) 00047 _mm256_cmpeq_epi8_mask(__m256i __a, __m256i __b) { 00048 return (__mmask32)__builtin_ia32_pcmpeqb256_mask((__v32qi)__a, (__v32qi)__b, 00049 (__mmask32)-1); 00050 } 00051 00052 static __inline__ __mmask32 __attribute__((__always_inline__, __nodebug__)) 00053 _mm256_mask_cmpeq_epi8_mask(__mmask32 __u, __m256i __a, __m256i __b) { 00054 return (__mmask32)__builtin_ia32_pcmpeqb256_mask((__v32qi)__a, (__v32qi)__b, 00055 __u); 00056 } 00057 00058 static __inline__ __mmask8 __attribute__((__always_inline__, __nodebug__)) 00059 _mm_cmpeq_epi16_mask(__m128i __a, __m128i __b) { 00060 return (__mmask8)__builtin_ia32_pcmpeqw128_mask((__v8hi)__a, (__v8hi)__b, 00061 (__mmask8)-1); 00062 } 00063 00064 static __inline__ __mmask8 __attribute__((__always_inline__, __nodebug__)) 00065 _mm_mask_cmpeq_epi16_mask(__mmask8 __u, __m128i __a, __m128i __b) { 00066 return (__mmask8)__builtin_ia32_pcmpeqw128_mask((__v8hi)__a, (__v8hi)__b, 00067 __u); 00068 } 00069 00070 00071 static __inline__ __mmask16 __attribute__((__always_inline__, __nodebug__)) 00072 _mm256_cmpeq_epi16_mask(__m256i __a, __m256i __b) { 00073 return (__mmask16)__builtin_ia32_pcmpeqw256_mask((__v16hi)__a, (__v16hi)__b, 00074 (__mmask16)-1); 00075 } 00076 00077 static __inline__ __mmask16 __attribute__((__always_inline__, __nodebug__)) 00078 _mm256_mask_cmpeq_epi16_mask(__mmask16 __u, __m256i __a, __m256i __b) { 00079 return (__mmask16)__builtin_ia32_pcmpeqw256_mask((__v16hi)__a, (__v16hi)__b, 00080 __u); 00081 } 00082 00083 #endif /* __AVX512VLBWINTRIN_H */