react-native-executorch 0.10.5 → 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 (251) hide show
  1. package/README.md +10 -1
  2. package/android/build.gradle.kts +4 -3
  3. package/ios/RnExecutorch.mm +15 -17
  4. package/lib/module/fetcher/fetcher.js +35 -122
  5. package/lib/module/fetcher/fetcher.js.map +1 -1
  6. package/lib/module/fetcher/telemetry.js +1 -1
  7. package/lib/module/index.js +12 -13
  8. package/lib/module/index.js.map +1 -1
  9. package/lib/module/models.js +4 -2
  10. package/lib/module/models.js.map +1 -1
  11. package/lib/typescript/src/fetcher/fetcher.d.ts +3 -7
  12. package/lib/typescript/src/fetcher/fetcher.d.ts.map +1 -1
  13. package/lib/typescript/src/models.d.ts.map +1 -1
  14. package/package.json +9 -7
  15. package/react-native-executorch.podspec +6 -2
  16. package/src/fetcher/fetcher.ts +38 -131
  17. package/src/fetcher/telemetry.ts +1 -1
  18. package/src/models.ts +6 -1
  19. package/third-party/common/phonemis/CMakeLists.txt +70 -14
  20. package/third-party/common/phonemis/README.md +183 -33
  21. package/third-party/common/phonemis/THIRD_PARTY_NOTICES.md +57 -0
  22. package/third-party/common/phonemis/knowledge/code_style.md +642 -0
  23. package/third-party/common/phonemis/licenses/Unicode-3.0.txt +39 -0
  24. package/third-party/common/phonemis/licenses/misaki-Apache-2.0.txt +201 -0
  25. package/third-party/common/phonemis/licenses/nlohmann-json-MIT.txt +21 -0
  26. package/third-party/common/phonemis/licenses/xsimd-BSD-3-Clause.txt +29 -0
  27. package/third-party/common/phonemis/src/phonemis/base/config.h +6 -0
  28. package/third-party/common/phonemis/src/phonemis/base/ipipeline.cpp +75 -0
  29. package/third-party/common/phonemis/src/phonemis/base/ipipeline.h +21 -0
  30. package/third-party/common/phonemis/src/phonemis/base/phonemizer/constants.h +2 -5
  31. package/third-party/common/phonemis/src/phonemis/base/phonemizer/lexicon_phonemizer.cpp +3 -4
  32. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.cpp +17 -8
  33. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.h +4 -0
  34. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.cpp +21 -6
  35. package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.h +13 -4
  36. package/third-party/common/phonemis/src/phonemis/base/pipeline.cpp +8 -0
  37. package/third-party/common/phonemis/src/phonemis/base/pipeline.h +19 -0
  38. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.cpp +37 -0
  39. package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.h +45 -0
  40. package/third-party/common/phonemis/src/phonemis/base/processor/common/constants.h +10 -0
  41. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.cpp +105 -0
  42. package/third-party/common/phonemis/src/phonemis/base/processor/common/context.h +49 -0
  43. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.cpp +173 -0
  44. package/third-party/common/phonemis/src/phonemis/base/processor/common/document.h +67 -0
  45. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.cpp +75 -0
  46. package/third-party/common/phonemis/src/phonemis/base/processor/common/text.h +60 -0
  47. package/third-party/common/phonemis/src/phonemis/base/processor/common/types.h +18 -0
  48. package/third-party/common/phonemis/src/phonemis/base/processor/config.h +53 -0
  49. package/third-party/common/phonemis/src/phonemis/base/processor/layer.h +9 -7
  50. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/constants.h +20 -0
  51. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.cpp +89 -0
  52. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.h +35 -0
  53. package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/types.h +16 -0
  54. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/kind.h +40 -0
  55. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/layer.h +382 -0
  56. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/notation.h +30 -0
  57. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.cpp +51 -0
  58. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.h +31 -0
  59. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern.h +30 -0
  60. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.cpp +17 -0
  61. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.h +31 -0
  62. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.cpp +811 -0
  63. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.h +285 -0
  64. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.cpp +64 -0
  65. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.h +23 -0
  66. package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/types.h +94 -0
  67. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sanitizer/layer.cpp +19 -0
  68. package/third-party/common/phonemis/src/phonemis/base/processor/{sanitizer_layer.h → layers/sanitizer/layer.h} +8 -8
  69. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.cpp +65 -0
  70. package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.h +29 -0
  71. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.cpp +170 -0
  72. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.h +40 -0
  73. package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/types.h +25 -0
  74. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.cpp +47 -0
  75. package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.h +19 -0
  76. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.cpp +60 -0
  77. package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.h +45 -0
  78. package/third-party/common/phonemis/src/phonemis/base/processor/processor.cpp +6 -7
  79. package/third-party/common/phonemis/src/phonemis/base/processor/processor.h +14 -10
  80. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.cpp +89 -52
  81. package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.h +16 -9
  82. package/third-party/common/phonemis/src/phonemis/base/tokenizer/tokenizer.cpp +13 -12
  83. package/third-party/common/phonemis/src/phonemis/lang/de/constants.h +183 -19
  84. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.cpp +355 -309
  85. package/third-party/common/phonemis/src/phonemis/lang/de/num2word.h +42 -17
  86. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.cpp +56 -0
  87. package/third-party/common/phonemis/src/phonemis/lang/de/patterns.h +15 -0
  88. package/third-party/common/phonemis/src/phonemis/lang/de/pipeline.h +3 -3
  89. package/third-party/common/phonemis/src/phonemis/lang/en/constants.h +181 -30
  90. package/third-party/common/phonemis/src/phonemis/lang/en/hmm_tagger.cpp +5 -7
  91. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.cpp +232 -135
  92. package/third-party/common/phonemis/src/phonemis/lang/en/num2word.h +41 -16
  93. package/third-party/common/phonemis/src/phonemis/lang/en/pipeline.h +3 -10
  94. package/third-party/common/phonemis/src/phonemis/lang/es/constants.h +182 -60
  95. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.cpp +247 -212
  96. package/third-party/common/phonemis/src/phonemis/lang/es/num2word.h +38 -18
  97. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.cpp +50 -0
  98. package/third-party/common/phonemis/src/phonemis/lang/es/patterns.h +15 -0
  99. package/third-party/common/phonemis/src/phonemis/lang/es/pipeline.h +3 -3
  100. package/third-party/common/phonemis/src/phonemis/lang/fr/constants.h +152 -26
  101. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.cpp +252 -179
  102. package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.h +38 -15
  103. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.cpp +83 -0
  104. package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.h +15 -0
  105. package/third-party/common/phonemis/src/phonemis/lang/fr/pipeline.h +3 -3
  106. package/third-party/common/phonemis/src/phonemis/lang/hi/constants.h +62 -10
  107. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.cpp +74 -123
  108. package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.h +27 -16
  109. package/third-party/common/phonemis/src/phonemis/lang/hi/pipeline.h +5 -3
  110. package/third-party/common/phonemis/src/phonemis/lang/it/constants.h +122 -42
  111. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.cpp +200 -207
  112. package/third-party/common/phonemis/src/phonemis/lang/it/num2word.h +30 -18
  113. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.cpp +25 -0
  114. package/third-party/common/phonemis/src/phonemis/lang/it/patterns.h +15 -0
  115. package/third-party/common/phonemis/src/phonemis/lang/it/pipeline.h +3 -3
  116. package/third-party/common/phonemis/src/phonemis/lang/pl/constants.h +346 -77
  117. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.cpp +631 -246
  118. package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.h +47 -15
  119. package/third-party/common/phonemis/src/phonemis/lang/pl/pipeline.h +6 -6
  120. package/third-party/common/phonemis/src/phonemis/lang/pt/constants.h +201 -0
  121. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.cpp +365 -0
  122. package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.h +53 -0
  123. package/third-party/common/phonemis/src/phonemis/lang/pt/pipeline.h +4 -2
  124. package/third-party/common/phonemis/src/phonemis/main.cpp +42 -11
  125. package/third-party/common/phonemis/src/phonemis/protophone/meta.h +24 -0
  126. package/third-party/common/phonemis/src/phonemis/protophone/numeric.h +26 -0
  127. package/third-party/common/phonemis/src/phonemis/protophone/protophone.cpp +525 -0
  128. package/third-party/common/phonemis/src/phonemis/protophone/protophone.h +80 -0
  129. package/third-party/common/phonemis/src/phonemis/protophone/tensor.h +76 -0
  130. package/third-party/common/phonemis/src/phonemis/protophone/tensor_utils.h +89 -0
  131. package/third-party/common/phonemis/src/phonemis/protophone/tensor_view.h +125 -0
  132. package/third-party/common/phonemis/src/phonemis/protophone/types.h +43 -0
  133. package/third-party/common/phonemis/src/phonemis/utils/strings.h +20 -14
  134. package/third-party/common/phonemis/src/phonemis/utils/unicode.h +15 -1
  135. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_arithmetic.hpp +267 -0
  136. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_bit.hpp +232 -0
  137. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_cast.hpp +43 -0
  138. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_complex.hpp +112 -0
  139. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_details.hpp +386 -0
  140. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_logical.hpp +240 -0
  141. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_math.hpp +2601 -0
  142. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_memory.hpp +1006 -0
  143. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_rounding.hpp +72 -0
  144. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_swizzle.hpp +260 -0
  145. package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_trigo.hpp +996 -0
  146. package/third-party/common/phonemis/src/third-party/xsimd/arch/utils/shifts.hpp +82 -0
  147. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx.hpp +2111 -0
  148. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2.hpp +1591 -0
  149. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2_128.hpp +170 -0
  150. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512bw.hpp +724 -0
  151. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512cd.hpp +28 -0
  152. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512dq.hpp +270 -0
  153. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512er.hpp +17 -0
  154. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512f.hpp +2919 -0
  155. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512ifma.hpp +17 -0
  156. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512pf.hpp +17 -0
  157. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi.hpp +76 -0
  158. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi2.hpp +130 -0
  159. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512bw.hpp +17 -0
  160. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512vbmi2.hpp +17 -0
  161. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx_128.hpp +164 -0
  162. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avxvnni.hpp +17 -0
  163. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common.hpp +26 -0
  164. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common_fwd.hpp +127 -0
  165. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_constants.hpp +393 -0
  166. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_emulated.hpp +787 -0
  167. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx.hpp +93 -0
  168. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx2.hpp +46 -0
  169. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_sse.hpp +97 -0
  170. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma4.hpp +92 -0
  171. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_i8mm_neon64.hpp +17 -0
  172. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_isa.hpp +148 -0
  173. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon.hpp +3580 -0
  174. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon64.hpp +1614 -0
  175. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_rvv.hpp +1515 -0
  176. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_scalar.hpp +1210 -0
  177. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse2.hpp +2333 -0
  178. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse3.hpp +66 -0
  179. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_1.hpp +510 -0
  180. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_2.hpp +44 -0
  181. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_ssse3.hpp +186 -0
  182. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sve.hpp +1186 -0
  183. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vsx.hpp +947 -0
  184. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vxe.hpp +787 -0
  185. package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_wasm.hpp +1819 -0
  186. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_arch.hpp +242 -0
  187. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_config.hpp +633 -0
  188. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features.hpp +50 -0
  189. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_arm.hpp +132 -0
  190. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_ppc.hpp +54 -0
  191. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_riscv.hpp +95 -0
  192. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_s390x.hpp +56 -0
  193. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_x86.hpp +1121 -0
  194. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpuid.hpp +144 -0
  195. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_getauxval.hpp +159 -0
  196. package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_macros.hpp +78 -0
  197. package/third-party/common/phonemis/src/third-party/xsimd/math/xsimd_rem_pio2.hpp +707 -0
  198. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_aligned_allocator.hpp +349 -0
  199. package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_alignment.hpp +102 -0
  200. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_all_registers.hpp +57 -0
  201. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_api.hpp +3106 -0
  202. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx2_register.hpp +57 -0
  203. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512bw_register.hpp +51 -0
  204. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512cd_register.hpp +51 -0
  205. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512dq_register.hpp +51 -0
  206. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512er_register.hpp +51 -0
  207. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512f_register.hpp +77 -0
  208. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512ifma_register.hpp +51 -0
  209. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512pf_register.hpp +51 -0
  210. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi2_register.hpp +51 -0
  211. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi_register.hpp +51 -0
  212. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +54 -0
  213. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512vbmi2_register.hpp +53 -0
  214. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx_register.hpp +79 -0
  215. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avxvnni_register.hpp +44 -0
  216. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch.hpp +1666 -0
  217. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_constant.hpp +572 -0
  218. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_fwd.hpp +41 -0
  219. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_common_arch.hpp +49 -0
  220. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_emulated_register.hpp +80 -0
  221. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx2_register.hpp +50 -0
  222. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx_register.hpp +50 -0
  223. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_sse_register.hpp +50 -0
  224. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma4_register.hpp +50 -0
  225. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_i8mm_neon64_register.hpp +55 -0
  226. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon64_register.hpp +55 -0
  227. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon_register.hpp +130 -0
  228. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_register.hpp +96 -0
  229. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_rvv_register.hpp +491 -0
  230. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse2_register.hpp +59 -0
  231. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse3_register.hpp +49 -0
  232. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_1_register.hpp +48 -0
  233. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_2_register.hpp +48 -0
  234. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_ssse3_register.hpp +48 -0
  235. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sve_register.hpp +216 -0
  236. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_traits.hpp +409 -0
  237. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_utils.hpp +462 -0
  238. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vsx_register.hpp +84 -0
  239. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vxe_register.hpp +86 -0
  240. package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_wasm_register.hpp +59 -0
  241. package/third-party/common/phonemis/src/third-party/xsimd/utils/bits.hpp +122 -0
  242. package/third-party/common/phonemis/src/third-party/xsimd/utils/xsimd_type_traits.hpp +145 -0
  243. package/third-party/common/phonemis/src/third-party/xsimd/xsimd.hpp +43 -0
  244. package/third-party/common/phonemis/src/phonemis/base/processor/constants.h +0 -11
  245. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/config.h +0 -16
  246. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.cpp +0 -271
  247. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.h +0 -45
  248. package/third-party/common/phonemis/src/phonemis/base/processor/num2word/types.h +0 -29
  249. package/third-party/common/phonemis/src/phonemis/base/processor/sanitizer_layer.cpp +0 -22
  250. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.cpp +0 -40
  251. package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.h +0 -22
