react-native-executorch 0.10.6 → 0.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/lib/module/fetcher/telemetry.js +1 -1
  2. package/package.json +1 -1
  3. package/react-native-executorch.podspec +2 -0
  4. package/src/fetcher/telemetry.ts +1 -1
  5. package/third-party/common/phonemis/CMakeLists.txt +70 -14
  6. package/third-party/common/phonemis/README.md +183 -33
  7. package/third-party/common/phonemis/THIRD_PARTY_NOTICES.md +57 -0
  8. package/third-party/common/phonemis/knowledge/code_style.md +642 -0
  9. package/third-party/common/phonemis/licenses/Unicode-3.0.txt +39 -0
  10. package/third-party/common/phonemis/licenses/misaki-Apache-2.0.txt +201 -0
  11. package/third-party/common/phonemis/licenses/nlohmann-json-MIT.txt +21 -0
  12. package/third-party/common/phonemis/licenses/xsimd-BSD-3-Clause.txt +29 -0
  13. package/third-party/common/phonemis/src/phonemis/base/config.h +6 -0
  14. package/third-party/common/phonemis/src/phonemis/base/ipipeline.cpp +75 -0
  15. package/third-party/common/phonemis/src/phonemis/base/ipipeline.h +21 -0
  16. package/third-party/common/phonemis/src/phonemis/base/phonemizer/constants.h +2 -5
  17. package/third-party/common/phonemis/src/phonemis/base/phonemizer/lexicon_phonemizer.cpp +3 -4
  18. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.cpp +17 -8
  19. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.h +4 -0
  20. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.cpp +21 -6
  21. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.h +13 -4
  22. package/third-party/common/phonemis/src/phonemis/base/pipeline.cpp +8 -0
  23. package/third-party/common/phonemis/src/phonemis/base/pipeline.h +19 -0
  24. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.cpp +37 -0
  25. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.h +45 -0
  26. package/third-party/common/phonemis/src/phonemis/base/processor/common/constants.h +10 -0
  27. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.cpp +105 -0
  28. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.h +49 -0
  29. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.cpp +173 -0
  30. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.h +67 -0
  31. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.cpp +75 -0
  32. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.h +60 -0
  33. package/third-party/common/phonemis/src/phonemis/base/processor/common/types.h +18 -0
  34. package/third-party/common/phonemis/src/phonemis/base/processor/config.h +53 -0
  35. package/third-party/common/phonemis/src/phonemis/base/processor/layer.h +9 -7
  36. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/constants.h +20 -0
  37. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.cpp +89 -0
  38. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.h +35 -0
  39. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/types.h +16 -0
  40. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/kind.h +40 -0
  41. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/layer.h +382 -0
  42. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/notation.h +30 -0
  43. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.cpp +51 -0
  44. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.h +31 -0
  45. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern.h +30 -0
  46. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.cpp +17 -0
  47. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.h +31 -0
  48. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.cpp +811 -0
  49. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.h +285 -0
  50. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.cpp +64 -0
  51. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.h +23 -0
  52. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/types.h +94 -0
  53. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sanitizer/layer.cpp +19 -0
  54. package/third-party/common/phonemis/src/phonemis/base/processor/{sanitizer_layer.h → layers/sanitizer/layer.h} +8 -8
  55. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.cpp +65 -0
  56. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.h +29 -0
  57. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.cpp +170 -0
  58. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.h +40 -0
  59. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/types.h +25 -0
  60. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.cpp +47 -0
  61. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.h +19 -0
  62. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.cpp +60 -0
  63. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.h +45 -0
  64. package/third-party/common/phonemis/src/phonemis/base/processor/processor.cpp +6 -7
  65. package/third-party/common/phonemis/src/phonemis/base/processor/processor.h +14 -10
  66. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.cpp +89 -52
  67. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.h +16 -9
  68. package/third-party/common/phonemis/src/phonemis/base/tokenizer/tokenizer.cpp +13 -12
  69. package/third-party/common/phonemis/src/phonemis/lang/de/constants.h +183 -19
  70. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.cpp +355 -309
  71. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.h +42 -17
  72. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.cpp +56 -0
  73. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.h +15 -0
  74. package/third-party/common/phonemis/src/phonemis/lang/de/pipeline.h +3 -3
  75. package/third-party/common/phonemis/src/phonemis/lang/en/constants.h +181 -30
  76. package/third-party/common/phonemis/src/phonemis/lang/en/hmm_tagger.cpp +5 -7
  77. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.cpp +232 -135
  78. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.h +41 -16
  79. package/third-party/common/phonemis/src/phonemis/lang/en/pipeline.h +3 -10
  80. package/third-party/common/phonemis/src/phonemis/lang/es/constants.h +182 -60
  81. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.cpp +247 -212
  82. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.h +38 -18
  83. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.cpp +50 -0
  84. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.h +15 -0
  85. package/third-party/common/phonemis/src/phonemis/lang/es/pipeline.h +3 -3
  86. package/third-party/common/phonemis/src/phonemis/lang/fr/constants.h +152 -26
  87. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.cpp +252 -179
  88. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.h +38 -15
  89. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.cpp +83 -0
  90. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.h +15 -0
  91. package/third-party/common/phonemis/src/phonemis/lang/fr/pipeline.h +3 -3
  92. package/third-party/common/phonemis/src/phonemis/lang/hi/constants.h +62 -10
  93. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.cpp +74 -123
  94. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.h +27 -16
  95. package/third-party/common/phonemis/src/phonemis/lang/hi/pipeline.h +5 -3
  96. package/third-party/common/phonemis/src/phonemis/lang/it/constants.h +122 -42
  97. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.cpp +200 -207
  98. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.h +30 -18
  99. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.cpp +25 -0
  100. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.h +15 -0
  101. package/third-party/common/phonemis/src/phonemis/lang/it/pipeline.h +3 -3
  102. package/third-party/common/phonemis/src/phonemis/lang/pl/constants.h +346 -77
  103. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.cpp +631 -246
  104. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.h +47 -15
  105. package/third-party/common/phonemis/src/phonemis/lang/pl/pipeline.h +6 -6
  106. package/third-party/common/phonemis/src/phonemis/lang/pt/constants.h +201 -0
  107. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.cpp +365 -0
  108. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.h +53 -0
  109. package/third-party/common/phonemis/src/phonemis/lang/pt/pipeline.h +4 -2
  110. package/third-party/common/phonemis/src/phonemis/main.cpp +42 -11
  111. package/third-party/common/phonemis/src/phonemis/protophone/meta.h +24 -0
  112. package/third-party/common/phonemis/src/phonemis/protophone/numeric.h +26 -0
  113. package/third-party/common/phonemis/src/phonemis/protophone/protophone.cpp +525 -0
  114. package/third-party/common/phonemis/src/phonemis/protophone/protophone.h +80 -0
  115. package/third-party/common/phonemis/src/phonemis/protophone/tensor.h +76 -0
  116. package/third-party/common/phonemis/src/phonemis/protophone/tensor_utils.h +89 -0
  117. package/third-party/common/phonemis/src/phonemis/protophone/tensor_view.h +125 -0
  118. package/third-party/common/phonemis/src/phonemis/protophone/types.h +43 -0
  119. package/third-party/common/phonemis/src/phonemis/utils/strings.h +20 -14
  120. package/third-party/common/phonemis/src/phonemis/utils/unicode.h +15 -1
  121. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_arithmetic.hpp +267 -0
  122. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_bit.hpp +232 -0
  123. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_cast.hpp +43 -0
  124. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_complex.hpp +112 -0
  125. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_details.hpp +386 -0
  126. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_logical.hpp +240 -0
  127. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_math.hpp +2601 -0
  128. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_memory.hpp +1006 -0
  129. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_rounding.hpp +72 -0
  130. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_swizzle.hpp +260 -0
  131. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_trigo.hpp +996 -0
  132. package/third-party/common/phonemis/src/third-party/xsimd/arch/utils/shifts.hpp +82 -0
  133. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx.hpp +2111 -0
  134. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2.hpp +1591 -0
  135. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2_128.hpp +170 -0
  136. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512bw.hpp +724 -0
  137. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512cd.hpp +28 -0
  138. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512dq.hpp +270 -0
  139. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512er.hpp +17 -0
  140. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512f.hpp +2919 -0
  141. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512ifma.hpp +17 -0
  142. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512pf.hpp +17 -0
  143. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi.hpp +76 -0
  144. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi2.hpp +130 -0
  145. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512bw.hpp +17 -0
  146. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512vbmi2.hpp +17 -0
  147. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx_128.hpp +164 -0
  148. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avxvnni.hpp +17 -0
  149. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common.hpp +26 -0
  150. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common_fwd.hpp +127 -0
  151. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_constants.hpp +393 -0
  152. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_emulated.hpp +787 -0
  153. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx.hpp +93 -0
  154. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx2.hpp +46 -0
  155. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_sse.hpp +97 -0
  156. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma4.hpp +92 -0
  157. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_i8mm_neon64.hpp +17 -0
  158. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_isa.hpp +148 -0
  159. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon.hpp +3580 -0
  160. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon64.hpp +1614 -0
  161. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_rvv.hpp +1515 -0
  162. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_scalar.hpp +1210 -0
  163. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse2.hpp +2333 -0
  164. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse3.hpp +66 -0
  165. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_1.hpp +510 -0
  166. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_2.hpp +44 -0
  167. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_ssse3.hpp +186 -0
  168. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sve.hpp +1186 -0
  169. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vsx.hpp +947 -0
  170. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vxe.hpp +787 -0
  171. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_wasm.hpp +1819 -0
  172. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_arch.hpp +242 -0
  173. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_config.hpp +633 -0
  174. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features.hpp +50 -0
  175. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_arm.hpp +132 -0
  176. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_ppc.hpp +54 -0
  177. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_riscv.hpp +95 -0
  178. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_s390x.hpp +56 -0
  179. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_x86.hpp +1121 -0
  180. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpuid.hpp +144 -0
  181. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_getauxval.hpp +159 -0
  182. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_macros.hpp +78 -0
  183. package/third-party/common/phonemis/src/third-party/xsimd/math/xsimd_rem_pio2.hpp +707 -0
  184. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_aligned_allocator.hpp +349 -0
  185. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_alignment.hpp +102 -0
  186. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_all_registers.hpp +57 -0
  187. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_api.hpp +3106 -0
  188. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx2_register.hpp +57 -0
  189. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512bw_register.hpp +51 -0
  190. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512cd_register.hpp +51 -0
  191. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512dq_register.hpp +51 -0
  192. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512er_register.hpp +51 -0
  193. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512f_register.hpp +77 -0
  194. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512ifma_register.hpp +51 -0
  195. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512pf_register.hpp +51 -0
  196. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi2_register.hpp +51 -0
  197. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi_register.hpp +51 -0
  198. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +54 -0
  199. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512vbmi2_register.hpp +53 -0
  200. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx_register.hpp +79 -0
  201. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avxvnni_register.hpp +44 -0
  202. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch.hpp +1666 -0
  203. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_constant.hpp +572 -0
  204. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_fwd.hpp +41 -0
  205. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_common_arch.hpp +49 -0
  206. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_emulated_register.hpp +80 -0
  207. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx2_register.hpp +50 -0
  208. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx_register.hpp +50 -0
  209. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_sse_register.hpp +50 -0
  210. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma4_register.hpp +50 -0
  211. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_i8mm_neon64_register.hpp +55 -0
  212. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon64_register.hpp +55 -0
  213. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon_register.hpp +130 -0
  214. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_register.hpp +96 -0
  215. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_rvv_register.hpp +491 -0
  216. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse2_register.hpp +59 -0
  217. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse3_register.hpp +49 -0
  218. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_1_register.hpp +48 -0
  219. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_2_register.hpp +48 -0
  220. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_ssse3_register.hpp +48 -0
  221. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sve_register.hpp +216 -0
  222. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_traits.hpp +409 -0
  223. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_utils.hpp +462 -0
  224. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vsx_register.hpp +84 -0
  225. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vxe_register.hpp +86 -0
  226. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_wasm_register.hpp +59 -0
  227. package/third-party/common/phonemis/src/third-party/xsimd/utils/bits.hpp +122 -0
  228. package/third-party/common/phonemis/src/third-party/xsimd/utils/xsimd_type_traits.hpp +145 -0
  229. package/third-party/common/phonemis/src/third-party/xsimd/xsimd.hpp +43 -0
  230. package/third-party/common/phonemis/src/phonemis/base/processor/constants.h +0 -11
  231. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/config.h +0 -16
  232. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.cpp +0 -271
  233. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.h +0 -45
  234. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/types.h +0 -29
  235. package/third-party/common/phonemis/src/phonemis/base/processor/sanitizer_layer.cpp +0 -22
  236. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.cpp +0 -40
  237. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.h +0 -22
