1351280Sdim/*===------- avx512vpintersectintrin.h - VP2INTERSECT intrinsics ------------=== 2351280Sdim * 3351280Sdim * 4351280Sdim * Permission is hereby granted, free of charge, to any person obtaining a copy 5351280Sdim * of this software and associated documentation files (the "Software"), to deal 6351280Sdim * in the Software without restriction, including without limitation the rights 7351280Sdim * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8351280Sdim * copies of the Software, and to permit persons to whom the Software is 9351280Sdim * furnished to do so, subject to the following conditions: 10351280Sdim * 11351280Sdim * The above copyright notice and this permission notice shall be included in 12351280Sdim * all copies or substantial portions of the Software. 13351280Sdim * 14351280Sdim * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15351280Sdim * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16351280Sdim * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17351280Sdim * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18351280Sdim * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19351280Sdim * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20351280Sdim * THE SOFTWARE. 21351280Sdim * 22351280Sdim *===-----------------------------------------------------------------------=== 23351280Sdim */ 24351280Sdim#ifndef __IMMINTRIN_H 25351280Sdim#error "Never use <avx512vp2intersect.h> directly; include <immintrin.h> instead." 26351280Sdim#endif 27351280Sdim 28351280Sdim#ifndef _AVX512VP2INTERSECT_H 29351280Sdim#define _AVX512VP2INTERSECT_H 30351280Sdim 31351280Sdim#define __DEFAULT_FN_ATTRS \ 32351280Sdim __attribute__((__always_inline__, __nodebug__, __target__("avx512vp2intersect"), \ 33351280Sdim __min_vector_width__(512))) 34351280Sdim 35351280Sdim/// Store, in an even/odd pair of mask registers, the indicators of the 36351280Sdim/// locations of value matches between dwords in operands __a and __b. 37351280Sdim/// 38351280Sdim/// \headerfile <x86intrin.h> 39351280Sdim/// 40351280Sdim/// This intrinsic corresponds to the <c> VP2INTERSECTD </c> instruction. 41351280Sdim/// 42351280Sdim/// \param __a 43351280Sdim/// A 512-bit vector of [16 x i32]. 44351280Sdim/// \param __b 45351280Sdim/// A 512-bit vector of [16 x i32] 46351280Sdim/// \param __m0 47351280Sdim/// A pointer point to 16-bit mask 48351280Sdim/// \param __m1 49351280Sdim/// A pointer point to 16-bit mask 50351280Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 51351280Sdim_mm512_2intersect_epi32(__m512i __a, __m512i __b, __mmask16 *__m0, __mmask16 *__m1) { 52351280Sdim __builtin_ia32_vp2intersect_d_512((__v16si)__a, (__v16si)__b, __m0, __m1); 53351280Sdim} 54351280Sdim 55351280Sdim/// Store, in an even/odd pair of mask registers, the indicators of the 56351280Sdim/// locations of value matches between quadwords in operands __a and __b. 57351280Sdim/// 58351280Sdim/// \headerfile <x86intrin.h> 59351280Sdim/// 60351280Sdim/// This intrinsic corresponds to the <c> VP2INTERSECTQ </c> instruction. 61351280Sdim/// 62351280Sdim/// \param __a 63351280Sdim/// A 512-bit vector of [8 x i64]. 64351280Sdim/// \param __b 65351280Sdim/// A 512-bit vector of [8 x i64] 66351280Sdim/// \param __m0 67351280Sdim/// A pointer point to 8-bit mask 68351280Sdim/// \param __m1 69351280Sdim/// A pointer point to 8-bit mask 70351280Sdimstatic __inline__ void __DEFAULT_FN_ATTRS 71351280Sdim_mm512_2intersect_epi64(__m512i __a, __m512i __b, __mmask8 *__m0, __mmask8 *__m1) { 72351280Sdim __builtin_ia32_vp2intersect_q_512((__v8di)__a, (__v8di)__b, __m0, __m1); 73351280Sdim} 74351280Sdim 75351280Sdim#undef __DEFAULT_FN_ATTRS 76351280Sdim 77351280Sdim#endif 78