@@ -0,0 +1,409 @@
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_TRAITS_HPP
13
+ #define XSIMD_TRAITS_HPP
14
+
15
+ #include <complex>
16
+ #include <cstdint>
17
+ #include <type_traits>
18
+
19
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
20
+ #include <xtl/xcomplex.hpp>
21
+ #endif
22
+
23
+ #include "../config/xsimd_config.hpp"
24
+ #include "./xsimd_batch_fwd.hpp"
25
+ #include "./xsimd_utils.hpp"
26
+
27
+ /**
28
+ * high level type traits
29
+ *
30
+ * @defgroup batch_traits Type traits
31
+ *
32
+ **/
33
+
34
+ namespace xsimd
35
+ {
36
+
37
+ /**************************************
38
+ * simd_traits and revert_simd_traits *
39
+ **************************************/
40
+
41
+ template <class T, class A = default_arch>
42
+ struct has_simd_register : types::has_simd_register<T, A>
43
+ {
44
+ };
45
+
46
+ template <class T, class A>
47
+ struct has_simd_register<std::complex<T>, A> : has_simd_register<T, A>
48
+ {
49
+ };
50
+
51
+ namespace detail
52
+ {
53
+ template <class T, bool>
54
+ struct simd_traits_impl;
55
+
56
+ template <class T>
57
+ struct simd_traits_impl<T, false>
58
+ {
59
+ using type = T;
60
+ using bool_type = bool;
61
+ static constexpr size_t size = 1;
62
+ };
63
+
64
+ #if XSIMD_CPP_VERSION < 201703L
65
+ template <class T>
66
+ constexpr size_t simd_traits_impl<T, false>::size;
67
+ #endif
68
+
69
+ template <class T>
70
+ struct simd_traits_impl<T, true>
71
+ {
72
+ using type = batch<T>;
73
+ using bool_type = typename type::batch_bool_type;
74
+ static constexpr size_t size = type::size;
75
+ };
76
+
77
+ #if XSIMD_CPP_VERSION < 201703L
78
+ template <class T>
79
+ constexpr size_t simd_traits_impl<T, true>::size;
80
+ #endif
81
+
82
+ template <class T, class A>
83
+ struct static_check_supported_config_emitter
84
+ {
85
+
86
+ static_assert(A::supported(),
87
+ "usage of batch type with unsupported architecture");
88
+ static_assert(!A::supported() || xsimd::has_simd_register<T, A>::value,
89
+ "usage of batch type with unsupported type");
90
+ };
91
+
92
+ template <class A>
93
+ struct static_check_supported_config_emitter<bool, A> : static_check_supported_config_emitter<xsimd::as_unsigned_integer_t<bool>, A>
94
+ {
95
+ };
96
+
97
+ template <class T, class A>
98
+ struct static_check_supported_config_emitter<std::complex<T>, A> : static_check_supported_config_emitter<T, A>
99
+ {
100
+ };
101
+
102
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
103
+ template <class T, class A, bool i3ec>
104
+ struct static_check_supported_config_emitter<xtl::xcomplex<T, T, i3ec>, A> : static_check_supported_config_emitter<T, A>
105
+ {
106
+ };
107
+ #endif
108
+
109
+ // consistency checker
110
+ template <class T, class A>
111
+ XSIMD_INLINE void static_check_supported_config()
112
+ {
113
+ (void)static_check_supported_config_emitter<T, A>();
114
+ }
115
+ }
116
+
117
+ template <class T>
118
+ struct simd_traits : detail::simd_traits_impl<T, xsimd::has_simd_register<T>::value>
119
+ {
120
+ };
121
+
122
+ template <class T>
123
+ struct simd_traits<std::complex<T>>
124
+ : detail::simd_traits_impl<std::complex<T>, xsimd::has_simd_register<T>::value>
125
+ {
126
+ };
127
+
128
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
129
+ template <class T, bool i3ec>
130
+ struct simd_traits<xtl::xcomplex<T, T, i3ec>>
131
+ : detail::simd_traits_impl<std::complex<T>, xsimd::has_simd_register<T>::value>
132
+ {
133
+ };
134
+ #endif
135
+
136
+ template <class T>
137
+ struct revert_simd_traits
138
+ {
139
+ using type = T;
140
+ static constexpr size_t size = simd_traits<type>::size;
141
+ };
142
+
143
+ #if XSIMD_CPP_VERSION < 201703L
144
+ template <class T>
145
+ constexpr size_t revert_simd_traits<T>::size;
146
+ #endif
147
+
148
+ template <class T>
149
+ struct revert_simd_traits<batch<T>>
150
+ {
151
+ using type = T;
152
+ static constexpr size_t size = batch<T>::size;
153
+ };
154
+
155
+ #if XSIMD_CPP_VERSION < 201703L
156
+ template <class T>
157
+ constexpr size_t revert_simd_traits<batch<T>>::size;
158
+ #endif
159
+
160
+ template <class T>
161
+ using simd_type = typename simd_traits<T>::type;
162
+
163
+ template <class T>
164
+ using simd_bool_type = typename simd_traits<T>::bool_type;
165
+
166
+ template <class T>
167
+ using revert_simd_type = typename revert_simd_traits<T>::type;
168
+
169
+ /********************
170
+ * simd_return_type *
171
+ ********************/
172
+
173
+ namespace detail
174
+ {
175
+ template <class T1, class T2>
176
+ struct simd_condition
177
+ {
178
+ static constexpr bool value = (std::is_same<T1, T2>::value && !std::is_same<T1, bool>::value) || (std::is_same<T1, bool>::value && !std::is_same<T2, bool>::value) || std::is_same<T1, float>::value || std::is_same<T1, double>::value || std::is_same<T1, int8_t>::value || std::is_same<T1, uint8_t>::value || std::is_same<T1, int16_t>::value || std::is_same<T1, uint16_t>::value || std::is_same<T1, int32_t>::value || std::is_same<T1, uint32_t>::value || std::is_same<T1, int64_t>::value || std::is_same<T1, uint64_t>::value || std::is_same<T1, char>::value || detail::is_complex<T1>::value;
179
+ };
180
+
181
+ template <class T1, class T2, class A>
182
+ struct simd_return_type_impl
183
+ : std::enable_if<simd_condition<T1, T2>::value, batch<T2, A>>
184
+ {
185
+ };
186
+
187
+ template <class T2, class A>
188
+ struct simd_return_type_impl<bool, T2, A>
189
+ : std::enable_if<simd_condition<bool, T2>::value, batch_bool<T2, A>>
190
+ {
191
+ };
192
+
193
+ template <class T2, class A>
194
+ struct simd_return_type_impl<bool, std::complex<T2>, A>
195
+ : std::enable_if<simd_condition<bool, T2>::value, batch_bool<T2, A>>
196
+ {
197
+ };
198
+
199
+ template <class T1, class T2, class A>
200
+ struct simd_return_type_impl<std::complex<T1>, T2, A>
201
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
202
+ {
203
+ };
204
+
205
+ template <class T1, class T2, class A>
206
+ struct simd_return_type_impl<std::complex<T1>, std::complex<T2>, A>
207
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
208
+ {
209
+ };
210
+
211
+ #ifdef XSIMD_ENABLE_XTL_COMPLEX
212
+ template <class T1, class T2, bool I3EC, class A>
213
+ struct simd_return_type_impl<xtl::xcomplex<T1, T1, I3EC>, T2, A>
214
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
215
+ {
216
+ };
217
+
218
+ template <class T1, class T2, bool I3EC, class A>
219
+ struct simd_return_type_impl<xtl::xcomplex<T1, T1, I3EC>, std::complex<T2>, A>
220
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
221
+ {
222
+ };
223
+
224
+ template <class T1, class T2, bool I3EC, class A>
225
+ struct simd_return_type_impl<xtl::xcomplex<T1, T1, I3EC>, xtl::xcomplex<T2, T2, I3EC>, A>
226
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
227
+ {
228
+ };
229
+
230
+ template <class T1, class T2, bool I3EC, class A>
231
+ struct simd_return_type_impl<std::complex<T1>, xtl::xcomplex<T2, T2, I3EC>, A>
232
+ : std::enable_if<simd_condition<T1, T2>::value, batch<std::complex<T2>, A>>
233
+ {
234
+ };
235
+ #endif
236
+ }
237
+
238
+ template <class T1, class T2, class A = default_arch>
239
+ using simd_return_type = typename detail::simd_return_type_impl<T1, T2, A>::type;
240
+
241
+ /**
242
+ * @ingroup batch_traits
243
+ *
244
+ * type traits that provide information about a batch or scalar type.
245
+ *
246
+ * @tparam T type to analyze.
247
+ */
248
+
249
+ template <class T>
250
+ struct batch_traits
251
+ {
252
+ using scalar_type = T; ///< T if scalar, or type of the scalar element for the batch T.
253
+ using mask_type = bool; ///< Mask type for T: bool for scalars, or batch_bool for batch types.
254
+
255
+ static constexpr bool is_batch = false; ///< True if T is @c batch<...>.
256
+ static constexpr bool is_batch_bool = false; ///< True if T is @c batch_bool<...>.
257
+ static constexpr bool is_any_batch = false; ///< True if T is @c batch<...> or @c batch_bool<...>.
258
+ static constexpr bool is_complex = detail::is_complex<T>::value; ///< True if T is complex or a batch of complex values.
259
+ };
260
+
261
+ #if XSIMD_CPP_VERSION < 201703L
262
+ template <class T>
263
+ constexpr bool batch_traits<T>::is_batch;
264
+ template <class T>
265
+ constexpr bool batch_traits<T>::is_batch_bool;
266
+ template <class T>
267
+ constexpr bool batch_traits<T>::is_any_batch;
268
+ template <class T>
269
+ constexpr bool batch_traits<T>::is_complex;
270
+ #endif
271
+
272
+ template <class T, class A>
273
+ struct batch_traits<batch<T, A>>
274
+ {
275
+ using scalar_type = T;
276
+ using mask_type = typename batch<T, A>::batch_bool_type;
277
+
278
+ static constexpr bool is_batch = true;
279
+ static constexpr bool is_batch_bool = false;
280
+ static constexpr bool is_any_batch = true;
281
+ static constexpr bool is_complex = detail::is_complex<T>::value;
282
+ };
283
+
284
+ #if XSIMD_CPP_VERSION < 201703L
285
+ template <class T, class A>
286
+ constexpr bool batch_traits<batch<T, A>>::is_batch;
287
+ template <class T, class A>
288
+ constexpr bool batch_traits<batch<T, A>>::is_batch_bool;
289
+ template <class T, class A>
290
+ constexpr bool batch_traits<batch<T, A>>::is_any_batch;
291
+ template <class T, class A>
292
+ constexpr bool batch_traits<batch<T, A>>::is_complex;
293
+ #endif
294
+
295
+ template <class T, class A>
296
+ struct batch_traits<batch_bool<T, A>>
297
+ {
298
+ using scalar_type = bool;
299
+ using mask_type = batch_bool<T, A>;
300
+
301
+ static constexpr bool is_batch = false;
302
+ static constexpr bool is_batch_bool = true;
303
+ static constexpr bool is_any_batch = true;
304
+ static constexpr bool is_complex = false;
305
+ };
306
+
307
+ #if XSIMD_CPP_VERSION < 201703L
308
+ template <class T, class A>
309
+ constexpr bool batch_traits<batch_bool<T, A>>::is_batch;
310
+ template <class T, class A>
311
+ constexpr bool batch_traits<batch_bool<T, A>>::is_batch_bool;
312
+ template <class T, class A>
313
+ constexpr bool batch_traits<batch_bool<T, A>>::is_any_batch;
314
+ template <class T, class A>
315
+ constexpr bool batch_traits<batch_bool<T, A>>::is_complex;
316
+ #endif
317
+
318
+ /**
319
+ * @ingroup batch_traits
320
+ *
321
+ * type traits that inherits from @c std::true_type for @c batch<...> types and from
322
+ * @c std::false_type otherwise.
323
+ *
324
+ * @tparam T type to analyze.
325
+ */
326
+
327
+ template <class T>
328
+ struct is_batch : std::integral_constant<bool, batch_traits<T>::is_batch>
329
+ {
330
+ };
331
+
332
+ /**
333
+ * @ingroup batch_traits
334
+ *
335
+ * type traits that inherits from @c std::true_type for @c batch_bool<...> types and from
336
+ * @c std::false_type otherwise.
337
+ *
338
+ * @tparam T type to analyze.
339
+ */
340
+
341
+ template <class T>
342
+ struct is_batch_bool : std::integral_constant<bool, batch_traits<T>::is_batch_bool>
343
+ {
344
+ };
345
+
346
+ /**
347
+ * @ingroup batch_traits
348
+ *
349
+ * type traits that inherits from @c std::true_type for @c batch<...> or batch_bool<...>
350
+ * types and from @c std::false_type otherwise.
351
+ *
352
+ * @tparam T type to analyze.
353
+ */
354
+
355
+ template <class T>
356
+ struct is_any_batch : std::integral_constant<bool, batch_traits<T>::is_any_batch>
357
+ {
358
+ };
359
+
360
+ /**
361
+ * @ingroup batch_traits
362
+ *
363
+ * type traits that inherits from @c std::true_type for @c batch<std::complex<...>>
364
+ * types and from @c std::false_type otherwise.
365
+ *
366
+ * @tparam T type to analyze.
367
+ */
368
+
369
+ template <class T>
370
+ struct is_batch_complex : std::integral_constant<bool, batch_traits<T>::is_batch && batch_traits<T>::is_complex>
371
+ {
372
+ };
373
+
374
+ /**
375
+ * @ingroup batch_traits
376
+ *
377
+ * type traits whose @c type field is set to @c T::value_type if @c
378
+ * is_batch<T>::value and to @c T otherwise.
379
+ *
380
+ * @tparam T type to analyze.
381
+ */
382
+ template <class T>
383
+ struct scalar_type
384
+ {
385
+ using type = typename batch_traits<T>::scalar_type;
386
+ };
387
+
388
+ template <class T>
389
+ using scalar_type_t = typename scalar_type<T>::type;
390
+
391
+ /**
392
+ * @ingroup batch_traits
393
+ *
394
+ * type traits whose @c type field is set to @c T::value_type if @c
395
+ * is_batch_bool<T>::value and to @c bool otherwise.
396
+ *
397
+ * @tparam T type to analyze.
398
+ */
399
+ template <class T>
400
+ struct mask_type
401
+ {
402
+ using type = typename batch_traits<T>::mask_type;
403
+ };
404
+
405
+ template <class T>
406
+ using mask_type_t = typename mask_type<T>::type;
407
+ }
408
+
409
+ #endif