avx512vp2intersectvlintrin.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Copyright (C) 2019-2022 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. #if !defined _IMMINTRIN_H_INCLUDED
  19. #error "Never use <avx512vp2intersectintrin.h> directly; include <immintrin.h> instead."
  20. #endif
  21. #ifndef _AVX512VP2INTERSECTVLINTRIN_H_INCLUDED
  22. #define _AVX512VP2INTERSECTVLINTRIN_H_INCLUDED
  23. #if !defined(__AVX512VP2INTERSECT__) || !defined(__AVX512VL__)
  24. #pragma GCC push_options
  25. #pragma GCC target("avx512vp2intersect,avx512vl")
  26. #define __DISABLE_AVX512VP2INTERSECTVL__
  27. #endif /* __AVX512VP2INTERSECTVL__ */
  28. extern __inline void
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm_2intersect_epi32 (__m128i __A, __m128i __B, __mmask8 *__U, __mmask8 *__M)
  31. {
  32. __builtin_ia32_2intersectd128 (__U, __M, (__v4si) __A, (__v4si) __B);
  33. }
  34. extern __inline void
  35. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  36. _mm256_2intersect_epi32 (__m256i __A, __m256i __B, __mmask8 *__U,
  37. __mmask8 *__M)
  38. {
  39. __builtin_ia32_2intersectd256 (__U, __M, (__v8si) __A, (__v8si) __B);
  40. }
  41. extern __inline void
  42. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  43. _mm_2intersect_epi64 (__m128i __A, __m128i __B, __mmask8 *__U, __mmask8 *__M)
  44. {
  45. __builtin_ia32_2intersectq128 (__U, __M, (__v2di) __A, (__v2di) __B);
  46. }
  47. extern __inline void
  48. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  49. _mm256_2intersect_epi64 (__m256i __A, __m256i __B, __mmask8 *__U,
  50. __mmask8 *__M)
  51. {
  52. __builtin_ia32_2intersectq256 (__U, __M, (__v4di) __A, (__v4di) __B);
  53. }
  54. #ifdef __DISABLE_AVX512VP2INTERSECTVL__
  55. #undef __DISABLE_AVX512VP2INTERSECTVL__
  56. #pragma GCC pop_options
  57. #endif /* __DISABLE_AVX512VP2INTERSECTVL__ */
  58. #endif /* _AVX512VP2INTERSECTVLINTRIN_H_INCLUDED */