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,393 @@
|
|
|
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_NUMERICAL_CONSTANT_HPP
|
|
13
|
+
#define XSIMD_NUMERICAL_CONSTANT_HPP
|
|
14
|
+
|
|
15
|
+
#include <limits>
|
|
16
|
+
|
|
17
|
+
#include "../types/xsimd_utils.hpp"
|
|
18
|
+
|
|
19
|
+
namespace xsimd
|
|
20
|
+
{
|
|
21
|
+
|
|
22
|
+
namespace constants
|
|
23
|
+
{
|
|
24
|
+
|
|
25
|
+
#define XSIMD_DEFINE_CONSTANT(NAME, SINGLE, DOUBLE) \
|
|
26
|
+
template <class T> \
|
|
27
|
+
XSIMD_INLINE T NAME() noexcept \
|
|
28
|
+
{ \
|
|
29
|
+
return T(NAME<typename T::value_type>()); \
|
|
30
|
+
} \
|
|
31
|
+
template <> \
|
|
32
|
+
XSIMD_INLINE float NAME<float>() noexcept \
|
|
33
|
+
{ \
|
|
34
|
+
return SINGLE; \
|
|
35
|
+
} \
|
|
36
|
+
template <> \
|
|
37
|
+
XSIMD_INLINE double NAME<double>() noexcept \
|
|
38
|
+
{ \
|
|
39
|
+
return DOUBLE; \
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#define XSIMD_DEFINE_CONSTANT_HEX(NAME, SINGLE, DOUBLE) \
|
|
43
|
+
template <class T> \
|
|
44
|
+
XSIMD_INLINE T NAME() noexcept \
|
|
45
|
+
{ \
|
|
46
|
+
return T(NAME<typename T::value_type>()); \
|
|
47
|
+
} \
|
|
48
|
+
template <> \
|
|
49
|
+
XSIMD_INLINE float NAME<float>() noexcept \
|
|
50
|
+
{ \
|
|
51
|
+
return bit_cast<float>((uint32_t)SINGLE); \
|
|
52
|
+
} \
|
|
53
|
+
template <> \
|
|
54
|
+
XSIMD_INLINE double NAME<double>() noexcept \
|
|
55
|
+
{ \
|
|
56
|
+
return bit_cast<double>((uint64_t)DOUBLE); \
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Under fast-math, GCC might replace signmask (minus zero) by zero
|
|
60
|
+
#if defined(__FAST_MATH__) && defined(__GNUC__) && !defined(__clang__)
|
|
61
|
+
#pragma GCC push_options
|
|
62
|
+
#pragma GCC optimize("signed-zeros")
|
|
63
|
+
#endif
|
|
64
|
+
#ifndef __FAST_MATH__
|
|
65
|
+
XSIMD_DEFINE_CONSTANT(infinity, (std::numeric_limits<float>::infinity()), (std::numeric_limits<double>::infinity()))
|
|
66
|
+
XSIMD_DEFINE_CONSTANT(minusinfinity, (-infinity<float>()), (-infinity<double>()))
|
|
67
|
+
#endif
|
|
68
|
+
XSIMD_DEFINE_CONSTANT(invlog_2, 1.442695040888963407359924681001892137426645954152986f, 1.442695040888963407359924681001892137426645954152986)
|
|
69
|
+
XSIMD_DEFINE_CONSTANT_HEX(invlog_2hi, 0x3fb8b000, 0x3ff7154765200000)
|
|
70
|
+
XSIMD_DEFINE_CONSTANT_HEX(invlog_2lo, 0xb9389ad4, 0x3de705fc2eefa200)
|
|
71
|
+
XSIMD_DEFINE_CONSTANT(invlog10_2, 3.32192809488736234787031942949f, 3.32192809488736234787031942949)
|
|
72
|
+
XSIMD_DEFINE_CONSTANT_HEX(invpi, 0x3ea2f983, 0x3fd45f306dc9c883)
|
|
73
|
+
XSIMD_DEFINE_CONSTANT(log_2, 0.6931471805599453094172321214581765680755001343602553f, 0.6931471805599453094172321214581765680755001343602553)
|
|
74
|
+
XSIMD_DEFINE_CONSTANT_HEX(log_2hi, 0x3f318000, 0x3fe62e42fee00000)
|
|
75
|
+
XSIMD_DEFINE_CONSTANT_HEX(log_2lo, 0xb95e8083, 0x3dea39ef35793c76)
|
|
76
|
+
XSIMD_DEFINE_CONSTANT_HEX(log10_2hi, 0x3e9a0000, 0x3fd3440000000000)
|
|
77
|
+
XSIMD_DEFINE_CONSTANT_HEX(log10_2lo, 0x39826a14, 0x3ed3509f79fef312)
|
|
78
|
+
XSIMD_DEFINE_CONSTANT_HEX(logeps, 0xc17f1402, 0xc04205966f2b4f12)
|
|
79
|
+
XSIMD_DEFINE_CONSTANT_HEX(logpi, 0x3f928682, 0x3ff250d048e7a1bd)
|
|
80
|
+
XSIMD_DEFINE_CONSTANT_HEX(logsqrt2pi, 0x3f6b3f8e, 0x3fed67f1c864beb5)
|
|
81
|
+
XSIMD_DEFINE_CONSTANT(maxflint, 16777216.0f, 9007199254740992.0)
|
|
82
|
+
XSIMD_DEFINE_CONSTANT(maxlog, 88.3762626647949f, 709.78271289338400)
|
|
83
|
+
XSIMD_DEFINE_CONSTANT(maxlog2, 127.0f, 1023.)
|
|
84
|
+
XSIMD_DEFINE_CONSTANT(maxlog10, 38.23080825805664f, 308.2547155599167)
|
|
85
|
+
XSIMD_DEFINE_CONSTANT_HEX(mediumpi, 0x43490fdb, 0x412921fb54442d18)
|
|
86
|
+
XSIMD_DEFINE_CONSTANT(minlog, -88.3762626647949f, -708.3964185322641)
|
|
87
|
+
XSIMD_DEFINE_CONSTANT(minlog2, -127.0f, -1023.)
|
|
88
|
+
XSIMD_DEFINE_CONSTANT(minlog10, -37.89999771118164f, -308.2547155599167)
|
|
89
|
+
XSIMD_DEFINE_CONSTANT_HEX(nan, 0xffffffff, 0xffffffffffffffff)
|
|
90
|
+
XSIMD_DEFINE_CONSTANT_HEX(oneosqrteps, 0x453504f3, 0x4190000000000000)
|
|
91
|
+
XSIMD_DEFINE_CONSTANT_HEX(oneotwoeps, 0x4a800000, 0x4320000000000000)
|
|
92
|
+
XSIMD_DEFINE_CONSTANT_HEX(pi, 0x40490fdb, 0x400921fb54442d18)
|
|
93
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio_2lo, 0xb33bbd2e, 0x3c91a62633145c07)
|
|
94
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio_4lo, 0xb2bbbd2e, 0x3c81a62633145c07)
|
|
95
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2, 0x3fc90fdb, 0x3ff921fb54442d18)
|
|
96
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_1, 0x3fc90f80, 0x3ff921fb54400000)
|
|
97
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_1t, 0x37354443, 0x3dd0b4611a626331)
|
|
98
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_2, 0x37354400, 0x3dd0b4611a600000)
|
|
99
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_2t, 0x2e85a308, 0x3ba3198a2e037073)
|
|
100
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_3, 0x2e85a300, 0x3ba3198a2e000000)
|
|
101
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio2_3t, 0x248d3132, 0x397b839a252049c1)
|
|
102
|
+
XSIMD_DEFINE_CONSTANT_HEX(pio4, 0x3f490fdb, 0x3fe921fb54442d18)
|
|
103
|
+
XSIMD_DEFINE_CONSTANT_HEX(signmask, 0x80000000, 0x8000000000000000)
|
|
104
|
+
XSIMD_DEFINE_CONSTANT(smallestposval, std::numeric_limits<float>::min(), std::numeric_limits<double>::min())
|
|
105
|
+
XSIMD_DEFINE_CONSTANT_HEX(sqrt_2pi, 0x40206c99, 0x40040d931ff62704)
|
|
106
|
+
XSIMD_DEFINE_CONSTANT_HEX(sqrteps, 0x39b504f3, 0x3e50000000000000)
|
|
107
|
+
XSIMD_DEFINE_CONSTANT_HEX(tanpio8, 0x3ed413cd, 0x3fda827999fcef31)
|
|
108
|
+
XSIMD_DEFINE_CONSTANT_HEX(tan3pio8, 0x401a827a, 0x4003504f333f9de6)
|
|
109
|
+
XSIMD_DEFINE_CONSTANT_HEX(twentypi, 0x427b53d1, 0x404f6a7a2955385e)
|
|
110
|
+
XSIMD_DEFINE_CONSTANT_HEX(twoopi, 0x3f22f983, 0x3fe45f306dc9c883)
|
|
111
|
+
XSIMD_DEFINE_CONSTANT(twotonmb, 8388608.0f, 4503599627370496.0)
|
|
112
|
+
XSIMD_DEFINE_CONSTANT_HEX(twotonmbo3, 0x3ba14518, 0x3ed428a2f98d7286)
|
|
113
|
+
#if defined(__FAST_MATH__) && defined(__GNUC__) && !defined(__clang__)
|
|
114
|
+
#pragma GCC pop_options
|
|
115
|
+
#endif
|
|
116
|
+
|
|
117
|
+
#undef XSIMD_DEFINE_CONSTANT
|
|
118
|
+
#undef XSIMD_DEFINE_CONSTANT_HEX
|
|
119
|
+
|
|
120
|
+
template <class T>
|
|
121
|
+
constexpr T allbits() noexcept;
|
|
122
|
+
|
|
123
|
+
template <class T>
|
|
124
|
+
constexpr as_integer_t<T> mask1frexp() noexcept;
|
|
125
|
+
|
|
126
|
+
template <class T>
|
|
127
|
+
constexpr as_integer_t<T> mask2frexp() noexcept;
|
|
128
|
+
|
|
129
|
+
template <class T>
|
|
130
|
+
constexpr as_integer_t<T> maxexponent() noexcept;
|
|
131
|
+
|
|
132
|
+
template <class T>
|
|
133
|
+
constexpr as_integer_t<T> maxexponentm1() noexcept;
|
|
134
|
+
|
|
135
|
+
template <class T>
|
|
136
|
+
constexpr int32_t nmb() noexcept;
|
|
137
|
+
|
|
138
|
+
template <class T>
|
|
139
|
+
constexpr T zero() noexcept;
|
|
140
|
+
|
|
141
|
+
template <class T>
|
|
142
|
+
constexpr T minvalue() noexcept;
|
|
143
|
+
|
|
144
|
+
template <class T>
|
|
145
|
+
constexpr T maxvalue() noexcept;
|
|
146
|
+
|
|
147
|
+
/**************************
|
|
148
|
+
* allbits implementation *
|
|
149
|
+
**************************/
|
|
150
|
+
|
|
151
|
+
namespace detail
|
|
152
|
+
{
|
|
153
|
+
template <class T, bool = std::is_integral<T>::value>
|
|
154
|
+
struct allbits_impl
|
|
155
|
+
{
|
|
156
|
+
static constexpr T get_value() noexcept
|
|
157
|
+
{
|
|
158
|
+
return T(~0);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
template <class T>
|
|
163
|
+
struct allbits_impl<T, false>
|
|
164
|
+
{
|
|
165
|
+
static constexpr T get_value() noexcept
|
|
166
|
+
{
|
|
167
|
+
return nan<T>();
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
template <class T>
|
|
173
|
+
XSIMD_INLINE constexpr T allbits() noexcept
|
|
174
|
+
{
|
|
175
|
+
return T(detail::allbits_impl<typename T::value_type>::get_value());
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/*****************************
|
|
179
|
+
* mask1frexp implementation *
|
|
180
|
+
*****************************/
|
|
181
|
+
|
|
182
|
+
template <class T>
|
|
183
|
+
XSIMD_INLINE constexpr as_integer_t<T> mask1frexp() noexcept
|
|
184
|
+
{
|
|
185
|
+
return as_integer_t<T>(mask1frexp<typename T::value_type>());
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
template <>
|
|
189
|
+
XSIMD_INLINE constexpr int32_t mask1frexp<float>() noexcept
|
|
190
|
+
{
|
|
191
|
+
return 0x7f800000;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
template <>
|
|
195
|
+
XSIMD_INLINE constexpr int64_t mask1frexp<double>() noexcept
|
|
196
|
+
{
|
|
197
|
+
return 0x7ff0000000000000;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/*****************************
|
|
201
|
+
* mask2frexp implementation *
|
|
202
|
+
*****************************/
|
|
203
|
+
|
|
204
|
+
template <class T>
|
|
205
|
+
XSIMD_INLINE constexpr as_integer_t<T> mask2frexp() noexcept
|
|
206
|
+
{
|
|
207
|
+
return as_integer_t<T>(mask2frexp<typename T::value_type>());
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
template <>
|
|
211
|
+
XSIMD_INLINE constexpr int32_t mask2frexp<float>() noexcept
|
|
212
|
+
{
|
|
213
|
+
return 0x3f000000;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
template <>
|
|
217
|
+
XSIMD_INLINE constexpr int64_t mask2frexp<double>() noexcept
|
|
218
|
+
{
|
|
219
|
+
return 0x3fe0000000000000;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/******************************
|
|
223
|
+
* maxexponent implementation *
|
|
224
|
+
******************************/
|
|
225
|
+
|
|
226
|
+
template <class T>
|
|
227
|
+
XSIMD_INLINE constexpr as_integer_t<T> maxexponent() noexcept
|
|
228
|
+
{
|
|
229
|
+
return as_integer_t<T>(maxexponent<typename T::value_type>());
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
template <>
|
|
233
|
+
XSIMD_INLINE constexpr int32_t maxexponent<float>() noexcept
|
|
234
|
+
{
|
|
235
|
+
return 127;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
template <>
|
|
239
|
+
XSIMD_INLINE constexpr int64_t maxexponent<double>() noexcept
|
|
240
|
+
{
|
|
241
|
+
return 1023;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/******************************
|
|
245
|
+
* maxexponent implementation *
|
|
246
|
+
******************************/
|
|
247
|
+
|
|
248
|
+
template <class T>
|
|
249
|
+
XSIMD_INLINE constexpr as_integer_t<T> maxexponentm1() noexcept
|
|
250
|
+
{
|
|
251
|
+
return as_integer_t<T>(maxexponentm1<typename T::value_type>());
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
template <>
|
|
255
|
+
XSIMD_INLINE constexpr int32_t maxexponentm1<float>() noexcept
|
|
256
|
+
{
|
|
257
|
+
return 126;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
template <>
|
|
261
|
+
XSIMD_INLINE constexpr int64_t maxexponentm1<double>() noexcept
|
|
262
|
+
{
|
|
263
|
+
return 1022;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**********************
|
|
267
|
+
* nmb implementation *
|
|
268
|
+
**********************/
|
|
269
|
+
|
|
270
|
+
template <class T>
|
|
271
|
+
XSIMD_INLINE constexpr int32_t nmb() noexcept
|
|
272
|
+
{
|
|
273
|
+
return nmb<typename T::value_type>();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
template <>
|
|
277
|
+
XSIMD_INLINE constexpr int32_t nmb<float>() noexcept
|
|
278
|
+
{
|
|
279
|
+
return 23;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
template <>
|
|
283
|
+
XSIMD_INLINE constexpr int32_t nmb<double>() noexcept
|
|
284
|
+
{
|
|
285
|
+
return 52;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/***********************
|
|
289
|
+
* zero implementation *
|
|
290
|
+
***********************/
|
|
291
|
+
|
|
292
|
+
template <class T>
|
|
293
|
+
XSIMD_INLINE constexpr T zero() noexcept
|
|
294
|
+
{
|
|
295
|
+
return T(typename T::value_type(0));
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/***************************
|
|
299
|
+
* minvalue implementation *
|
|
300
|
+
***************************/
|
|
301
|
+
|
|
302
|
+
namespace detail
|
|
303
|
+
{
|
|
304
|
+
template <class T>
|
|
305
|
+
struct minvalue_impl
|
|
306
|
+
{
|
|
307
|
+
static constexpr T get_value() noexcept
|
|
308
|
+
{
|
|
309
|
+
return std::numeric_limits<typename T::value_type>::min();
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
template <class T>
|
|
314
|
+
struct minvalue_common
|
|
315
|
+
{
|
|
316
|
+
static constexpr T get_value() noexcept
|
|
317
|
+
{
|
|
318
|
+
return std::numeric_limits<T>::min();
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
template <>
|
|
323
|
+
struct minvalue_impl<int8_t> : minvalue_common<int8_t>
|
|
324
|
+
{
|
|
325
|
+
};
|
|
326
|
+
template <>
|
|
327
|
+
struct minvalue_impl<uint8_t> : minvalue_common<uint8_t>
|
|
328
|
+
{
|
|
329
|
+
};
|
|
330
|
+
template <>
|
|
331
|
+
struct minvalue_impl<int16_t> : minvalue_common<int16_t>
|
|
332
|
+
{
|
|
333
|
+
};
|
|
334
|
+
template <>
|
|
335
|
+
struct minvalue_impl<uint16_t> : minvalue_common<uint16_t>
|
|
336
|
+
{
|
|
337
|
+
};
|
|
338
|
+
template <>
|
|
339
|
+
struct minvalue_impl<int32_t> : minvalue_common<int32_t>
|
|
340
|
+
{
|
|
341
|
+
};
|
|
342
|
+
template <>
|
|
343
|
+
struct minvalue_impl<uint32_t> : minvalue_common<uint32_t>
|
|
344
|
+
{
|
|
345
|
+
};
|
|
346
|
+
template <>
|
|
347
|
+
struct minvalue_impl<int64_t> : minvalue_common<int64_t>
|
|
348
|
+
{
|
|
349
|
+
};
|
|
350
|
+
template <>
|
|
351
|
+
struct minvalue_impl<uint64_t> : minvalue_common<uint64_t>
|
|
352
|
+
{
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
template <>
|
|
356
|
+
struct minvalue_impl<float>
|
|
357
|
+
{
|
|
358
|
+
XSIMD_INLINE static float get_value() noexcept
|
|
359
|
+
{
|
|
360
|
+
return bit_cast<float>((uint32_t)0xff7fffff);
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
template <>
|
|
365
|
+
struct minvalue_impl<double>
|
|
366
|
+
{
|
|
367
|
+
XSIMD_INLINE static double get_value() noexcept
|
|
368
|
+
{
|
|
369
|
+
return bit_cast<double>((uint64_t)0xffefffffffffffff);
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
template <class T>
|
|
375
|
+
constexpr T minvalue() noexcept
|
|
376
|
+
{
|
|
377
|
+
return T(detail::minvalue_impl<typename T::value_type>::get_value());
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/***************************
|
|
381
|
+
* maxvalue implementation *
|
|
382
|
+
***************************/
|
|
383
|
+
|
|
384
|
+
template <class T>
|
|
385
|
+
constexpr T maxvalue() noexcept
|
|
386
|
+
{
|
|
387
|
+
return T(std::numeric_limits<typename T::value_type>::max());
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
#endif
|