avx5124vnniwintrin.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* Copyright (C) 2015-2019 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 <avx5124vnniwintrin.h> directly; include <x86intrin.h> instead."
  20. #endif
  21. #ifndef _AVX5124VNNIWINTRIN_H_INCLUDED
  22. #define _AVX5124VNNIWINTRIN_H_INCLUDED
  23. #ifndef __AVX5124VNNIW__
  24. #pragma GCC push_options
  25. #pragma GCC target("avx5124vnniw")
  26. #define __DISABLE_AVX5124VNNIW__
  27. #endif /* __AVX5124VNNIW__ */
  28. extern __inline __m512i
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm512_4dpwssd_epi32 (__m512i __A, __m512i __B, __m512i __C,
  31. __m512i __D, __m512i __E, __m128i *__F)
  32. {
  33. return (__m512i) __builtin_ia32_vp4dpwssd ((__v16si) __B,
  34. (__v16si) __C,
  35. (__v16si) __D,
  36. (__v16si) __E,
  37. (__v16si) __A,
  38. (const __v4si *) __F);
  39. }
  40. extern __inline __m512i
  41. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  42. _mm512_mask_4dpwssd_epi32 (__m512i __A, __mmask16 __U, __m512i __B,
  43. __m512i __C, __m512i __D, __m512i __E,
  44. __m128i *__F)
  45. {
  46. return (__m512i) __builtin_ia32_vp4dpwssd_mask ((__v16si) __B,
  47. (__v16si) __C,
  48. (__v16si) __D,
  49. (__v16si) __E,
  50. (__v16si) __A,
  51. (const __v4si *) __F,
  52. (__v16si) __A,
  53. (__mmask16) __U);
  54. }
  55. extern __inline __m512i
  56. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  57. _mm512_maskz_4dpwssd_epi32 (__mmask16 __U, __m512i __A, __m512i __B,
  58. __m512i __C, __m512i __D, __m512i __E,
  59. __m128i *__F)
  60. {
  61. return (__m512i) __builtin_ia32_vp4dpwssd_mask ((__v16si) __B,
  62. (__v16si) __C,
  63. (__v16si) __D,
  64. (__v16si) __E,
  65. (__v16si) __A,
  66. (const __v4si *) __F,
  67. (__v16si) _mm512_setzero_ps (),
  68. (__mmask16) __U);
  69. }
  70. extern __inline __m512i
  71. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  72. _mm512_4dpwssds_epi32 (__m512i __A, __m512i __B, __m512i __C,
  73. __m512i __D, __m512i __E, __m128i *__F)
  74. {
  75. return (__m512i) __builtin_ia32_vp4dpwssds ((__v16si) __B,
  76. (__v16si) __C,
  77. (__v16si) __D,
  78. (__v16si) __E,
  79. (__v16si) __A,
  80. (const __v4si *) __F);
  81. }
  82. extern __inline __m512i
  83. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  84. _mm512_mask_4dpwssds_epi32 (__m512i __A, __mmask16 __U, __m512i __B,
  85. __m512i __C, __m512i __D, __m512i __E,
  86. __m128i *__F)
  87. {
  88. return (__m512i) __builtin_ia32_vp4dpwssds_mask ((__v16si) __B,
  89. (__v16si) __C,
  90. (__v16si) __D,
  91. (__v16si) __E,
  92. (__v16si) __A,
  93. (const __v4si *) __F,
  94. (__v16si) __A,
  95. (__mmask16) __U);
  96. }
  97. extern __inline __m512i
  98. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  99. _mm512_maskz_4dpwssds_epi32 (__mmask16 __U, __m512i __A, __m512i __B,
  100. __m512i __C, __m512i __D, __m512i __E,
  101. __m128i *__F)
  102. {
  103. return (__m512i) __builtin_ia32_vp4dpwssds_mask ((__v16si) __B,
  104. (__v16si) __C,
  105. (__v16si) __D,
  106. (__v16si) __E,
  107. (__v16si) __A,
  108. (const __v4si *) __F,
  109. (__v16si) _mm512_setzero_ps (),
  110. (__mmask16) __U);
  111. }
  112. #ifdef __DISABLE_AVX5124VNNIW__
  113. #undef __DISABLE_AVX5124VNNIW__
  114. #pragma GCC pop_options
  115. #endif /* __DISABLE_AVX5124VNNIW__ */
  116. #endif /* _AVX5124VNNIWINTRIN_H_INCLUDED */