avx512vnniintrin.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /* Copyright (C) 2013-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. #ifndef _IMMINTRIN_H_INCLUDED
  19. #error "Never use <avx512vnniintrin.h> directly; include <immintrin.h> instead."
  20. #endif
  21. #ifndef __AVX512VNNIINTRIN_H_INCLUDED
  22. #define __AVX512VNNIINTRIN_H_INCLUDED
  23. #if !defined(__AVX512VNNI__)
  24. #pragma GCC push_options
  25. #pragma GCC target("avx512vnni")
  26. #define __DISABLE_AVX512VNNI__
  27. #endif /* __AVX512VNNI__ */
  28. extern __inline __m512i
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _mm512_dpbusd_epi32 (__m512i __A, __m512i __B, __m512i __C)
  31. {
  32. return (__m512i) __builtin_ia32_vpdpbusd_v16si ((__v16si)__A, (__v16si) __B,
  33. (__v16si) __C);
  34. }
  35. extern __inline __m512i
  36. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  37. _mm512_mask_dpbusd_epi32 (__m512i __A, __mmask16 __B, __m512i __C, __m512i __D)
  38. {
  39. return (__m512i)__builtin_ia32_vpdpbusd_v16si_mask ((__v16si)__A,
  40. (__v16si) __C, (__v16si) __D, (__mmask16)__B);
  41. }
  42. extern __inline __m512i
  43. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  44. _mm512_maskz_dpbusd_epi32 (__mmask16 __A, __m512i __B, __m512i __C,
  45. __m512i __D)
  46. {
  47. return (__m512i)__builtin_ia32_vpdpbusd_v16si_maskz ((__v16si)__B,
  48. (__v16si) __C, (__v16si) __D, (__mmask16)__A);
  49. }
  50. extern __inline __m512i
  51. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  52. _mm512_dpbusds_epi32 (__m512i __A, __m512i __B, __m512i __C)
  53. {
  54. return (__m512i) __builtin_ia32_vpdpbusds_v16si ((__v16si)__A, (__v16si) __B,
  55. (__v16si) __C);
  56. }
  57. extern __inline __m512i
  58. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  59. _mm512_mask_dpbusds_epi32 (__m512i __A, __mmask16 __B, __m512i __C,
  60. __m512i __D)
  61. {
  62. return (__m512i)__builtin_ia32_vpdpbusds_v16si_mask ((__v16si)__A,
  63. (__v16si) __C, (__v16si) __D, (__mmask16)__B);
  64. }
  65. extern __inline __m512i
  66. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  67. _mm512_maskz_dpbusds_epi32 (__mmask16 __A, __m512i __B, __m512i __C,
  68. __m512i __D)
  69. {
  70. return (__m512i)__builtin_ia32_vpdpbusds_v16si_maskz ((__v16si)__B,
  71. (__v16si) __C, (__v16si) __D, (__mmask16)__A);
  72. }
  73. extern __inline __m512i
  74. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  75. _mm512_dpwssd_epi32 (__m512i __A, __m512i __B, __m512i __C)
  76. {
  77. return (__m512i) __builtin_ia32_vpdpwssd_v16si ((__v16si)__A, (__v16si) __B,
  78. (__v16si) __C);
  79. }
  80. extern __inline __m512i
  81. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  82. _mm512_mask_dpwssd_epi32 (__m512i __A, __mmask16 __B, __m512i __C, __m512i __D)
  83. {
  84. return (__m512i)__builtin_ia32_vpdpwssd_v16si_mask ((__v16si)__A,
  85. (__v16si) __C, (__v16si) __D, (__mmask16)__B);
  86. }
  87. extern __inline __m512i
  88. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  89. _mm512_maskz_dpwssd_epi32 (__mmask16 __A, __m512i __B, __m512i __C,
  90. __m512i __D)
  91. {
  92. return (__m512i)__builtin_ia32_vpdpwssd_v16si_maskz ((__v16si)__B,
  93. (__v16si) __C, (__v16si) __D, (__mmask16)__A);
  94. }
  95. extern __inline __m512i
  96. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  97. _mm512_dpwssds_epi32 (__m512i __A, __m512i __B, __m512i __C)
  98. {
  99. return (__m512i) __builtin_ia32_vpdpwssds_v16si ((__v16si)__A, (__v16si) __B,
  100. (__v16si) __C);
  101. }
  102. extern __inline __m512i
  103. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  104. _mm512_mask_dpwssds_epi32 (__m512i __A, __mmask16 __B, __m512i __C,
  105. __m512i __D)
  106. {
  107. return (__m512i)__builtin_ia32_vpdpwssds_v16si_mask ((__v16si)__A,
  108. (__v16si) __C, (__v16si) __D, (__mmask16)__B);
  109. }
  110. extern __inline __m512i
  111. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  112. _mm512_maskz_dpwssds_epi32 (__mmask16 __A, __m512i __B, __m512i __C,
  113. __m512i __D)
  114. {
  115. return (__m512i)__builtin_ia32_vpdpwssds_v16si_maskz ((__v16si)__B,
  116. (__v16si) __C, (__v16si) __D, (__mmask16)__A);
  117. }
  118. #ifdef __DISABLE_AVX512VNNI__
  119. #undef __DISABLE_AVX512VNNI__
  120. #pragma GCC pop_options
  121. #endif /* __DISABLE_AVX512VNNI__ */
  122. #endif /* __AVX512VNNIINTRIN_H_INCLUDED */