simde-features.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. /* SPDX-License-Identifier: MIT
  2. *
  3. * Permission is hereby granted, free of charge, to any person
  4. * obtaining a copy of this software and associated documentation
  5. * files (the "Software"), to deal in the Software without
  6. * restriction, including without limitation the rights to use, copy,
  7. * modify, merge, publish, distribute, sublicense, and/or sell copies
  8. * of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be
  12. * included in all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  15. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  17. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  18. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  19. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  21. * SOFTWARE.
  22. *
  23. * Copyright:
  24. * 2020 Evan Nemerson <evan@nemerson.com>
  25. * 2023 Ju-Hung Li <jhlee@pllab.cs.nthu.edu.tw> (Copyright owned by NTHU pllab)
  26. */
  27. /* simde-arch.h is used to determine which features are available according
  28. to the compiler. However, we want to make it possible to forcibly enable
  29. or disable APIs */
  30. #if !defined(SIMDE_FEATURES_H)
  31. #define SIMDE_FEATURES_H
  32. #include "simde-arch.h"
  33. #include "simde-diagnostic.h"
  34. #if !defined(SIMDE_X86_SVML_NATIVE) && !defined(SIMDE_X86_SVML_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  35. #if defined(SIMDE_ARCH_X86_SVML)
  36. #define SIMDE_X86_SVML_NATIVE
  37. #endif
  38. #endif
  39. #if !defined(SIMDE_X86_AVX512VP2INTERSECT_NATIVE) && !defined(SIMDE_X86_AVX512VP2INTERSECT_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  40. #if defined(SIMDE_ARCH_X86_AVX512VP2INTERSECT)
  41. #define SIMDE_X86_AVX512VP2INTERSECT_NATIVE
  42. #endif
  43. #endif
  44. #if defined(SIMDE_X86_AVX512VP2INTERSECT_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  45. #define SIMDE_X86_AVX512F_NATIVE
  46. #endif
  47. #if !defined(SIMDE_X86_AVX512VPOPCNTDQ_NATIVE) && !defined(SIMDE_X86_AVX512VPOPCNTDQ_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  48. #if defined(SIMDE_ARCH_X86_AVX512VPOPCNTDQ)
  49. #define SIMDE_X86_AVX512VPOPCNTDQ_NATIVE
  50. #endif
  51. #endif
  52. #if defined(SIMDE_X86_AVX512VPOPCNTDQ_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  53. #define SIMDE_X86_AVX512F_NATIVE
  54. #endif
  55. #if !defined(SIMDE_X86_AVX512BITALG_NATIVE) && !defined(SIMDE_X86_AVX512BITALG_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  56. #if defined(SIMDE_ARCH_X86_AVX512BITALG)
  57. #define SIMDE_X86_AVX512BITALG_NATIVE
  58. #endif
  59. #endif
  60. #if defined(SIMDE_X86_AVX512BITALG_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  61. #define SIMDE_X86_AVX512F_NATIVE
  62. #endif
  63. #if !defined(SIMDE_X86_AVX512VBMI_NATIVE) && !defined(SIMDE_X86_AVX512VBMI_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  64. #if defined(SIMDE_ARCH_X86_AVX512VBMI)
  65. #define SIMDE_X86_AVX512VBMI_NATIVE
  66. #endif
  67. #endif
  68. #if defined(SIMDE_X86_AVX512VBMI_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  69. #define SIMDE_X86_AVX512F_NATIVE
  70. #endif
  71. #if !defined(SIMDE_X86_AVX512VBMI2_NATIVE) && !defined(SIMDE_X86_AVX512VBMI2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  72. #if defined(SIMDE_ARCH_X86_AVX512VBMI2)
  73. #define SIMDE_X86_AVX512VBMI2_NATIVE
  74. #endif
  75. #endif
  76. #if defined(SIMDE_X86_AVX512VBMI2_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  77. #define SIMDE_X86_AVX512F_NATIVE
  78. #endif
  79. #if !defined(SIMDE_X86_AVX512VNNI_NATIVE) && !defined(SIMDE_X86_AVX512VNNI_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  80. #if defined(SIMDE_ARCH_X86_AVX512VNNI)
  81. #define SIMDE_X86_AVX512VNNI_NATIVE
  82. #endif
  83. #endif
  84. #if defined(SIMDE_X86_AVX512VNNI_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  85. #define SIMDE_X86_AVX512F_NATIVE
  86. #endif
  87. #if !defined(SIMDE_X86_AVX5124VNNIW_NATIVE) && !defined(SIMDE_X86_AVX5124VNNIW_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  88. #if defined(SIMDE_ARCH_X86_AVX5124VNNIW)
  89. #define SIMDE_X86_AVX5124VNNIW_NATIVE
  90. #endif
  91. #endif
  92. #if defined(SIMDE_X86_AVX5124VNNIW_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  93. #define SIMDE_X86_AVX512F_NATIVE
  94. #endif
  95. #if !defined(SIMDE_X86_AVX512CD_NATIVE) && !defined(SIMDE_X86_AVX512CD_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  96. #if defined(SIMDE_ARCH_X86_AVX512CD)
  97. #define SIMDE_X86_AVX512CD_NATIVE
  98. #endif
  99. #endif
  100. #if defined(SIMDE_X86_AVX512CD_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  101. #define SIMDE_X86_AVX512F_NATIVE
  102. #endif
  103. #if !defined(SIMDE_X86_AVX512DQ_NATIVE) && !defined(SIMDE_X86_AVX512DQ_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  104. #if defined(SIMDE_ARCH_X86_AVX512DQ)
  105. #define SIMDE_X86_AVX512DQ_NATIVE
  106. #endif
  107. #endif
  108. #if defined(SIMDE_X86_AVX512DQ_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  109. #define SIMDE_X86_AVX512F_NATIVE
  110. #endif
  111. #if !defined(SIMDE_X86_AVX512VL_NATIVE) && !defined(SIMDE_X86_AVX512VL_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  112. #if defined(SIMDE_ARCH_X86_AVX512VL)
  113. #define SIMDE_X86_AVX512VL_NATIVE
  114. #endif
  115. #endif
  116. #if defined(SIMDE_X86_AVX512VL_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  117. #define SIMDE_X86_AVX512F_NATIVE
  118. #endif
  119. #if !defined(SIMDE_X86_AVX512BW_NATIVE) && !defined(SIMDE_X86_AVX512BW_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  120. #if defined(SIMDE_ARCH_X86_AVX512BW)
  121. #define SIMDE_X86_AVX512BW_NATIVE
  122. #endif
  123. #endif
  124. #if defined(SIMDE_X86_AVX512BW_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  125. #define SIMDE_X86_AVX512F_NATIVE
  126. #endif
  127. #if !defined(SIMDE_X86_AVX512FP16_NATIVE) && !defined(SIMDE_X86_AVX512FP16_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  128. #if defined(SIMDE_ARCH_X86_AVX512FP16)
  129. #define SIMDE_X86_AVX512FP16_NATIVE
  130. #endif
  131. #endif
  132. #if defined(SIMDE_X86_AVX512BW_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  133. #define SIMDE_X86_AVX512F_NATIVE
  134. #endif
  135. #if !defined(SIMDE_X86_AVX512BF16_NATIVE) && !defined(SIMDE_X86_AVX512BF16_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  136. #if defined(SIMDE_ARCH_X86_AVX512BF16)
  137. #define SIMDE_X86_AVX512BF16_NATIVE
  138. #endif
  139. #endif
  140. #if defined(SIMDE_X86_AVX512BF16_NATIVE) && !defined(SIMDE_X86_AVX512F_NATIVE)
  141. #define SIMDE_X86_AVX512F_NATIVE
  142. #endif
  143. #if !defined(SIMDE_X86_AVX512F_NATIVE) && !defined(SIMDE_X86_AVX512F_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  144. #if defined(SIMDE_ARCH_X86_AVX512F)
  145. #define SIMDE_X86_AVX512F_NATIVE
  146. #endif
  147. #endif
  148. #if defined(SIMDE_X86_AVX512F_NATIVE) && !defined(SIMDE_X86_AVX2_NATIVE)
  149. #define SIMDE_X86_AVX2_NATIVE
  150. #endif
  151. #if !defined(SIMDE_X86_FMA_NATIVE) && !defined(SIMDE_X86_FMA_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  152. #if defined(SIMDE_ARCH_X86_FMA)
  153. #define SIMDE_X86_FMA_NATIVE
  154. #endif
  155. #endif
  156. #if defined(SIMDE_X86_FMA_NATIVE) && !defined(SIMDE_X86_AVX_NATIVE)
  157. #define SIMDE_X86_AVX_NATIVE
  158. #endif
  159. #if !defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_X86_AVX2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  160. #if defined(SIMDE_ARCH_X86_AVX2)
  161. #define SIMDE_X86_AVX2_NATIVE
  162. #endif
  163. #endif
  164. #if defined(SIMDE_X86_AVX2_NATIVE) && !defined(SIMDE_X86_AVX_NATIVE)
  165. #define SIMDE_X86_AVX_NATIVE
  166. #endif
  167. #if !defined(SIMDE_X86_AVX_NATIVE) && !defined(SIMDE_X86_AVX_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  168. #if defined(SIMDE_ARCH_X86_AVX)
  169. #define SIMDE_X86_AVX_NATIVE
  170. #endif
  171. #endif
  172. #if defined(SIMDE_X86_AVX_NATIVE) && !defined(SIMDE_X86_SSE4_2_NATIVE)
  173. #define SIMDE_X86_SSE4_2_NATIVE
  174. #endif
  175. #if !defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_X86_XOP_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  176. #if defined(SIMDE_ARCH_X86_XOP)
  177. #define SIMDE_X86_XOP_NATIVE
  178. #endif
  179. #endif
  180. #if defined(SIMDE_X86_XOP_NATIVE) && !defined(SIMDE_X86_SSE4_2_NATIVE)
  181. #define SIMDE_X86_SSE4_2_NATIVE
  182. #endif
  183. #if !defined(SIMDE_X86_SSE4_2_NATIVE) && !defined(SIMDE_X86_SSE4_2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  184. #if defined(SIMDE_ARCH_X86_SSE4_2)
  185. #define SIMDE_X86_SSE4_2_NATIVE
  186. #endif
  187. #endif
  188. #if defined(SIMDE_X86_SSE4_2_NATIVE) && !defined(SIMDE_X86_SSE4_1_NATIVE)
  189. #define SIMDE_X86_SSE4_1_NATIVE
  190. #endif
  191. #if !defined(SIMDE_X86_SSE4_1_NATIVE) && !defined(SIMDE_X86_SSE4_1_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  192. #if defined(SIMDE_ARCH_X86_SSE4_1)
  193. #define SIMDE_X86_SSE4_1_NATIVE
  194. #endif
  195. #endif
  196. #if defined(SIMDE_X86_SSE4_1_NATIVE) && !defined(SIMDE_X86_SSSE3_NATIVE)
  197. #define SIMDE_X86_SSSE3_NATIVE
  198. #endif
  199. #if !defined(SIMDE_X86_SSSE3_NATIVE) && !defined(SIMDE_X86_SSSE3_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  200. #if defined(SIMDE_ARCH_X86_SSSE3)
  201. #define SIMDE_X86_SSSE3_NATIVE
  202. #endif
  203. #endif
  204. #if defined(SIMDE_X86_SSSE3_NATIVE) && !defined(SIMDE_X86_SSE3_NATIVE)
  205. #define SIMDE_X86_SSE3_NATIVE
  206. #endif
  207. #if !defined(SIMDE_X86_SSE3_NATIVE) && !defined(SIMDE_X86_SSE3_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  208. #if defined(SIMDE_ARCH_X86_SSE3)
  209. #define SIMDE_X86_SSE3_NATIVE
  210. #endif
  211. #endif
  212. #if defined(SIMDE_X86_SSE3_NATIVE) && !defined(SIMDE_X86_SSE2_NATIVE)
  213. #define SIMDE_X86_SSE2_NATIVE
  214. #endif
  215. #if !defined(SIMDE_X86_AES_NATIVE) && !defined(SIMDE_X86_AES_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  216. #if defined(SIMDE_ARCH_X86_AES)
  217. #define SIMDE_X86_AES_NATIVE
  218. #endif
  219. #endif
  220. #if defined(SIMDE_X86_AES_NATIVE) && !defined(SIMDE_X86_SSE2_NATIVE)
  221. #define SIMDE_X86_SSE2_NATIVE
  222. #endif
  223. #if !defined(SIMDE_X86_SSE2_NATIVE) && !defined(SIMDE_X86_SSE2_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  224. #if defined(SIMDE_ARCH_X86_SSE2)
  225. #define SIMDE_X86_SSE2_NATIVE
  226. #endif
  227. #endif
  228. #if defined(SIMDE_X86_SSE2_NATIVE) && !defined(SIMDE_X86_SSE_NATIVE)
  229. #define SIMDE_X86_SSE_NATIVE
  230. #endif
  231. #if !defined(SIMDE_X86_SSE_NATIVE) && !defined(SIMDE_X86_SSE_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  232. #if defined(SIMDE_ARCH_X86_SSE)
  233. #define SIMDE_X86_SSE_NATIVE
  234. #endif
  235. #endif
  236. #if !defined(SIMDE_X86_MMX_NATIVE) && !defined(SIMDE_X86_MMX_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  237. #if defined(SIMDE_ARCH_X86_MMX)
  238. #define SIMDE_X86_MMX_NATIVE
  239. #endif
  240. #endif
  241. #if !defined(SIMDE_X86_GFNI_NATIVE) && !defined(SIMDE_X86_GFNI_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  242. #if defined(SIMDE_ARCH_X86_GFNI)
  243. #define SIMDE_X86_GFNI_NATIVE
  244. #endif
  245. #endif
  246. #if !defined(SIMDE_X86_PCLMUL_NATIVE) && !defined(SIMDE_X86_PCLMUL_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  247. #if defined(SIMDE_ARCH_X86_PCLMUL)
  248. #define SIMDE_X86_PCLMUL_NATIVE
  249. #endif
  250. #endif
  251. #if !defined(SIMDE_X86_VPCLMULQDQ_NATIVE) && !defined(SIMDE_X86_VPCLMULQDQ_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  252. #if defined(SIMDE_ARCH_X86_VPCLMULQDQ)
  253. #define SIMDE_X86_VPCLMULQDQ_NATIVE
  254. #endif
  255. #endif
  256. #if !defined(SIMDE_X86_F16C_NATIVE) && !defined(SIMDE_X86_F16C_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  257. #if defined(SIMDE_ARCH_X86_F16C)
  258. #define SIMDE_X86_F16C_NATIVE
  259. #endif
  260. #endif
  261. #if !defined(SIMDE_X86_SVML_NATIVE) && !defined(SIMDE_X86_SVML_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  262. #if defined(SIMDE_ARCH_X86) && (defined(__INTEL_COMPILER) || (HEDLEY_MSVC_VERSION_CHECK(14, 20, 0) && !defined(__clang__)))
  263. #define SIMDE_X86_SVML_NATIVE
  264. #endif
  265. #endif
  266. #if defined(HEDLEY_MSVC_VERSION)
  267. #pragma warning(push)
  268. #pragma warning(disable:4799)
  269. #endif
  270. #if \
  271. defined(SIMDE_X86_AVX_NATIVE) || defined(SIMDE_X86_GFNI_NATIVE) || defined(SIMDE_X86_SVML_NATIVE)
  272. #include <immintrin.h>
  273. #elif defined(SIMDE_X86_SSE4_2_NATIVE)
  274. #include <nmmintrin.h>
  275. #elif defined(SIMDE_X86_SSE4_1_NATIVE)
  276. #include <smmintrin.h>
  277. #elif defined(SIMDE_X86_SSSE3_NATIVE)
  278. #include <tmmintrin.h>
  279. #elif defined(SIMDE_X86_SSE3_NATIVE)
  280. #include <pmmintrin.h>
  281. #elif defined(SIMDE_X86_SSE2_NATIVE)
  282. #include <emmintrin.h>
  283. #elif defined(SIMDE_X86_SSE_NATIVE)
  284. #include <xmmintrin.h>
  285. #elif defined(SIMDE_X86_MMX_NATIVE)
  286. #include <mmintrin.h>
  287. #endif
  288. #if defined(SIMDE_X86_XOP_NATIVE)
  289. #if defined(_MSC_VER)
  290. #include <intrin.h>
  291. #else
  292. #include <x86intrin.h>
  293. #endif
  294. #endif
  295. #if defined(SIMDE_X86_AES_NATIVE)
  296. #include <wmmintrin.h>
  297. #endif
  298. #if defined(HEDLEY_MSVC_VERSION)
  299. #pragma warning(pop)
  300. #endif
  301. #if !defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_ARM_NEON_A64V8_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  302. #if defined(SIMDE_ARCH_ARM_NEON) && defined(SIMDE_ARCH_AARCH64) && SIMDE_ARCH_ARM_CHECK(8,0)
  303. #define SIMDE_ARM_NEON_A64V8_NATIVE
  304. #endif
  305. #endif
  306. #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_ARM_NEON_A32V8_NATIVE)
  307. #define SIMDE_ARM_NEON_A32V8_NATIVE
  308. #endif
  309. #if !defined(SIMDE_ARM_NEON_A32V8_NATIVE) && !defined(SIMDE_ARM_NEON_A32V8_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  310. #if defined(SIMDE_ARCH_ARM_NEON) && SIMDE_ARCH_ARM_CHECK(8,0) && (__ARM_NEON_FP & 0x02)
  311. #define SIMDE_ARM_NEON_A32V8_NATIVE
  312. #endif
  313. #endif
  314. #if defined(__ARM_ACLE)
  315. #include <arm_acle.h>
  316. #endif
  317. #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && !defined(SIMDE_ARM_NEON_A32V7_NATIVE)
  318. #define SIMDE_ARM_NEON_A32V7_NATIVE
  319. #endif
  320. #if !defined(SIMDE_ARM_NEON_A32V7_NATIVE) && !defined(SIMDE_ARM_NEON_A32V7_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  321. #if defined(SIMDE_ARCH_ARM_NEON) && SIMDE_ARCH_ARM_CHECK(7,0)
  322. #define SIMDE_ARM_NEON_A32V7_NATIVE
  323. #endif
  324. #endif
  325. #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
  326. #include <arm_neon.h>
  327. #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
  328. #include <arm_fp16.h>
  329. #endif
  330. #endif
  331. #if !defined(SIMDE_ARM_SVE_NATIVE) && !defined(SIMDE_ARM_SVE_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  332. #if defined(SIMDE_ARCH_ARM_SVE)
  333. #define SIMDE_ARM_SVE_NATIVE
  334. #include <arm_sve.h>
  335. #endif
  336. #endif
  337. #if !defined(SIMDE_RISCV_V_NATIVE) && !defined(SIMDE_RISCV_V_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  338. #if defined(SIMDE_ARCH_RISCV_V)
  339. #define SIMDE_RISCV_V_NATIVE
  340. #endif
  341. #endif
  342. #if defined(SIMDE_RISCV_V_NATIVE)
  343. #include <riscv_vector.h>
  344. #endif
  345. #if !defined(SIMDE_WASM_SIMD128_NATIVE) && !defined(SIMDE_WASM_SIMD128_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  346. #if defined(SIMDE_ARCH_WASM_SIMD128)
  347. #define SIMDE_WASM_SIMD128_NATIVE
  348. #endif
  349. #endif
  350. #if !defined(SIMDE_WASM_RELAXED_SIMD_NATIVE) && !defined(SIMDE_WASM_RELAXED_SIMD_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  351. #if defined(SIMDE_ARCH_WASM_RELAXED_SIMD)
  352. #define SIMDE_WASM_RELAXED_SIMD_NATIVE
  353. #endif
  354. #endif
  355. #if defined(SIMDE_WASM_SIMD128_NATIVE) || defined(SIMDE_WASM_RELAXED_SIMD_NATIVE)
  356. #include <wasm_simd128.h>
  357. #endif
  358. #if !defined(SIMDE_POWER_ALTIVEC_P9_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P9_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  359. #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(900)
  360. #define SIMDE_POWER_ALTIVEC_P9_NATIVE
  361. #endif
  362. #endif
  363. #if defined(SIMDE_POWER_ALTIVEC_P9_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P8)
  364. #define SIMDE_POWER_ALTIVEC_P8_NATIVE
  365. #endif
  366. #if !defined(SIMDE_POWER_ALTIVEC_P8_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P8_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  367. #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(800)
  368. #define SIMDE_POWER_ALTIVEC_P8_NATIVE
  369. #endif
  370. #endif
  371. #if defined(SIMDE_POWER_ALTIVEC_P8_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P7)
  372. #define SIMDE_POWER_ALTIVEC_P7_NATIVE
  373. #endif
  374. #if !defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P7_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  375. #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(700)
  376. #define SIMDE_POWER_ALTIVEC_P7_NATIVE
  377. #endif
  378. #endif
  379. #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6)
  380. #define SIMDE_POWER_ALTIVEC_P6_NATIVE
  381. #endif
  382. #if !defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  383. #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(600)
  384. #define SIMDE_POWER_ALTIVEC_P6_NATIVE
  385. #endif
  386. #endif
  387. #if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P5)
  388. #define SIMDE_POWER_ALTIVEC_P5_NATIVE
  389. #endif
  390. #if !defined(SIMDE_POWER_ALTIVEC_P5_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P5_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  391. #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(500)
  392. #define SIMDE_POWER_ALTIVEC_P5_NATIVE
  393. #endif
  394. #endif
  395. #if !defined(SIMDE_ZARCH_ZVECTOR_15_NATIVE) && !defined(SIMDE_ZARCH_ZVECTOR_15_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  396. #if SIMDE_ARCH_ZARCH_CHECK(13) && defined(SIMDE_ARCH_ZARCH_ZVECTOR)
  397. #define SIMDE_ZARCH_ZVECTOR_15_NATIVE
  398. #endif
  399. #endif
  400. #if !defined(SIMDE_ZARCH_ZVECTOR_14_NATIVE) && !defined(SIMDE_ZARCH_ZVECTOR_14_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  401. #if SIMDE_ARCH_ZARCH_CHECK(12) && defined(SIMDE_ARCH_ZARCH_ZVECTOR)
  402. #define SIMDE_ZARCH_ZVECTOR_14_NATIVE
  403. #endif
  404. #endif
  405. #if !defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) && !defined(SIMDE_ZARCH_ZVECTOR_13_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  406. #if SIMDE_ARCH_ZARCH_CHECK(11) && defined(SIMDE_ARCH_ZARCH_ZVECTOR)
  407. #define SIMDE_ZARCH_ZVECTOR_13_NATIVE
  408. #endif
  409. #endif
  410. #if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) || defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
  411. /* AltiVec conflicts with lots of stuff. The bool keyword conflicts
  412. * with the bool keyword in C++ and the bool macro in C99+ (defined
  413. * in stdbool.h). The vector keyword conflicts with std::vector in
  414. * C++ if you are `using std;`.
  415. *
  416. * Luckily AltiVec allows you to use `__vector`/`__bool`/`__pixel`
  417. * instead, but altivec.h will unconditionally define
  418. * `vector`/`bool`/`pixel` so we need to work around that.
  419. *
  420. * Unfortunately this means that if your code uses AltiVec directly
  421. * it may break. If this is the case you'll want to define
  422. * `SIMDE_POWER_ALTIVEC_NO_UNDEF` before including SIMDe. Or, even
  423. * better, port your code to use the double-underscore versions. */
  424. #if defined(bool)
  425. #undef bool
  426. #endif
  427. #if defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
  428. #include <altivec.h>
  429. #if !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
  430. #if defined(vector)
  431. #undef vector
  432. #endif
  433. #if defined(pixel)
  434. #undef pixel
  435. #endif
  436. #if defined(bool)
  437. #undef bool
  438. #endif
  439. #endif /* !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF) */
  440. #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE)
  441. #include <vecintrin.h>
  442. #endif
  443. /* Use these intsead of vector/pixel/bool in SIMDe. */
  444. #define SIMDE_POWER_ALTIVEC_VECTOR(T) __vector T
  445. #define SIMDE_POWER_ALTIVEC_PIXEL __pixel
  446. #define SIMDE_POWER_ALTIVEC_BOOL __bool
  447. /* Re-define bool if we're using stdbool.h */
  448. #if !defined(__cplusplus) && defined(__bool_true_false_are_defined) && !defined(SIMDE_POWER_ALTIVEC_NO_UNDEF)
  449. #define bool _Bool
  450. #endif
  451. #endif
  452. #if !defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE) && !defined(SIMDE_MIPS_LOONGSON_MMI_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  453. #if defined(SIMDE_ARCH_MIPS_LOONGSON_MMI)
  454. #define SIMDE_MIPS_LOONGSON_MMI_NATIVE 1
  455. #endif
  456. #endif
  457. #if defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
  458. #include <loongson-mmiintrin.h>
  459. #endif
  460. #if !defined(SIMDE_MIPS_MSA_NATIVE) && !defined(SIMDE_MIPS_MSA_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  461. #if defined(SIMDE_ARCH_MIPS_MSA)
  462. #define SIMDE_MIPS_MSA_NATIVE 1
  463. #endif
  464. #endif
  465. #if defined(SIMDE_MIPS_MSA_NATIVE)
  466. #include <msa.h>
  467. #endif
  468. /* This is used to determine whether or not to fall back on a vector
  469. * function in an earlier ISA extensions, as well as whether
  470. * we expected any attempts at vectorization to be fruitful or if we
  471. * expect to always be running serial code.
  472. *
  473. * Note that, for some architectures (okay, *one* architecture) there
  474. * can be a split where some types are supported for one vector length
  475. * but others only for a shorter length. Therefore, it is possible to
  476. * provide separate values for float/int/double types. */
  477. #if !defined(SIMDE_NATURAL_VECTOR_SIZE)
  478. #if defined(SIMDE_X86_AVX512F_NATIVE)
  479. #define SIMDE_NATURAL_VECTOR_SIZE (512)
  480. #elif defined(SIMDE_X86_AVX2_NATIVE)
  481. #define SIMDE_NATURAL_VECTOR_SIZE (256)
  482. #elif defined(SIMDE_X86_AVX_NATIVE)
  483. #define SIMDE_NATURAL_FLOAT_VECTOR_SIZE (256)
  484. #define SIMDE_NATURAL_INT_VECTOR_SIZE (128)
  485. #define SIMDE_NATURAL_DOUBLE_VECTOR_SIZE (128)
  486. #elif \
  487. defined(SIMDE_X86_SSE2_NATIVE) || \
  488. defined(SIMDE_ARM_NEON_A32V7_NATIVE) || \
  489. defined(SIMDE_WASM_SIMD128_NATIVE) || \
  490. defined(SIMDE_POWER_ALTIVEC_P5_NATIVE) || \
  491. defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) || \
  492. defined(SIMDE_MIPS_MSA_NATIVE)
  493. #define SIMDE_NATURAL_VECTOR_SIZE (128)
  494. #elif defined(SIMDE_X86_SSE_NATIVE)
  495. #define SIMDE_NATURAL_FLOAT_VECTOR_SIZE (128)
  496. #define SIMDE_NATURAL_INT_VECTOR_SIZE (64)
  497. #define SIMDE_NATURAL_DOUBLE_VECTOR_SIZE (0)
  498. #elif defined(SIMDE_RISCV_V_NATIVE) && defined(__riscv_v_fixed_vlen)
  499. //FIXME : SIMDE_NATURAL_VECTOR_SIZE == __riscv_v_fixed_vlen
  500. #define SIMDE_NATURAL_VECTOR_SIZE (128)
  501. #endif
  502. #if !defined(SIMDE_NATURAL_VECTOR_SIZE)
  503. #if defined(SIMDE_NATURAL_FLOAT_VECTOR_SIZE)
  504. #define SIMDE_NATURAL_VECTOR_SIZE SIMDE_NATURAL_FLOAT_VECTOR_SIZE
  505. #elif defined(SIMDE_NATURAL_INT_VECTOR_SIZE)
  506. #define SIMDE_NATURAL_VECTOR_SIZE SIMDE_NATURAL_INT_VECTOR_SIZE
  507. #elif defined(SIMDE_NATURAL_DOUBLE_VECTOR_SIZE)
  508. #define SIMDE_NATURAL_VECTOR_SIZE SIMDE_NATURAL_DOUBLE_VECTOR_SIZE
  509. #else
  510. #define SIMDE_NATURAL_VECTOR_SIZE (0)
  511. #endif
  512. #endif
  513. #if !defined(SIMDE_NATURAL_FLOAT_VECTOR_SIZE)
  514. #define SIMDE_NATURAL_FLOAT_VECTOR_SIZE SIMDE_NATURAL_VECTOR_SIZE
  515. #endif
  516. #if !defined(SIMDE_NATURAL_INT_VECTOR_SIZE)
  517. #define SIMDE_NATURAL_INT_VECTOR_SIZE SIMDE_NATURAL_VECTOR_SIZE
  518. #endif
  519. #if !defined(SIMDE_NATURAL_DOUBLE_VECTOR_SIZE)
  520. #define SIMDE_NATURAL_DOUBLE_VECTOR_SIZE SIMDE_NATURAL_VECTOR_SIZE
  521. #endif
  522. #endif
  523. #define SIMDE_NATURAL_VECTOR_SIZE_LE(x) ((SIMDE_NATURAL_VECTOR_SIZE > 0) && (SIMDE_NATURAL_VECTOR_SIZE <= (x)))
  524. #define SIMDE_NATURAL_VECTOR_SIZE_GE(x) ((SIMDE_NATURAL_VECTOR_SIZE > 0) && (SIMDE_NATURAL_VECTOR_SIZE >= (x)))
  525. #define SIMDE_NATURAL_FLOAT_VECTOR_SIZE_LE(x) ((SIMDE_NATURAL_FLOAT_VECTOR_SIZE > 0) && (SIMDE_NATURAL_FLOAT_VECTOR_SIZE <= (x)))
  526. #define SIMDE_NATURAL_FLOAT_VECTOR_SIZE_GE(x) ((SIMDE_NATURAL_FLOAT_VECTOR_SIZE > 0) && (SIMDE_NATURAL_FLOAT_VECTOR_SIZE >= (x)))
  527. #define SIMDE_NATURAL_INT_VECTOR_SIZE_LE(x) ((SIMDE_NATURAL_INT_VECTOR_SIZE > 0) && (SIMDE_NATURAL_INT_VECTOR_SIZE <= (x)))
  528. #define SIMDE_NATURAL_INT_VECTOR_SIZE_GE(x) ((SIMDE_NATURAL_INT_VECTOR_SIZE > 0) && (SIMDE_NATURAL_INT_VECTOR_SIZE >= (x)))
  529. #define SIMDE_NATURAL_DOUBLE_VECTOR_SIZE_LE(x) ((SIMDE_NATURAL_DOUBLE_VECTOR_SIZE > 0) && (SIMDE_NATURAL_DOUBLE_VECTOR_SIZE <= (x)))
  530. #define SIMDE_NATURAL_DOUBLE_VECTOR_SIZE_GE(x) ((SIMDE_NATURAL_DOUBLE_VECTOR_SIZE > 0) && (SIMDE_NATURAL_DOUBLE_VECTOR_SIZE >= (x)))
  531. /* Native aliases */
  532. #if defined(SIMDE_ENABLE_NATIVE_ALIASES)
  533. #if !defined(SIMDE_X86_MMX_NATIVE)
  534. #define SIMDE_X86_MMX_ENABLE_NATIVE_ALIASES
  535. #endif
  536. #if !defined(SIMDE_X86_SSE_NATIVE)
  537. #define SIMDE_X86_SSE_ENABLE_NATIVE_ALIASES
  538. #endif
  539. #if !defined(SIMDE_X86_SSE2_NATIVE)
  540. #define SIMDE_X86_SSE2_ENABLE_NATIVE_ALIASES
  541. #endif
  542. #if !defined(SIMDE_X86_SSE3_NATIVE)
  543. #define SIMDE_X86_SSE3_ENABLE_NATIVE_ALIASES
  544. #endif
  545. #if !defined(SIMDE_X86_SSSE3_NATIVE)
  546. #define SIMDE_X86_SSSE3_ENABLE_NATIVE_ALIASES
  547. #endif
  548. #if !defined(SIMDE_X86_SSE4_1_NATIVE)
  549. #define SIMDE_X86_SSE4_1_ENABLE_NATIVE_ALIASES
  550. #endif
  551. #if !defined(SIMDE_X86_SSE4_2_NATIVE)
  552. #define SIMDE_X86_SSE4_2_ENABLE_NATIVE_ALIASES
  553. #endif
  554. #if !defined(SIMDE_X86_AVX_NATIVE)
  555. #define SIMDE_X86_AVX_ENABLE_NATIVE_ALIASES
  556. #endif
  557. #if !defined(SIMDE_X86_AVX2_NATIVE)
  558. #define SIMDE_X86_AVX2_ENABLE_NATIVE_ALIASES
  559. #endif
  560. #if !defined(SIMDE_X86_FMA_NATIVE)
  561. #define SIMDE_X86_FMA_ENABLE_NATIVE_ALIASES
  562. #endif
  563. #if !defined(SIMDE_X86_AVX512F_NATIVE)
  564. #define SIMDE_X86_AVX512F_ENABLE_NATIVE_ALIASES
  565. #endif
  566. #if !defined(SIMDE_X86_AVX512VL_NATIVE)
  567. #define SIMDE_X86_AVX512VL_ENABLE_NATIVE_ALIASES
  568. #endif
  569. #if !defined(SIMDE_X86_AVX512VBMI_NATIVE)
  570. #define SIMDE_X86_AVX512VBMI_ENABLE_NATIVE_ALIASES
  571. #endif
  572. #if !defined(SIMDE_X86_AVX512VBMI2_NATIVE)
  573. #define SIMDE_X86_AVX512VBMI2_ENABLE_NATIVE_ALIASES
  574. #endif
  575. #if !defined(SIMDE_X86_AVX512BW_NATIVE)
  576. #define SIMDE_X86_AVX512BW_ENABLE_NATIVE_ALIASES
  577. #endif
  578. #if !defined(SIMDE_X86_AVX512VNNI_NATIVE)
  579. #define SIMDE_X86_AVX512VNNI_ENABLE_NATIVE_ALIASES
  580. #endif
  581. #if !defined(SIMDE_X86_AVX5124VNNIW_NATIVE)
  582. #define SIMDE_X86_AVX5124VNNIW_ENABLE_NATIVE_ALIASES
  583. #endif
  584. #if !defined(SIMDE_X86_AVX512BF16_NATIVE)
  585. #define SIMDE_X86_AVX512BF16_ENABLE_NATIVE_ALIASES
  586. #endif
  587. #if !defined(SIMDE_X86_AVX512BITALG_NATIVE)
  588. #define SIMDE_X86_AVX512BITALG_ENABLE_NATIVE_ALIASES
  589. #endif
  590. #if !defined(SIMDE_X86_AVX512VPOPCNTDQ_NATIVE)
  591. #define SIMDE_X86_AVX512VPOPCNTDQ_ENABLE_NATIVE_ALIASES
  592. #endif
  593. #if !defined(SIMDE_X86_AVX512VP2INTERSECT_NATIVE)
  594. #define SIMDE_X86_AVX512VP2INTERSECT_ENABLE_NATIVE_ALIASES
  595. #endif
  596. #if !defined(SIMDE_X86_AVX512DQ_NATIVE)
  597. #define SIMDE_X86_AVX512DQ_ENABLE_NATIVE_ALIASES
  598. #endif
  599. #if !defined(SIMDE_X86_AVX512CD_NATIVE)
  600. #define SIMDE_X86_AVX512CD_ENABLE_NATIVE_ALIASES
  601. #endif
  602. #if !defined(SIMDE_X86_AVX512FP16_NATIVE)
  603. #define SIMDE_X86_AVX512FP16_ENABLE_NATIVE_ALIASES
  604. #endif
  605. #if !defined(SIMDE_X86_GFNI_NATIVE)
  606. #define SIMDE_X86_GFNI_ENABLE_NATIVE_ALIASES
  607. #endif
  608. #if !defined(SIMDE_X86_PCLMUL_NATIVE)
  609. #define SIMDE_X86_PCLMUL_ENABLE_NATIVE_ALIASES
  610. #endif
  611. #if !defined(SIMDE_X86_VPCLMULQDQ_NATIVE)
  612. #define SIMDE_X86_VPCLMULQDQ_ENABLE_NATIVE_ALIASES
  613. #endif
  614. #if !defined(SIMDE_X86_F16C_NATIVE)
  615. #define SIMDE_X86_F16C_ENABLE_NATIVE_ALIASES
  616. #endif
  617. #if !defined(SIMDE_X86_AES_NATIVE)
  618. #define SIMDE_X86_AES_ENABLE_NATIVE_ALIASES
  619. #endif
  620. #if !defined(SIMDE_X86_SVML_NATIVE)
  621. #define SIMDE_X86_SVML_ENABLE_NATIVE_ALIASES
  622. #endif
  623. #if !defined(SIMDE_ARM_NEON_A32V7_NATIVE)
  624. #define SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES
  625. #endif
  626. #if !defined(SIMDE_ARM_NEON_A32V8_NATIVE)
  627. #define SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES
  628. #endif
  629. #if !defined(SIMDE_ARM_NEON_A64V8_NATIVE)
  630. #define SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES
  631. #endif
  632. #if !defined(SIMDE_ARM_SVE_NATIVE)
  633. #define SIMDE_ARM_SVE_ENABLE_NATIVE_ALIASES
  634. #endif
  635. #if !defined(SIMDE_RISCV_V_NATIVE)
  636. #define SIMDE_RISCV_V_ENABLE_NATIVE_ALIASES
  637. #endif
  638. #if !defined(SIMDE_MIPS_MSA_NATIVE)
  639. #define SIMDE_MIPS_MSA_ENABLE_NATIVE_ALIASES
  640. #endif
  641. #if !defined(SIMDE_WASM_SIMD128_NATIVE)
  642. #define SIMDE_WASM_SIMD128_ENABLE_NATIVE_ALIASES
  643. #endif
  644. #endif
  645. /* Are floating point values stored using IEEE 754? Knowing
  646. * this at during preprocessing is a bit tricky, mostly because what
  647. * we're curious about is how values are stored and not whether the
  648. * implementation is fully conformant in terms of rounding, NaN
  649. * handling, etc.
  650. *
  651. * For example, if you use -ffast-math or -Ofast on
  652. * GCC or clang IEEE 754 isn't strictly followed, therefore IEE 754
  653. * support is not advertised (by defining __STDC_IEC_559__).
  654. *
  655. * However, what we care about is whether it is safe to assume that
  656. * floating point values are stored in IEEE 754 format, in which case
  657. * we can provide faster implementations of some functions.
  658. *
  659. * Luckily every vaugely modern architecture I'm aware of uses IEEE 754-
  660. * so we just assume IEEE 754 for now. There is a test which verifies
  661. * this, if that test fails sowewhere please let us know and we'll add
  662. * an exception for that platform. Meanwhile, you can define
  663. * SIMDE_NO_IEEE754_STORAGE. */
  664. #if !defined(SIMDE_IEEE754_STORAGE) && !defined(SIMDE_NO_IEE754_STORAGE)
  665. #define SIMDE_IEEE754_STORAGE
  666. #endif
  667. #if defined(SIMDE_ARCH_ARM_NEON_FP16)
  668. #define SIMDE_ARM_NEON_FP16
  669. #endif
  670. #if defined(SIMDE_ARCH_ARM_NEON_BF16)
  671. #define SIMDE_ARM_NEON_BF16
  672. #endif
  673. #if !defined(SIMDE_LOONGARCH_LASX_NATIVE) && !defined(SIMDE_LOONGARCH_LASX_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  674. #if defined(SIMDE_ARCH_LOONGARCH_LASX)
  675. #define SIMDE_LOONGARCH_LASX_NATIVE
  676. #endif
  677. #endif
  678. #if !defined(SIMDE_LOONGARCH_LSX_NATIVE) && !defined(SIMDE_LOONGARCH_LSX_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
  679. #if defined(SIMDE_ARCH_LOONGARCH_LSX)
  680. #define SIMDE_LOONGARCH_LSX_NATIVE
  681. #endif
  682. #endif
  683. #if defined(SIMDE_LOONGARCH_LASX_NATIVE)
  684. #include <lasxintrin.h>
  685. #endif
  686. #if defined(SIMDE_LOONGARCH_LSX_NATIVE)
  687. #include <lsxintrin.h>
  688. #endif
  689. #endif /* !defined(SIMDE_FEATURES_H) */