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.
- package/lib/module/fetcher/telemetry.js +1 -1
- package/package.json +1 -1
- package/react-native-executorch.podspec +2 -0
- package/src/fetcher/telemetry.ts +1 -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,144 @@
|
|
|
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_CPUID_HPP
|
|
13
|
+
#define XSIMD_CPUID_HPP
|
|
14
|
+
|
|
15
|
+
#include "../types/xsimd_all_registers.hpp"
|
|
16
|
+
#include "./xsimd_cpu_features.hpp"
|
|
17
|
+
#include "./xsimd_macros.hpp"
|
|
18
|
+
|
|
19
|
+
namespace xsimd
|
|
20
|
+
{
|
|
21
|
+
namespace detail
|
|
22
|
+
{
|
|
23
|
+
struct supported_arch
|
|
24
|
+
{
|
|
25
|
+
|
|
26
|
+
#define ARCH_FIELD_EX(arch, field_name) \
|
|
27
|
+
unsigned field_name = 0; \
|
|
28
|
+
XSIMD_INLINE bool has(::xsimd::arch) const { return this->field_name; }
|
|
29
|
+
|
|
30
|
+
#define ARCH_FIELD_EX_REUSE(arch, field_name) \
|
|
31
|
+
XSIMD_INLINE bool has(::xsimd::arch) const { return this->field_name; }
|
|
32
|
+
|
|
33
|
+
#define ARCH_FIELD(name) ARCH_FIELD_EX(name, name)
|
|
34
|
+
|
|
35
|
+
ARCH_FIELD(sse2)
|
|
36
|
+
ARCH_FIELD(sse3)
|
|
37
|
+
|
|
38
|
+
ARCH_FIELD(ssse3)
|
|
39
|
+
ARCH_FIELD(sse4_1)
|
|
40
|
+
ARCH_FIELD(sse4_2)
|
|
41
|
+
// ARCH_FIELD(sse4a)
|
|
42
|
+
ARCH_FIELD_EX(fma3<::xsimd::sse4_2>, fma3_sse42)
|
|
43
|
+
ARCH_FIELD(fma4)
|
|
44
|
+
// ARCH_FIELD(xop)
|
|
45
|
+
ARCH_FIELD(avx)
|
|
46
|
+
ARCH_FIELD_EX(fma3<::xsimd::avx>, fma3_avx)
|
|
47
|
+
ARCH_FIELD(avx2)
|
|
48
|
+
ARCH_FIELD(avxvnni)
|
|
49
|
+
ARCH_FIELD_EX(fma3<::xsimd::avx2>, fma3_avx2)
|
|
50
|
+
ARCH_FIELD(avx512f)
|
|
51
|
+
ARCH_FIELD(avx512cd)
|
|
52
|
+
ARCH_FIELD(avx512dq)
|
|
53
|
+
ARCH_FIELD(avx512bw)
|
|
54
|
+
ARCH_FIELD(avx512er)
|
|
55
|
+
ARCH_FIELD(avx512pf)
|
|
56
|
+
ARCH_FIELD(avx512ifma)
|
|
57
|
+
ARCH_FIELD(avx512vbmi)
|
|
58
|
+
ARCH_FIELD(avx512vbmi2)
|
|
59
|
+
ARCH_FIELD_EX(avx512vnni<::xsimd::avx512bw>, avx512vnni_bw)
|
|
60
|
+
ARCH_FIELD_EX(avx512vnni<::xsimd::avx512vbmi2>, avx512vnni_vbmi2)
|
|
61
|
+
ARCH_FIELD(neon)
|
|
62
|
+
ARCH_FIELD(neon64)
|
|
63
|
+
ARCH_FIELD_EX(i8mm<::xsimd::neon64>, i8mm_neon64)
|
|
64
|
+
ARCH_FIELD_EX(detail::sve<512>, sve512)
|
|
65
|
+
ARCH_FIELD_EX(detail::sve<256>, sve256)
|
|
66
|
+
ARCH_FIELD_EX(detail::sve<128>, sve128)
|
|
67
|
+
ARCH_FIELD_EX(detail::rvv<512>, rvv512)
|
|
68
|
+
ARCH_FIELD_EX(detail::rvv<256>, rvv256)
|
|
69
|
+
ARCH_FIELD_EX(detail::rvv<128>, rvv128)
|
|
70
|
+
ARCH_FIELD(wasm)
|
|
71
|
+
ARCH_FIELD(vsx)
|
|
72
|
+
ARCH_FIELD(vxe)
|
|
73
|
+
|
|
74
|
+
#undef ARCH_FIELD
|
|
75
|
+
|
|
76
|
+
XSIMD_INLINE supported_arch() noexcept
|
|
77
|
+
{
|
|
78
|
+
#if XSIMD_WITH_WASM
|
|
79
|
+
wasm = 1;
|
|
80
|
+
#endif
|
|
81
|
+
|
|
82
|
+
const auto cpu = xsimd::cpu_features();
|
|
83
|
+
|
|
84
|
+
vxe = cpu.vxe();
|
|
85
|
+
|
|
86
|
+
vsx = cpu.vsx();
|
|
87
|
+
|
|
88
|
+
rvv128 = cpu.rvv() && (cpu.rvv_size_bytes() >= (128 / 8));
|
|
89
|
+
rvv256 = cpu.rvv() && (cpu.rvv_size_bytes() >= (256 / 8));
|
|
90
|
+
rvv512 = cpu.rvv() && (cpu.rvv_size_bytes() >= (512 / 8));
|
|
91
|
+
|
|
92
|
+
neon = cpu.neon();
|
|
93
|
+
neon64 = cpu.neon64();
|
|
94
|
+
i8mm_neon64 = cpu.neon64() && cpu.i8mm();
|
|
95
|
+
|
|
96
|
+
// Running SVE128 on a SVE256 machine is more tricky than the x86 equivalent
|
|
97
|
+
// of running SSE code on an AVX machine and requires to explicitly change the
|
|
98
|
+
// vector length using `prctl` (per thread setting).
|
|
99
|
+
// This is something we have not tested and not integrated in xsimd so the safe
|
|
100
|
+
// default is to assume only one valid SVE width at runtime.
|
|
101
|
+
sve128 = cpu.sve() && (cpu.sve_size_bytes() * 8 == 128);
|
|
102
|
+
sve256 = cpu.sve() && (cpu.sve_size_bytes() * 8 == 256);
|
|
103
|
+
sve512 = cpu.sve() && (cpu.sve_size_bytes() * 8 == 512);
|
|
104
|
+
|
|
105
|
+
sse2 = cpu.sse2();
|
|
106
|
+
sse3 = cpu.sse3();
|
|
107
|
+
ssse3 = cpu.ssse3();
|
|
108
|
+
sse4_1 = cpu.sse4_1();
|
|
109
|
+
sse4_2 = cpu.sse4_2();
|
|
110
|
+
fma3_sse42 = cpu.fma3();
|
|
111
|
+
|
|
112
|
+
// sse4a not implemented in cpu_id yet
|
|
113
|
+
// xop not implemented in cpu_id yet
|
|
114
|
+
|
|
115
|
+
avx = cpu.avx();
|
|
116
|
+
fma3_avx = avx && fma3_sse42;
|
|
117
|
+
fma4 = cpu.fma4();
|
|
118
|
+
avx2 = cpu.avx2();
|
|
119
|
+
avxvnni = cpu.avxvnni();
|
|
120
|
+
fma3_avx2 = avx2 && fma3_sse42;
|
|
121
|
+
|
|
122
|
+
avx512f = cpu.avx512f();
|
|
123
|
+
avx512cd = cpu.avx512cd();
|
|
124
|
+
avx512dq = cpu.avx512dq();
|
|
125
|
+
avx512bw = cpu.avx512bw();
|
|
126
|
+
avx512er = cpu.avx512er();
|
|
127
|
+
avx512pf = cpu.avx512pf();
|
|
128
|
+
avx512ifma = cpu.avx512ifma();
|
|
129
|
+
avx512vbmi = cpu.avx512vbmi();
|
|
130
|
+
avx512vbmi2 = cpu.avx512vbmi2();
|
|
131
|
+
avx512vnni_bw = cpu.avx512vnni_bw();
|
|
132
|
+
avx512vnni_vbmi2 = avx512vbmi2 && avx512vnni_bw;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
} // namespace detail
|
|
136
|
+
|
|
137
|
+
XSIMD_INLINE detail::supported_arch available_architectures() noexcept
|
|
138
|
+
{
|
|
139
|
+
static detail::supported_arch supported;
|
|
140
|
+
return supported;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
#endif
|
|
@@ -0,0 +1,159 @@
|
|
|
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_GETAUXVAL_HPP
|
|
13
|
+
#define XSIMD_GETAUXVAL_HPP
|
|
14
|
+
|
|
15
|
+
#include "../utils/bits.hpp"
|
|
16
|
+
#include "./xsimd_config.hpp"
|
|
17
|
+
|
|
18
|
+
#if XSIMD_HAVE_LINUX_GETAUXVAL
|
|
19
|
+
#include <sys/auxv.h> // getauxval
|
|
20
|
+
#endif
|
|
21
|
+
|
|
22
|
+
namespace xsimd
|
|
23
|
+
{
|
|
24
|
+
namespace detail
|
|
25
|
+
{
|
|
26
|
+
using linux_getauxval_t = unsigned long;
|
|
27
|
+
|
|
28
|
+
inline linux_getauxval_t linux_getauxval(linux_getauxval_t type) noexcept;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Holds the value of a Linux auxiliary vector entry (e.g. AT_HWCAP).
|
|
33
|
+
*
|
|
34
|
+
* On Linux systems, the kernel exposes some CPU features through the
|
|
35
|
+
* auxiliary vector, which can be queried via `getauxval(AT_HWCAP)`.
|
|
36
|
+
* Well defined on all platforms, and will return always falsw on
|
|
37
|
+
* non-linux platforms.
|
|
38
|
+
*
|
|
39
|
+
* Usage:
|
|
40
|
+
* auto hwcap = linux_auxval::read(AT_HWCAP);
|
|
41
|
+
* bool neon = hwcap.has_feature(HWCAP_NEON);
|
|
42
|
+
*
|
|
43
|
+
* @see https://www.kernel.org/doc/Documentation/arm64/elf_hwcaps.txt
|
|
44
|
+
*/
|
|
45
|
+
class linux_auxval
|
|
46
|
+
{
|
|
47
|
+
private:
|
|
48
|
+
using getauxval_t = detail::linux_getauxval_t;
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
constexpr linux_auxval() noexcept = default;
|
|
52
|
+
|
|
53
|
+
inline static linux_auxval read(getauxval_t type) noexcept
|
|
54
|
+
{
|
|
55
|
+
return linux_auxval(detail::linux_getauxval(type));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
constexpr bool has_feature(getauxval_t feat) const noexcept
|
|
59
|
+
{
|
|
60
|
+
return (m_auxval & feat) == feat;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private:
|
|
64
|
+
getauxval_t m_auxval = {};
|
|
65
|
+
|
|
66
|
+
constexpr explicit linux_auxval(getauxval_t v) noexcept
|
|
67
|
+
: m_auxval(v)
|
|
68
|
+
{
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
class linux_hwcap_backend
|
|
73
|
+
{
|
|
74
|
+
public:
|
|
75
|
+
inline linux_auxval hwcap() const noexcept;
|
|
76
|
+
|
|
77
|
+
inline linux_auxval hwcap2() const noexcept;
|
|
78
|
+
|
|
79
|
+
private:
|
|
80
|
+
enum class status
|
|
81
|
+
{
|
|
82
|
+
hwcap_valid = 0,
|
|
83
|
+
hwcap2_valid = 1,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
using status_bitset = utils::uint_bitset<status, std::uint32_t>;
|
|
87
|
+
|
|
88
|
+
mutable status_bitset m_status {};
|
|
89
|
+
mutable xsimd::linux_auxval m_hwcap {};
|
|
90
|
+
mutable xsimd::linux_auxval m_hwcap2 {};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
class linux_hwcap_backend_noop
|
|
94
|
+
{
|
|
95
|
+
public:
|
|
96
|
+
inline linux_auxval hwcap() const noexcept { return {}; }
|
|
97
|
+
|
|
98
|
+
inline linux_auxval hwcap2() const noexcept { return {}; }
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
#if XSIMD_HAVE_LINUX_GETAUXVAL
|
|
102
|
+
using linux_hwcap_backend_default = linux_hwcap_backend;
|
|
103
|
+
#else
|
|
104
|
+
// Contrary to CPUID that is only used on one architecture, HWCAP are
|
|
105
|
+
// available on multiple architectures with different meaning for the
|
|
106
|
+
// different bit fields.
|
|
107
|
+
// We use the Linux `HWCAP` constants directly to avoid repetition, so
|
|
108
|
+
// we could not use a default implementation without already being on
|
|
109
|
+
// Linux anyways.
|
|
110
|
+
struct linux_hwcap_backend_default
|
|
111
|
+
{
|
|
112
|
+
};
|
|
113
|
+
#endif
|
|
114
|
+
|
|
115
|
+
/********************
|
|
116
|
+
* Implementation *
|
|
117
|
+
********************/
|
|
118
|
+
|
|
119
|
+
namespace detail
|
|
120
|
+
{
|
|
121
|
+
#if XSIMD_HAVE_LINUX_GETAUXVAL
|
|
122
|
+
inline linux_getauxval_t linux_getauxval(linux_getauxval_t type) noexcept
|
|
123
|
+
{
|
|
124
|
+
return getauxval(type);
|
|
125
|
+
}
|
|
126
|
+
#else
|
|
127
|
+
inline linux_getauxval_t linux_getauxval(linux_getauxval_t) noexcept
|
|
128
|
+
{
|
|
129
|
+
return {}; // All bits set to 0
|
|
130
|
+
}
|
|
131
|
+
#endif
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
inline linux_auxval linux_hwcap_backend::hwcap() const noexcept
|
|
135
|
+
{
|
|
136
|
+
if (!m_status.bit_is_set<status::hwcap_valid>())
|
|
137
|
+
{
|
|
138
|
+
#if XSIMD_HAVE_LINUX_GETAUXVAL
|
|
139
|
+
m_hwcap = linux_auxval::read(AT_HWCAP);
|
|
140
|
+
#endif
|
|
141
|
+
m_status.set_bit<status::hwcap_valid>();
|
|
142
|
+
}
|
|
143
|
+
return m_hwcap;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
inline linux_auxval linux_hwcap_backend::hwcap2() const noexcept
|
|
147
|
+
{
|
|
148
|
+
if (!m_status.bit_is_set<status::hwcap2_valid>())
|
|
149
|
+
{
|
|
150
|
+
#if XSIMD_HAVE_LINUX_GETAUXVAL
|
|
151
|
+
m_hwcap2 = linux_auxval::read(AT_HWCAP2);
|
|
152
|
+
#endif
|
|
153
|
+
m_status.set_bit<status::hwcap2_valid>();
|
|
154
|
+
}
|
|
155
|
+
return m_hwcap2;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
#endif
|
|
@@ -0,0 +1,78 @@
|
|
|
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_MACROS_HPP
|
|
13
|
+
#define XSIMD_MACROS_HPP
|
|
14
|
+
|
|
15
|
+
#include "./xsimd_config.hpp"
|
|
16
|
+
|
|
17
|
+
#if defined(__VEC__)
|
|
18
|
+
#define XSIMD_INLINE inline
|
|
19
|
+
#elif defined __has_attribute
|
|
20
|
+
#if __has_attribute(always_inline)
|
|
21
|
+
#define XSIMD_INLINE inline __attribute__((always_inline))
|
|
22
|
+
#else
|
|
23
|
+
#define XSIMD_INLINE inline
|
|
24
|
+
#endif
|
|
25
|
+
#elif defined(_MSC_VER)
|
|
26
|
+
#define XSIMD_INLINE inline __forceinline
|
|
27
|
+
#else
|
|
28
|
+
#define XSIMD_INLINE inline
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#define XSIMD_CONCAT_INNER(a, b) a##b
|
|
32
|
+
#define XSIMD_CONCAT(a, b) XSIMD_CONCAT_INNER(a, b)
|
|
33
|
+
|
|
34
|
+
#if defined(__FAST_MATH__)
|
|
35
|
+
#define XSIMD_NO_DENORMALS
|
|
36
|
+
#define XSIMD_NO_INFINITIES
|
|
37
|
+
#define XSIMD_NO_NANS
|
|
38
|
+
#endif
|
|
39
|
+
|
|
40
|
+
#if defined(__has_cpp_attribute)
|
|
41
|
+
// if this check passes, then the compiler supports feature test macros
|
|
42
|
+
#if __has_cpp_attribute(nodiscard) >= 201603L
|
|
43
|
+
// if this check passes, then the compiler supports [[nodiscard]] without a message
|
|
44
|
+
#define XSIMD_NO_DISCARD [[nodiscard]]
|
|
45
|
+
#endif
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
#if !defined(XSIMD_NO_DISCARD) && XSIMD_CPP_VERSION >= 201703L
|
|
49
|
+
// this means that the previous tests failed, but we are using C++17 or higher
|
|
50
|
+
#define XSIMD_NO_DISCARD [[nodiscard]]
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
#if !defined(XSIMD_NO_DISCARD) && (defined(__GNUC__) || defined(__clang__))
|
|
54
|
+
// this means that the previous checks failed, but we are using GCC or Clang
|
|
55
|
+
#define XSIMD_NO_DISCARD __attribute__((warn_unused_result))
|
|
56
|
+
#endif
|
|
57
|
+
|
|
58
|
+
#if !defined(XSIMD_NO_DISCARD)
|
|
59
|
+
// this means that all the previous checks failed, so we fallback to doing nothing
|
|
60
|
+
#define XSIMD_NO_DISCARD
|
|
61
|
+
#endif
|
|
62
|
+
|
|
63
|
+
#ifdef __cpp_if_constexpr
|
|
64
|
+
// this means that the compiler supports the `if constexpr` construct
|
|
65
|
+
#define XSIMD_IF_CONSTEXPR if constexpr
|
|
66
|
+
#endif
|
|
67
|
+
|
|
68
|
+
#if !defined(XSIMD_IF_CONSTEXPR) && XSIMD_CPP_VERSION >= 201703L
|
|
69
|
+
// this means that the previous test failed, but we are using C++17 or higher
|
|
70
|
+
#define XSIMD_IF_CONSTEXPR if constexpr
|
|
71
|
+
#endif
|
|
72
|
+
|
|
73
|
+
#if !defined(XSIMD_IF_CONSTEXPR)
|
|
74
|
+
// this means that all the previous checks failed, so we fallback to a normal `if`
|
|
75
|
+
#define XSIMD_IF_CONSTEXPR if
|
|
76
|
+
#endif
|
|
77
|
+
|
|
78
|
+
#endif
|