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.
- package/README.md +10 -1
- package/android/build.gradle.kts +4 -3
- package/ios/RnExecutorch.mm +15 -17
- package/lib/module/fetcher/fetcher.js +35 -122
- package/lib/module/fetcher/fetcher.js.map +1 -1
- package/lib/module/fetcher/telemetry.js +1 -1
- package/lib/module/index.js +12 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/models.js +4 -2
- package/lib/module/models.js.map +1 -1
- package/lib/typescript/src/fetcher/fetcher.d.ts +3 -7
- package/lib/typescript/src/fetcher/fetcher.d.ts.map +1 -1
- package/lib/typescript/src/models.d.ts.map +1 -1
- package/package.json +9 -7
- package/react-native-executorch.podspec +6 -2
- package/src/fetcher/fetcher.ts +38 -131
- package/src/fetcher/telemetry.ts +1 -1
- package/src/models.ts +6 -1
- package/third-party/common/phonemis/CMakeLists.txt +70 -14
- package/third-party/common/phonemis/README.md +183 -33
- package/third-party/common/phonemis/THIRD_PARTY_NOTICES.md +57 -0
- package/third-party/common/phonemis/knowledge/code_style.md +642 -0
- package/third-party/common/phonemis/licenses/Unicode-3.0.txt +39 -0
- package/third-party/common/phonemis/licenses/misaki-Apache-2.0.txt +201 -0
- package/third-party/common/phonemis/licenses/nlohmann-json-MIT.txt +21 -0
- package/third-party/common/phonemis/licenses/xsimd-BSD-3-Clause.txt +29 -0
- package/third-party/common/phonemis/src/phonemis/base/config.h +6 -0
- package/third-party/common/phonemis/src/phonemis/base/ipipeline.cpp +75 -0
- package/third-party/common/phonemis/src/phonemis/base/ipipeline.h +21 -0
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/constants.h +2 -5
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/lexicon_phonemizer.cpp +3 -4
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.cpp +17 -8
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/neural_phonemizer.h +4 -0
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.cpp +21 -6
- package/third-party/common/phonemis/src/phonemis/base/phonemizer/nn/tokenizer.h +13 -4
- package/third-party/common/phonemis/src/phonemis/base/pipeline.cpp +8 -0
- package/third-party/common/phonemis/src/phonemis/base/pipeline.h +19 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.cpp +37 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/conditions.h +45 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/constants.h +10 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/context.cpp +105 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/context.h +49 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/document.cpp +173 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/document.h +67 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/text.cpp +75 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/text.h +60 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/common/types.h +18 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/config.h +53 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layer.h +9 -7
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/constants.h +20 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.cpp +89 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/layer.h +35 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/normalize/types.h +16 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/kind.h +40 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/layer.h +382 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/notation.h +30 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.cpp +51 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/numerals.h +31 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern.h +30 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.cpp +17 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/pattern_set.h +31 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.cpp +811 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/patterns.h +285 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.cpp +64 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/primitives.h +23 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/num2word/types.h +94 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/sanitizer/layer.cpp +19 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/{sanitizer_layer.h → layers/sanitizer/layer.h} +8 -8
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.cpp +65 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/sym2word/layer.h +29 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.cpp +170 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/layer.h +40 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/term2word/types.h +25 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.cpp +47 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/layers/trim/layer.h +19 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.cpp +60 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/preprocessor.h +45 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/processor.cpp +6 -7
- package/third-party/common/phonemis/src/phonemis/base/processor/processor.h +14 -10
- package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.cpp +89 -52
- package/third-party/common/phonemis/src/phonemis/base/tagger/hmm_tagger.h +16 -9
- package/third-party/common/phonemis/src/phonemis/base/tokenizer/tokenizer.cpp +13 -12
- package/third-party/common/phonemis/src/phonemis/lang/de/constants.h +183 -19
- package/third-party/common/phonemis/src/phonemis/lang/de/num2word.cpp +355 -309
- package/third-party/common/phonemis/src/phonemis/lang/de/num2word.h +42 -17
- package/third-party/common/phonemis/src/phonemis/lang/de/patterns.cpp +56 -0
- package/third-party/common/phonemis/src/phonemis/lang/de/patterns.h +15 -0
- package/third-party/common/phonemis/src/phonemis/lang/de/pipeline.h +3 -3
- package/third-party/common/phonemis/src/phonemis/lang/en/constants.h +181 -30
- package/third-party/common/phonemis/src/phonemis/lang/en/hmm_tagger.cpp +5 -7
- package/third-party/common/phonemis/src/phonemis/lang/en/num2word.cpp +232 -135
- package/third-party/common/phonemis/src/phonemis/lang/en/num2word.h +41 -16
- package/third-party/common/phonemis/src/phonemis/lang/en/pipeline.h +3 -10
- package/third-party/common/phonemis/src/phonemis/lang/es/constants.h +182 -60
- package/third-party/common/phonemis/src/phonemis/lang/es/num2word.cpp +247 -212
- package/third-party/common/phonemis/src/phonemis/lang/es/num2word.h +38 -18
- package/third-party/common/phonemis/src/phonemis/lang/es/patterns.cpp +50 -0
- package/third-party/common/phonemis/src/phonemis/lang/es/patterns.h +15 -0
- package/third-party/common/phonemis/src/phonemis/lang/es/pipeline.h +3 -3
- package/third-party/common/phonemis/src/phonemis/lang/fr/constants.h +152 -26
- package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.cpp +252 -179
- package/third-party/common/phonemis/src/phonemis/lang/fr/num2word.h +38 -15
- package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.cpp +83 -0
- package/third-party/common/phonemis/src/phonemis/lang/fr/patterns.h +15 -0
- package/third-party/common/phonemis/src/phonemis/lang/fr/pipeline.h +3 -3
- package/third-party/common/phonemis/src/phonemis/lang/hi/constants.h +62 -10
- package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.cpp +74 -123
- package/third-party/common/phonemis/src/phonemis/lang/hi/num2word.h +27 -16
- package/third-party/common/phonemis/src/phonemis/lang/hi/pipeline.h +5 -3
- package/third-party/common/phonemis/src/phonemis/lang/it/constants.h +122 -42
- package/third-party/common/phonemis/src/phonemis/lang/it/num2word.cpp +200 -207
- package/third-party/common/phonemis/src/phonemis/lang/it/num2word.h +30 -18
- package/third-party/common/phonemis/src/phonemis/lang/it/patterns.cpp +25 -0
- package/third-party/common/phonemis/src/phonemis/lang/it/patterns.h +15 -0
- package/third-party/common/phonemis/src/phonemis/lang/it/pipeline.h +3 -3
- package/third-party/common/phonemis/src/phonemis/lang/pl/constants.h +346 -77
- package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.cpp +631 -246
- package/third-party/common/phonemis/src/phonemis/lang/pl/num2word.h +47 -15
- package/third-party/common/phonemis/src/phonemis/lang/pl/pipeline.h +6 -6
- package/third-party/common/phonemis/src/phonemis/lang/pt/constants.h +201 -0
- package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.cpp +365 -0
- package/third-party/common/phonemis/src/phonemis/lang/pt/num2word.h +53 -0
- package/third-party/common/phonemis/src/phonemis/lang/pt/pipeline.h +4 -2
- package/third-party/common/phonemis/src/phonemis/main.cpp +42 -11
- package/third-party/common/phonemis/src/phonemis/protophone/meta.h +24 -0
- package/third-party/common/phonemis/src/phonemis/protophone/numeric.h +26 -0
- package/third-party/common/phonemis/src/phonemis/protophone/protophone.cpp +525 -0
- package/third-party/common/phonemis/src/phonemis/protophone/protophone.h +80 -0
- package/third-party/common/phonemis/src/phonemis/protophone/tensor.h +76 -0
- package/third-party/common/phonemis/src/phonemis/protophone/tensor_utils.h +89 -0
- package/third-party/common/phonemis/src/phonemis/protophone/tensor_view.h +125 -0
- package/third-party/common/phonemis/src/phonemis/protophone/types.h +43 -0
- package/third-party/common/phonemis/src/phonemis/utils/strings.h +20 -14
- package/third-party/common/phonemis/src/phonemis/utils/unicode.h +15 -1
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_arithmetic.hpp +267 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_bit.hpp +232 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_cast.hpp +43 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_complex.hpp +112 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_details.hpp +386 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_logical.hpp +240 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_math.hpp +2601 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_memory.hpp +1006 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_rounding.hpp +72 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_swizzle.hpp +260 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_trigo.hpp +996 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/utils/shifts.hpp +82 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx.hpp +2111 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2.hpp +1591 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx2_128.hpp +170 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512bw.hpp +724 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512cd.hpp +28 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512dq.hpp +270 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512er.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512f.hpp +2919 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512ifma.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512pf.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi.hpp +76 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vbmi2.hpp +130 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512bw.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx512vnni_avx512vbmi2.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avx_128.hpp +164 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_avxvnni.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common.hpp +26 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_common_fwd.hpp +127 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_constants.hpp +393 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_emulated.hpp +787 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx.hpp +93 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_avx2.hpp +46 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma3_sse.hpp +97 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_fma4.hpp +92 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_i8mm_neon64.hpp +17 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_isa.hpp +148 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon.hpp +3580 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_neon64.hpp +1614 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_rvv.hpp +1515 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_scalar.hpp +1210 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse2.hpp +2333 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse3.hpp +66 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_1.hpp +510 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sse4_2.hpp +44 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_ssse3.hpp +186 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_sve.hpp +1186 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vsx.hpp +947 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_vxe.hpp +787 -0
- package/third-party/common/phonemis/src/third-party/xsimd/arch/xsimd_wasm.hpp +1819 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_arch.hpp +242 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_config.hpp +633 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features.hpp +50 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_arm.hpp +132 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_ppc.hpp +54 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_riscv.hpp +95 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_s390x.hpp +56 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpu_features_x86.hpp +1121 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_cpuid.hpp +144 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_getauxval.hpp +159 -0
- package/third-party/common/phonemis/src/third-party/xsimd/config/xsimd_macros.hpp +78 -0
- package/third-party/common/phonemis/src/third-party/xsimd/math/xsimd_rem_pio2.hpp +707 -0
- package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_aligned_allocator.hpp +349 -0
- package/third-party/common/phonemis/src/third-party/xsimd/memory/xsimd_alignment.hpp +102 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_all_registers.hpp +57 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_api.hpp +3106 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx2_register.hpp +57 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512bw_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512cd_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512dq_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512er_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512f_register.hpp +77 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512ifma_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512pf_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi2_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vbmi_register.hpp +51 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +54 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx512vnni_avx512vbmi2_register.hpp +53 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avx_register.hpp +79 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_avxvnni_register.hpp +44 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch.hpp +1666 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_constant.hpp +572 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_batch_fwd.hpp +41 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_common_arch.hpp +49 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_emulated_register.hpp +80 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx2_register.hpp +50 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_avx_register.hpp +50 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma3_sse_register.hpp +50 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_fma4_register.hpp +50 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_i8mm_neon64_register.hpp +55 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon64_register.hpp +55 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_neon_register.hpp +130 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_register.hpp +96 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_rvv_register.hpp +491 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse2_register.hpp +59 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse3_register.hpp +49 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_1_register.hpp +48 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sse4_2_register.hpp +48 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_ssse3_register.hpp +48 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_sve_register.hpp +216 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_traits.hpp +409 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_utils.hpp +462 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vsx_register.hpp +84 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_vxe_register.hpp +86 -0
- package/third-party/common/phonemis/src/third-party/xsimd/types/xsimd_wasm_register.hpp +59 -0
- package/third-party/common/phonemis/src/third-party/xsimd/utils/bits.hpp +122 -0
- package/third-party/common/phonemis/src/third-party/xsimd/utils/xsimd_type_traits.hpp +145 -0
- package/third-party/common/phonemis/src/third-party/xsimd/xsimd.hpp +43 -0
- package/third-party/common/phonemis/src/phonemis/base/processor/constants.h +0 -11
- package/third-party/common/phonemis/src/phonemis/base/processor/num2word/config.h +0 -16
- package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.cpp +0 -271
- package/third-party/common/phonemis/src/phonemis/base/processor/num2word/layer.h +0 -45
- package/third-party/common/phonemis/src/phonemis/base/processor/num2word/types.h +0 -29
- package/third-party/common/phonemis/src/phonemis/base/processor/sanitizer_layer.cpp +0 -22
- package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.cpp +0 -40
- package/third-party/common/phonemis/src/phonemis/base/processor/trim_layer.h +0 -22
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/****************************************************************
|
|
2
|
+
* Partial backport of `__cpp_lib_bitops == 201907L` from C++20 *
|
|
3
|
+
****************************************************************/
|
|
4
|
+
|
|
5
|
+
#ifndef XSIMD_BIT_HPP
|
|
6
|
+
#define XSIMD_BIT_HPP
|
|
7
|
+
|
|
8
|
+
#include "../../config/xsimd_config.hpp"
|
|
9
|
+
|
|
10
|
+
#if XSIMD_CPP_VERSION > 202002L
|
|
11
|
+
|
|
12
|
+
#include <version>
|
|
13
|
+
|
|
14
|
+
#if __cpp_lib_bitops >= 201907L
|
|
15
|
+
|
|
16
|
+
#include <bit>
|
|
17
|
+
|
|
18
|
+
namespace xsimd
|
|
19
|
+
{
|
|
20
|
+
namespace detail
|
|
21
|
+
{
|
|
22
|
+
using std::countl_one;
|
|
23
|
+
using std::countl_zero;
|
|
24
|
+
using std::countr_one;
|
|
25
|
+
using std::countr_zero;
|
|
26
|
+
using std::popcount;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
#else
|
|
33
|
+
|
|
34
|
+
#include <climits>
|
|
35
|
+
#include <type_traits>
|
|
36
|
+
|
|
37
|
+
#ifdef __has_builtin
|
|
38
|
+
#define XSIMD_HAS_BUILTIN(x) __has_builtin(x)
|
|
39
|
+
#else
|
|
40
|
+
#define XSIMD_HAS_BUILTIN(x) 0
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#ifdef _MSC_VER
|
|
44
|
+
#include <intrin.h>
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
namespace xsimd
|
|
48
|
+
{
|
|
49
|
+
namespace detail
|
|
50
|
+
{
|
|
51
|
+
// FIXME: We could do better by dispatching to the appropriate popcount instruction
|
|
52
|
+
// depending on the arch.
|
|
53
|
+
|
|
54
|
+
template <class T, class = std::enable_if_t<std::is_unsigned<T>::value>>
|
|
55
|
+
XSIMD_INLINE int popcount(T x) noexcept
|
|
56
|
+
{
|
|
57
|
+
#if XSIMD_HAS_BUILTIN(__builtin_popcountg)
|
|
58
|
+
return __builtin_popcountg(x);
|
|
59
|
+
#else
|
|
60
|
+
XSIMD_IF_CONSTEXPR(sizeof(T) == 1)
|
|
61
|
+
{
|
|
62
|
+
#if XSIMD_HAS_BUILTIN(__builtin_popcount)
|
|
63
|
+
return __builtin_popcount(x);
|
|
64
|
+
#elif defined(_MSC_VER)
|
|
65
|
+
return __popcnt(x);
|
|
66
|
+
#else
|
|
67
|
+
// https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSet64
|
|
68
|
+
return ((uint64_t)x * 0x200040008001ULL & 0x111111111111111ULL) % 0xf;
|
|
69
|
+
#endif
|
|
70
|
+
}
|
|
71
|
+
else XSIMD_IF_CONSTEXPR(sizeof(T) == 2)
|
|
72
|
+
{
|
|
73
|
+
#if XSIMD_HAS_BUILTIN(__builtin_popcount)
|
|
74
|
+
return __builtin_popcount(x);
|
|
75
|
+
#elif defined(_MSC_VER)
|
|
76
|
+
return __popcnt16(x);
|
|
77
|
+
#else
|
|
78
|
+
// https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSet64
|
|
79
|
+
constexpr unsigned long long msb12 = 0x1001001001001ULL;
|
|
80
|
+
constexpr unsigned long long mask5 = 0x84210842108421ULL;
|
|
81
|
+
|
|
82
|
+
unsigned int v = (unsigned int)x;
|
|
83
|
+
|
|
84
|
+
return ((v & 0xfff) * msb12 & mask5) % 0x1f
|
|
85
|
+
+ (((v & 0xfff000) >> 12) * msb12 & mask5) % 0x1f;
|
|
86
|
+
#endif
|
|
87
|
+
}
|
|
88
|
+
else XSIMD_IF_CONSTEXPR(sizeof(T) == 4)
|
|
89
|
+
{
|
|
90
|
+
#if XSIMD_HAS_BUILTIN(__builtin_popcount)
|
|
91
|
+
return __builtin_popcount(x);
|
|
92
|
+
#elif defined(_MSC_VER)
|
|
93
|
+
return __popcnt(x);
|
|
94
|
+
#else
|
|
95
|
+
// https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
|
96
|
+
x = x - ((x >> 1) & (T) ~(T)0 / 3);
|
|
97
|
+
x = (x & (T) ~(T)0 / 15 * 3) + ((x >> 2) & (T) ~(T)0 / 15 * 3);
|
|
98
|
+
x = (x + (x >> 4)) & (T) ~(T)0 / 255 * 15;
|
|
99
|
+
return (x * ((T) ~(T)0 / 255)) >> (sizeof(T) - 1) * CHAR_BIT;
|
|
100
|
+
#endif
|
|
101
|
+
}
|
|
102
|
+
else
|
|
103
|
+
{
|
|
104
|
+
// sizeof(T) == 8
|
|
105
|
+
#if XSIMD_HAS_BUILTIN(__builtin_popcountll)
|
|
106
|
+
return __builtin_popcountll(x);
|
|
107
|
+
#elif XSIMD_HAS_BUILTIN(__builtin_popcount)
|
|
108
|
+
return __builtin_popcount((unsigned int)x) + __builtin_popcount((unsigned int)(x >> 32));
|
|
109
|
+
#elif defined(_MSC_VER)
|
|
110
|
+
#ifdef _M_X64
|
|
111
|
+
return (int)__popcnt64(x);
|
|
112
|
+
#else
|
|
113
|
+
return (int)(__popcnt((unsigned int)x) + __popcnt((unsigned int)(x >> 32)));
|
|
114
|
+
#endif
|
|
115
|
+
#else
|
|
116
|
+
// https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
|
|
117
|
+
x = x - ((x >> 1) & (T) ~(T)0 / 3);
|
|
118
|
+
x = (x & (T) ~(T)0 / 15 * 3) + ((x >> 2) & (T) ~(T)0 / 15 * 3);
|
|
119
|
+
x = (x + (x >> 4)) & (T) ~(T)0 / 255 * 15;
|
|
120
|
+
return (x * ((T) ~(T)0 / 255)) >> (sizeof(T) - 1) * CHAR_BIT;
|
|
121
|
+
#endif
|
|
122
|
+
}
|
|
123
|
+
#endif
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
template <class T, class = std::enable_if_t<std::is_unsigned<T>::value>>
|
|
127
|
+
XSIMD_INLINE int countl_zero(T x) noexcept
|
|
128
|
+
{
|
|
129
|
+
#if XSIMD_HAS_BUILTIN(__builtin_clzg)
|
|
130
|
+
return __builtin_clzg(x, (int)(sizeof(T) * CHAR_BIT));
|
|
131
|
+
#else
|
|
132
|
+
if (x == 0)
|
|
133
|
+
return sizeof(T) * CHAR_BIT;
|
|
134
|
+
|
|
135
|
+
XSIMD_IF_CONSTEXPR(sizeof(T) <= 4)
|
|
136
|
+
{
|
|
137
|
+
#if XSIMD_HAS_BUILTIN(__builtin_clz)
|
|
138
|
+
return __builtin_clz((unsigned int)x) - (4 - sizeof(T)) * CHAR_BIT;
|
|
139
|
+
#elif defined(_MSC_VER)
|
|
140
|
+
unsigned long index;
|
|
141
|
+
_BitScanReverse(&index, (unsigned long)x);
|
|
142
|
+
return sizeof(T) * CHAR_BIT - index - 1;
|
|
143
|
+
#else
|
|
144
|
+
x |= x >> 1;
|
|
145
|
+
x |= x >> 2;
|
|
146
|
+
x |= x >> 4;
|
|
147
|
+
XSIMD_IF_CONSTEXPR(sizeof(T) >= 2)
|
|
148
|
+
{
|
|
149
|
+
x |= x >> 8;
|
|
150
|
+
}
|
|
151
|
+
XSIMD_IF_CONSTEXPR(sizeof(T) >= 4)
|
|
152
|
+
{
|
|
153
|
+
x |= x >> 16;
|
|
154
|
+
}
|
|
155
|
+
return sizeof(T) * CHAR_BIT - popcount(x);
|
|
156
|
+
#endif
|
|
157
|
+
}
|
|
158
|
+
else
|
|
159
|
+
{
|
|
160
|
+
// sizeof(T) == 8
|
|
161
|
+
#if XSIMD_HAS_BUILTIN(__builtin_clzll)
|
|
162
|
+
return __builtin_clzll((unsigned long long)x);
|
|
163
|
+
#elif defined(_MSC_VER) && defined(_M_X64)
|
|
164
|
+
unsigned long index;
|
|
165
|
+
_BitScanReverse64(&index, (unsigned long long)x);
|
|
166
|
+
return sizeof(T) * CHAR_BIT - index - 1;
|
|
167
|
+
#else
|
|
168
|
+
x |= x >> 1;
|
|
169
|
+
x |= x >> 2;
|
|
170
|
+
x |= x >> 4;
|
|
171
|
+
x |= x >> 8;
|
|
172
|
+
x |= x >> 16;
|
|
173
|
+
x |= x >> 32;
|
|
174
|
+
return sizeof(T) * CHAR_BIT - popcount(x);
|
|
175
|
+
#endif
|
|
176
|
+
}
|
|
177
|
+
#endif
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
template <class T, class = std::enable_if_t<std::is_unsigned<T>::value>>
|
|
181
|
+
XSIMD_INLINE int countl_one(T x) noexcept
|
|
182
|
+
{
|
|
183
|
+
return countl_zero(T(~x));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
template <class T, class = std::enable_if_t<std::is_unsigned<T>::value>>
|
|
187
|
+
XSIMD_INLINE int countr_zero(T x) noexcept
|
|
188
|
+
{
|
|
189
|
+
#if XSIMD_HAS_BUILTIN(__builtin_ctzg)
|
|
190
|
+
return __builtin_ctzg(x, (int)(sizeof(T) * CHAR_BIT));
|
|
191
|
+
#else
|
|
192
|
+
if (x == 0)
|
|
193
|
+
return sizeof(T) * CHAR_BIT;
|
|
194
|
+
|
|
195
|
+
XSIMD_IF_CONSTEXPR(sizeof(T) <= 4)
|
|
196
|
+
{
|
|
197
|
+
#if XSIMD_HAS_BUILTIN(__builtin_ctz)
|
|
198
|
+
return __builtin_ctz((unsigned int)x);
|
|
199
|
+
#elif defined(_MSC_VER)
|
|
200
|
+
unsigned long index;
|
|
201
|
+
_BitScanForward(&index, (unsigned long)x);
|
|
202
|
+
return index;
|
|
203
|
+
#endif
|
|
204
|
+
}
|
|
205
|
+
else
|
|
206
|
+
{
|
|
207
|
+
// sizeof(T) == 8
|
|
208
|
+
#if XSIMD_HAS_BUILTIN(__builtin_ctzll)
|
|
209
|
+
return __builtin_ctzll((unsigned long long)x);
|
|
210
|
+
#elif defined(_MSC_VER) && defined(_M_X64)
|
|
211
|
+
unsigned long index;
|
|
212
|
+
_BitScanForward64(&index, (unsigned long long)x);
|
|
213
|
+
return index;
|
|
214
|
+
#endif
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightMultLookup
|
|
218
|
+
return popcount((T)((x & -x) - 1));
|
|
219
|
+
#endif
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
template <class T, class = std::enable_if_t<std::is_unsigned<T>::value>>
|
|
223
|
+
XSIMD_INLINE int countr_one(T x) noexcept
|
|
224
|
+
{
|
|
225
|
+
return countr_zero(T(~x));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#endif
|
|
232
|
+
#endif
|
|
@@ -0,0 +1,43 @@
|
|
|
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_COMMON_CAST_HPP
|
|
13
|
+
#define XSIMD_COMMON_CAST_HPP
|
|
14
|
+
|
|
15
|
+
#include <array>
|
|
16
|
+
|
|
17
|
+
#include "../../config/xsimd_macros.hpp"
|
|
18
|
+
#include "../../utils/xsimd_type_traits.hpp"
|
|
19
|
+
|
|
20
|
+
namespace xsimd
|
|
21
|
+
{
|
|
22
|
+
namespace kernel
|
|
23
|
+
{
|
|
24
|
+
template <class A, class T>
|
|
25
|
+
XSIMD_INLINE std::array<batch<widen_t<T>, A>, 2> widen(batch<T, A> const& x, requires_arch<common>) noexcept
|
|
26
|
+
{
|
|
27
|
+
alignas(A::alignment()) T buffer[batch<T, A>::size];
|
|
28
|
+
x.store_aligned(&buffer[0]);
|
|
29
|
+
|
|
30
|
+
using T_out = widen_t<T>;
|
|
31
|
+
alignas(A::alignment()) T_out out_buffer[batch<T, A>::size];
|
|
32
|
+
for (size_t i = 0; i < batch<T, A>::size; ++i)
|
|
33
|
+
out_buffer[i] = static_cast<T_out>(buffer[i]);
|
|
34
|
+
|
|
35
|
+
return { batch<T_out, A>::load_aligned(&out_buffer[0]),
|
|
36
|
+
batch<T_out, A>::load_aligned(&out_buffer[batch<T_out, A>::size]) };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#endif
|
package/third-party/common/phonemis/src/third-party/xsimd/arch/common/xsimd_common_complex.hpp
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
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_COMMON_COMPLEX_HPP
|
|
13
|
+
#define XSIMD_COMMON_COMPLEX_HPP
|
|
14
|
+
|
|
15
|
+
#include <complex>
|
|
16
|
+
|
|
17
|
+
#include "./xsimd_common_details.hpp"
|
|
18
|
+
|
|
19
|
+
namespace xsimd
|
|
20
|
+
{
|
|
21
|
+
|
|
22
|
+
namespace kernel
|
|
23
|
+
{
|
|
24
|
+
|
|
25
|
+
using namespace types;
|
|
26
|
+
|
|
27
|
+
// real
|
|
28
|
+
template <class A, class T>
|
|
29
|
+
XSIMD_INLINE batch<T, A> real(batch<T, A> const& self, requires_arch<common>) noexcept
|
|
30
|
+
{
|
|
31
|
+
return self;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
template <class A, class T>
|
|
35
|
+
XSIMD_INLINE batch<T, A> real(batch<std::complex<T>, A> const& self, requires_arch<common>) noexcept
|
|
36
|
+
{
|
|
37
|
+
return self.real();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// imag
|
|
41
|
+
template <class A, class T>
|
|
42
|
+
XSIMD_INLINE batch<T, A> imag(batch<T, A> const& /*self*/, requires_arch<common>) noexcept
|
|
43
|
+
{
|
|
44
|
+
return batch<T, A>(T(0));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
template <class A, class T>
|
|
48
|
+
XSIMD_INLINE batch<T, A> imag(batch<std::complex<T>, A> const& self, requires_arch<common>) noexcept
|
|
49
|
+
{
|
|
50
|
+
return self.imag();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// arg
|
|
54
|
+
template <class A, class T>
|
|
55
|
+
XSIMD_INLINE real_batch_type_t<batch<T, A>> arg(batch<T, A> const& self, requires_arch<common>) noexcept
|
|
56
|
+
{
|
|
57
|
+
return atan2(imag(self), real(self));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// conj
|
|
61
|
+
template <class A, class T>
|
|
62
|
+
XSIMD_INLINE complex_batch_type_t<batch<T, A>> conj(batch<T, A> const& self, requires_arch<common>) noexcept
|
|
63
|
+
{
|
|
64
|
+
return { real(self), -imag(self) };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// norm
|
|
68
|
+
template <class A, class T>
|
|
69
|
+
XSIMD_INLINE real_batch_type_t<batch<T, A>> norm(batch<T, A> const& self, requires_arch<common>) noexcept
|
|
70
|
+
{
|
|
71
|
+
return { fma(real(self), real(self), imag(self) * imag(self)) };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// proj
|
|
75
|
+
template <class A, class T>
|
|
76
|
+
XSIMD_INLINE complex_batch_type_t<batch<T, A>> proj(batch<T, A> const& self, requires_arch<common>) noexcept
|
|
77
|
+
{
|
|
78
|
+
using batch_type = complex_batch_type_t<batch<T, A>>;
|
|
79
|
+
using real_batch = typename batch_type::real_batch;
|
|
80
|
+
using real_value_type = typename real_batch::value_type;
|
|
81
|
+
#ifdef __FAST_MATH__
|
|
82
|
+
return { self };
|
|
83
|
+
#else
|
|
84
|
+
auto cond = xsimd::isinf(real(self)) || xsimd::isinf(imag(self));
|
|
85
|
+
return select(cond,
|
|
86
|
+
batch_type(constants::infinity<real_batch>(),
|
|
87
|
+
copysign(real_batch(real_value_type(0)), imag(self))),
|
|
88
|
+
batch_type(self));
|
|
89
|
+
#endif
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
template <class A, class T>
|
|
93
|
+
XSIMD_INLINE batch_bool<T, A> isnan(batch<std::complex<T>, A> const& self, requires_arch<common>) noexcept
|
|
94
|
+
{
|
|
95
|
+
return batch_bool<T, A>(isnan(self.real()) || isnan(self.imag()));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
template <class A, class T>
|
|
99
|
+
XSIMD_INLINE batch_bool<T, A> isinf(batch<std::complex<T>, A> const& self, requires_arch<common>) noexcept
|
|
100
|
+
{
|
|
101
|
+
return batch_bool<T, A>(isinf(self.real()) || isinf(self.imag()));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
template <class A, class T>
|
|
105
|
+
XSIMD_INLINE batch_bool<T, A> isfinite(batch<std::complex<T>, A> const& self, requires_arch<common>) noexcept
|
|
106
|
+
{
|
|
107
|
+
return batch_bool<T, A>(isfinite(self.real()) && isfinite(self.imag()));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#endif
|