@@ -0,0 +1,462 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3
+ * Martin Renou *
4
+ * Copyright (c) QuantStack *
5
+ * Copyright (c) Serge Guelton *
6
+ * *
7
+ * Distributed under the terms of the BSD 3-Clause License. *
8
+ * *
9
+ * The full license is in the file LICENSE, distributed with this software. *
10
+ ****************************************************************************/
11
+
12
+ #ifndef XSIMD_UTILS_HPP
13
+ #define XSIMD_UTILS_HPP
14
+
15
+ #include <array>
16
+ #include <complex>
17
+ #include <cstdint>
18
+ #include <cstring>
19
+ #include <type_traits>
20
+ #include <utility>
21
+
22
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
23
+ #include "xtl/xcomplex.hpp"
24
+ #endif
25
+
26
+ #include "./xsimd_batch_fwd.hpp"
27
+
28
+ namespace xsimd
29
+ {
30
+ /**************
31
+ * index *
32
+ **************/
33
+
34
+ template <size_t I>
35
+ using index = std::integral_constant<size_t, I>;
36
+
37
+ /**************
38
+ * as_integer *
39
+ **************/
40
+
41
+ template <class T>
42
+ struct as_integer : std::make_signed<T>
43
+ {
44
+ };
45
+
46
+ template <>
47
+ struct as_integer<float>
48
+ {
49
+ using type = int32_t;
50
+ };
51
+
52
+ template <>
53
+ struct as_integer<double>
54
+ {
55
+ using type = int64_t;
56
+ };
57
+
58
+ template <class T, class A>
59
+ struct as_integer<batch<T, A>>
60
+ {
61
+ using type = batch<typename as_integer<T>::type, A>;
62
+ };
63
+
64
+ template <class B>
65
+ using as_integer_t = typename as_integer<B>::type;
66
+
67
+ /***********************
68
+ * as_unsigned_integer *
69
+ ***********************/
70
+
71
+ template <class T>
72
+ struct as_unsigned_integer : std::make_unsigned<T>
73
+ {
74
+ };
75
+
76
+ template <>
77
+ struct as_unsigned_integer<bool>
78
+ {
79
+ using type = uint8_t;
80
+ };
81
+
82
+ template <>
83
+ struct as_unsigned_integer<float>
84
+ {
85
+ using type = uint32_t;
86
+ };
87
+
88
+ template <>
89
+ struct as_unsigned_integer<double>
90
+ {
91
+ using type = uint64_t;
92
+ };
93
+
94
+ template <class T, class A>
95
+ struct as_unsigned_integer<batch<T, A>>
96
+ {
97
+ using type = batch<typename as_unsigned_integer<T>::type, A>;
98
+ };
99
+
100
+ template <class T>
101
+ using as_unsigned_integer_t = typename as_unsigned_integer<T>::type;
102
+
103
+ /*********************
104
+ * as_signed_integer *
105
+ *********************/
106
+
107
+ template <class T>
108
+ struct as_signed_integer : std::make_signed<T>
109
+ {
110
+ };
111
+
112
+ template <class T>
113
+ using as_signed_integer_t = typename as_signed_integer<T>::type;
114
+
115
+ /******************
116
+ * flip_sign_type *
117
+ ******************/
118
+
119
+ namespace detail
120
+ {
121
+ template <class T, bool is_signed>
122
+ struct flipped_sign_type_impl : std::make_signed<T>
123
+ {
124
+ };
125
+
126
+ template <class T>
127
+ struct flipped_sign_type_impl<T, true> : std::make_unsigned<T>
128
+ {
129
+ };
130
+ }
131
+
132
+ template <class T>
133
+ struct flipped_sign_type
134
+ : detail::flipped_sign_type_impl<T, std::is_signed<T>::value>
135
+ {
136
+ };
137
+
138
+ template <class T>
139
+ using flipped_sign_type_t = typename flipped_sign_type<T>::type;
140
+
141
+ /***********
142
+ * as_float *
143
+ ************/
144
+
145
+ template <class T>
146
+ struct as_float;
147
+
148
+ template <>
149
+ struct as_float<int32_t>
150
+ {
151
+ using type = float;
152
+ };
153
+
154
+ template <>
155
+ struct as_float<int64_t>
156
+ {
157
+ using type = double;
158
+ };
159
+
160
+ template <class T, class A>
161
+ struct as_float<batch<T, A>>
162
+ {
163
+ using type = batch<typename as_float<T>::type, A>;
164
+ };
165
+
166
+ template <class T>
167
+ using as_float_t = typename as_float<T>::type;
168
+
169
+ /**************
170
+ * as_logical *
171
+ **************/
172
+
173
+ template <class T>
174
+ struct as_logical;
175
+
176
+ template <class T, class A>
177
+ struct as_logical<batch<T, A>>
178
+ {
179
+ using type = batch_bool<T, A>;
180
+ };
181
+
182
+ template <class T>
183
+ using as_logical_t = typename as_logical<T>::type;
184
+
185
+ /********************
186
+ * bit_cast *
187
+ ********************/
188
+
189
+ template <class To, class From>
190
+ inline To bit_cast(From val) noexcept
191
+ {
192
+ static_assert(sizeof(From) == sizeof(To), "casting between compatible layout");
193
+ // FIXME: Some old version of GCC don't support that trait
194
+ // static_assert(std::is_trivially_copyable<From>::value, "input type is trivially copyable");
195
+ // static_assert(std::is_trivially_copyable<To>::value, "output type is trivially copyable");
196
+ To res;
197
+ std::memcpy(&res, &val, sizeof(val));
198
+ return res;
199
+ }
200
+
201
+ namespace kernel
202
+ {
203
+ namespace detail
204
+ {
205
+ /**************************************
206
+ * enabling / disabling metafunctions *
207
+ **************************************/
208
+
209
+ template <class T>
210
+ using enable_arithmetic_t = std::enable_if_t<std::is_arithmetic<T>::value, int>;
211
+
212
+ /// Enable signed integral or floating point
213
+ template <class T>
214
+ using enable_signed_numeral_t = std::enable_if_t<std::is_signed<T>::value, int>;
215
+
216
+ template <class T>
217
+ using enable_floating_point_t = std::enable_if_t<std::is_floating_point<T>::value, int>;
218
+
219
+ template <class T>
220
+ using enable_integral_t = std::enable_if_t<std::is_integral<T>::value, int>;
221
+
222
+ template <class T>
223
+ using enable_signed_integral_t = std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value, int>;
224
+
225
+ template <class T>
226
+ using enable_unsigned_integral_t = std::enable_if_t<std::is_integral<T>::value && std::is_unsigned<T>::value, int>;
227
+
228
+ template <class T, size_t S>
229
+ using enable_sized_signed_t = std::enable_if_t<std::is_integral<T>::value && std::is_signed<T>::value && sizeof(T) == S, int>;
230
+
231
+ template <class T, size_t S>
232
+ using enable_sized_unsigned_t = std::enable_if_t<std::is_integral<T>::value && !std::is_signed<T>::value && sizeof(T) == S, int>;
233
+
234
+ template <class T, size_t S>
235
+ using enable_sized_integral_t = std::enable_if_t<std::is_integral<T>::value && sizeof(T) == S, int>;
236
+
237
+ template <class T, size_t S>
238
+ using enable_sized_t = std::enable_if_t<sizeof(T) == S, int>;
239
+
240
+ template <class T, size_t S>
241
+ using enable_max_sized_integral_t = std::enable_if_t<std::is_integral<T>::value && sizeof(T) <= S, int>;
242
+
243
+ /********************************
244
+ * Matching & mismatching sizes *
245
+ ********************************/
246
+
247
+ template <class T, class U, class B = int>
248
+ using sizes_match_t = std::enable_if_t<sizeof(T) == sizeof(U), B>;
249
+
250
+ template <class T, class U, class B = int>
251
+ using sizes_mismatch_t = std::enable_if_t<sizeof(T) != sizeof(U), B>;
252
+
253
+ template <class T, class U, class B = int>
254
+ using stride_match_t = std::enable_if_t<!std::is_same<T, U>::value && sizeof(T) == sizeof(U), B>;
255
+ } // namespace detail
256
+ } // namespace kernel
257
+
258
+ /*****************************************
259
+ * Backport of index_sequence from c++14 *
260
+ *****************************************/
261
+
262
+ // TODO: Remove this once we drop C++11 support
263
+ namespace detail
264
+ {
265
+ template <typename T>
266
+ struct identity
267
+ {
268
+ using type = T;
269
+ };
270
+
271
+ template <int... Is>
272
+ using int_sequence = std::integer_sequence<int, Is...>;
273
+
274
+ template <int N>
275
+ using make_int_sequence = std::make_integer_sequence<int, N>;
276
+
277
+ template <typename... Ts>
278
+ using int_sequence_for = make_int_sequence<(int)sizeof...(Ts)>;
279
+
280
+ // Type-casted index sequence.
281
+ template <class P, size_t... Is>
282
+ inline P indexes_from(std::index_sequence<Is...>) noexcept
283
+ {
284
+ return { static_cast<typename P::value_type>(Is)... };
285
+ }
286
+
287
+ template <class P>
288
+ inline P make_sequence_as_batch() noexcept
289
+ {
290
+ return indexes_from<P>(std::make_index_sequence<P::size>());
291
+ }
292
+ }
293
+
294
+ /*********************************
295
+ * Backport of void_t from C++17 *
296
+ *********************************/
297
+
298
+ namespace detail
299
+ {
300
+ template <class... T>
301
+ struct make_void
302
+ {
303
+ using type = void;
304
+ };
305
+
306
+ template <class... T>
307
+ using void_t = typename make_void<T...>::type;
308
+ }
309
+
310
+ /**************************************************
311
+ * Equivalent of void_t but with size_t parameter *
312
+ **************************************************/
313
+
314
+ namespace detail
315
+ {
316
+ template <std::size_t>
317
+ struct check_size
318
+ {
319
+ using type = void;
320
+ };
321
+
322
+ template <std::size_t S>
323
+ using check_size_t = typename check_size<S>::type;
324
+ }
325
+
326
+ /*****************************************
327
+ * Supplementary std::array constructors *
328
+ *****************************************/
329
+
330
+ namespace detail
331
+ {
332
+ // std::array constructor from scalar value ("broadcast")
333
+ template <typename T, std::size_t... Is>
334
+ inline constexpr std::array<T, sizeof...(Is)>
335
+ array_from_scalar_impl(const T& scalar, std::index_sequence<Is...>) noexcept
336
+ {
337
+ // You can safely ignore this silly ternary, the "scalar" is all
338
+ // that matters. The rest is just a dirty workaround...
339
+ return std::array<T, sizeof...(Is)> { (Is + 1) ? scalar : T()... };
340
+ }
341
+
342
+ template <typename T, std::size_t N>
343
+ inline constexpr std::array<T, N>
344
+ array_from_scalar(const T& scalar) noexcept
345
+ {
346
+ return array_from_scalar_impl(scalar, std::make_index_sequence<N>());
347
+ }
348
+
349
+ // std::array constructor from C-style pointer (handled as an array)
350
+ template <typename T, std::size_t... Is>
351
+ inline constexpr std::array<T, sizeof...(Is)>
352
+ array_from_pointer_impl(const T* c_array, std::index_sequence<Is...>) noexcept
353
+ {
354
+ return std::array<T, sizeof...(Is)> { c_array[Is]... };
355
+ }
356
+
357
+ template <typename T, std::size_t N>
358
+ inline constexpr std::array<T, N>
359
+ array_from_pointer(const T* c_array) noexcept
360
+ {
361
+ return array_from_pointer_impl(c_array, std::make_index_sequence<N>());
362
+ }
363
+ }
364
+
365
+ /************************
366
+ * is_array_initializer *
367
+ ************************/
368
+
369
+ namespace detail
370
+ {
371
+ template <bool...>
372
+ struct bool_pack;
373
+
374
+ template <bool... bs>
375
+ using all_true = std::is_same<
376
+ bool_pack<bs..., true>, bool_pack<true, bs...>>;
377
+
378
+ template <typename T, typename... Args>
379
+ using is_all_convertible = all_true<std::is_convertible<Args, T>::value...>;
380
+
381
+ template <typename T, std::size_t N, typename... Args>
382
+ using is_array_initializer = std::enable_if<
383
+ (sizeof...(Args) == N) && is_all_convertible<T, Args...>::value>;
384
+
385
+ // Check that a variadic argument pack is a list of N values of type T,
386
+ // as usable for instantiating a value of type std::array<T, N>.
387
+ template <typename T, std::size_t N, typename... Args>
388
+ using is_array_initializer_t = typename is_array_initializer<T, N, Args...>::type;
389
+ }
390
+
391
+ /**************
392
+ * is_complex *
393
+ **************/
394
+
395
+ // This is used in both xsimd_complex_base.hpp and xsimd_traits.hpp
396
+ // However xsimd_traits.hpp indirectly includes xsimd_complex_base.hpp
397
+ // so we cannot define is_complex in xsimd_traits.hpp. Besides, if
398
+ // no file defining batches is included, we still need this definition
399
+ // in xsimd_traits.hpp, so let's define it here.
400
+
401
+ namespace detail
402
+ {
403
+ template <class T>
404
+ struct is_complex : std::false_type
405
+ {
406
+ };
407
+
408
+ template <class T>
409
+ struct is_complex<std::complex<T>> : std::true_type
410
+ {
411
+ };
412
+
413
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
414
+ template <class T, bool i3ec>
415
+ struct is_complex<xtl::xcomplex<T, T, i3ec>> : std::true_type
416
+ {
417
+ };
418
+ #endif
419
+ }
420
+
421
+ /*******************
422
+ * real_batch_type *
423
+ *******************/
424
+
425
+ template <class B>
426
+ struct real_batch_type
427
+ {
428
+ using type = B;
429
+ };
430
+
431
+ template <class T, class A>
432
+ struct real_batch_type<batch<std::complex<T>, A>>
433
+ {
434
+ using type = batch<T, A>;
435
+ };
436
+
437
+ template <class B>
438
+ using real_batch_type_t = typename real_batch_type<B>::type;
439
+
440
+ /**********************
441
+ * complex_batch_type *
442
+ **********************/
443
+
444
+ template <class B>
445
+ struct complex_batch_type
446
+ {
447
+ using real_value_type = typename B::value_type;
448
+ using arch_type = typename B::arch_type;
449
+ using type = batch<std::complex<real_value_type>, arch_type>;
450
+ };
451
+
452
+ template <class T, class A>
453
+ struct complex_batch_type<batch<std::complex<T>, A>>
454
+ {
455
+ using type = batch<std::complex<T>, A>;
456
+ };
457
+
458
+ template <class B>
459
+ using complex_batch_type_t = typename complex_batch_type<B>::type;
460
+ }
461
+
462
+ #endif
@@ -0,0 +1,84 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3
+ * Martin Renou *
4
+ * Copyright (c) QuantStack *
5
+ * Copyright (c) Serge Guelton *
6
+ * *
7
+ * Distributed under the terms of the BSD 3-Clause License. *
8
+ * *
9
+ * The full license is in the file LICENSE, distributed with this software. *
10
+ ****************************************************************************/
11
+
12
+ #ifndef XSIMD_VSX_REGISTER_HPP
13
+ #define XSIMD_VSX_REGISTER_HPP
14
+
15
+ #include "./xsimd_common_arch.hpp"
16
+ #include "./xsimd_register.hpp"
17
+
18
+ #if XSIMD_WITH_VSX
19
+ #include <altivec.h>
20
+ #endif
21
+
22
+ namespace xsimd
23
+ {
24
+ /**
25
+ * @ingroup architectures
26
+ *
27
+ * VSX instructions
28
+ */
29
+ struct vsx : common
30
+ {
31
+ static constexpr bool supported() noexcept { return XSIMD_WITH_VSX; }
32
+ static constexpr bool available() noexcept { return true; }
33
+ static constexpr bool requires_alignment() noexcept { return true; }
34
+ static constexpr std::size_t alignment() noexcept { return 16; }
35
+ static constexpr char const* name() noexcept { return "vmx+vsx"; }
36
+ };
37
+
38
+ #if XSIMD_WITH_VSX
39
+ namespace types
40
+ {
41
+
42
+ #define XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(T, Tv, Tb) \
43
+ template <> \
44
+ struct get_bool_simd_register<T, vsx> \
45
+ { \
46
+ struct type \
47
+ { \
48
+ using register_type = __vector __bool Tb; \
49
+ register_type data; \
50
+ type() = default; \
51
+ type(register_type r) \
52
+ : data(r) \
53
+ { \
54
+ } \
55
+ operator register_type() const noexcept { return data; } \
56
+ }; \
57
+ }; \
58
+ XSIMD_DECLARE_SIMD_REGISTER(T, vsx, __vector Tv)
59
+
60
+ // The VSX vector intrinsics do not support long, unsigned long,
61
+ // and char data types. batches of these types are vectors of
62
+ // equivalent types.
63
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(signed char, signed char, char);
64
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(unsigned char, unsigned char, char);
65
+ #ifdef __CHAR_UNSIGNED__
66
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(char, unsigned char, char);
67
+ #else
68
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(char, signed char, char);
69
+ #endif
70
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(unsigned short, unsigned short, short);
71
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(short, short, short);
72
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(unsigned int, unsigned int, int);
73
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(int, int, int);
74
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(unsigned long, unsigned long long, long long);
75
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(long, long long, long long);
76
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(float, float, int);
77
+ XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER(double, double, long long);
78
+
79
+ #undef XSIMD_DECLARE_SIMD_BOOL_VSX_REGISTER
80
+ }
81
+ #endif
82
+ }
83
+
84
+ #endif
@@ -0,0 +1,86 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Andreas Krebbel *
3
+ * Based on xsimd_vsx_register.hpp *
4
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
5
+ * Martin Renou *
6
+ * Copyright (c) QuantStack *
7
+ * Copyright (c) Serge Guelton *
8
+ * *
9
+ * Distributed under the terms of the BSD 3-Clause License. *
10
+ * *
11
+ * The full license is in the file LICENSE, distributed with this software. *
12
+ ****************************************************************************/
13
+
14
+ #ifndef XSIMD_VXE_REGISTER_HPP
15
+ #define XSIMD_VXE_REGISTER_HPP
16
+
17
+ #include "./xsimd_common_arch.hpp"
18
+ #include "./xsimd_register.hpp"
19
+
20
+ #if XSIMD_WITH_VXE
21
+ #include <vecintrin.h>
22
+ #endif
23
+
24
+ namespace xsimd
25
+ {
26
+ /**
27
+ * @ingroup architectures
28
+ *
29
+ * VXE instructions
30
+ */
31
+ struct vxe : common
32
+ {
33
+ static constexpr bool supported() noexcept { return XSIMD_WITH_VXE; }
34
+ static constexpr bool available() noexcept { return true; }
35
+ static constexpr bool requires_alignment() noexcept { return true; }
36
+ static constexpr std::size_t alignment() noexcept { return 16; }
37
+ static constexpr char const* name() noexcept { return "vxe"; }
38
+ };
39
+
40
+ #if XSIMD_WITH_VXE
41
+ namespace types
42
+ {
43
+
44
+ #define XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(T, Tv, Tb) \
45
+ template <> \
46
+ struct get_bool_simd_register<T, vxe> \
47
+ { \
48
+ struct type \
49
+ { \
50
+ using register_type = __vector __bool Tb; \
51
+ register_type data; \
52
+ type() = default; \
53
+ type(register_type r) \
54
+ : data(r) \
55
+ { \
56
+ } \
57
+ operator register_type() const noexcept { return data; } \
58
+ }; \
59
+ }; \
60
+ XSIMD_DECLARE_SIMD_REGISTER(T, vxe, __vector Tv)
61
+
62
+ // The VXE vector intrinsics do not support long, unsigned long,
63
+ // and char data types. batches of these types are vectors of
64
+ // equivalent types.
65
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(signed char, signed char, char);
66
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(unsigned char, unsigned char, char);
67
+ #ifdef __CHAR_UNSIGNED__
68
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(char, unsigned char, char);
69
+ #else
70
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(char, signed char, char);
71
+ #endif
72
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(unsigned short, unsigned short, short);
73
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(short, short, short);
74
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(unsigned int, unsigned int, int);
75
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(int, int, int);
76
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(unsigned long, unsigned long long, long long);
77
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(long, long long, long long);
78
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(float, float, int);
79
+ XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER(double, double, long long);
80
+
81
+ #undef XSIMD_DECLARE_SIMD_BOOL_VXE_REGISTER
82
+ }
83
+ #endif
84
+ }
85
+
86
+ #endif
@@ -0,0 +1,59 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3
+ * Martin Renou *
4
+ * Copyright (c) QuantStack *
5
+ * Copyright (c) Serge Guelton *
6
+ * Copyright (c) Anutosh Bhat *
7
+ * *
8
+ * Distributed under the terms of the BSD 3-Clause License. *
9
+ * *
10
+ * The full license is in the file LICENSE, distributed with this software. *
11
+ ****************************************************************************/
12
+
13
+ #ifndef XSIMD_WASM_REGISTER_HPP
14
+ #define XSIMD_WASM_REGISTER_HPP
15
+
16
+ #include "xsimd_common_arch.hpp"
17
+ #include "xsimd_register.hpp"
18
+
19
+ #if XSIMD_WITH_WASM
20
+ #include <wasm_simd128.h>
21
+ #endif
22
+
23
+ namespace xsimd
24
+ {
25
+ /**
26
+ * @ingroup architectures
27
+ *
28
+ * WASM instructions
29
+ */
30
+ struct wasm : common
31
+ {
32
+ static constexpr bool supported() noexcept { return XSIMD_WITH_WASM; }
33
+ static constexpr bool available() noexcept { return true; }
34
+ static constexpr bool requires_alignment() noexcept { return true; }
35
+ static constexpr std::size_t alignment() noexcept { return 16; }
36
+ static constexpr char const* name() noexcept { return "wasm"; }
37
+ };
38
+
39
+ #if XSIMD_WITH_WASM
40
+ namespace types
41
+ {
42
+ XSIMD_DECLARE_SIMD_REGISTER(signed char, wasm, v128_t);
43
+ XSIMD_DECLARE_SIMD_REGISTER(unsigned char, wasm, v128_t);
44
+ XSIMD_DECLARE_SIMD_REGISTER(char, wasm, v128_t);
45
+ XSIMD_DECLARE_SIMD_REGISTER(unsigned short, wasm, v128_t);
46
+ XSIMD_DECLARE_SIMD_REGISTER(short, wasm, v128_t);
47
+ XSIMD_DECLARE_SIMD_REGISTER(unsigned int, wasm, v128_t);
48
+ XSIMD_DECLARE_SIMD_REGISTER(int, wasm, v128_t);
49
+ XSIMD_DECLARE_SIMD_REGISTER(unsigned long int, wasm, v128_t);
50
+ XSIMD_DECLARE_SIMD_REGISTER(long int, wasm, v128_t);
51
+ XSIMD_DECLARE_SIMD_REGISTER(unsigned long long int, wasm, v128_t);
52
+ XSIMD_DECLARE_SIMD_REGISTER(long long int, wasm, v128_t);
53
+ XSIMD_DECLARE_SIMD_REGISTER(float, wasm, v128_t);
54
+ XSIMD_DECLARE_SIMD_REGISTER(double, wasm, v128_t);
55
+ }
56
+ #endif
57
+ }
58
+
59
+ #endif