react-native-executorch 0.4.7 → 0.5.1-rc.0
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/android/CMakeLists.txt +17 -0
- package/android/build.gradle +76 -13
- package/android/libs/classes.jar +0 -0
- package/android/src/main/cpp/CMakeLists.txt +73 -0
- package/android/src/main/cpp/ETInstallerModule.cpp +76 -0
- package/android/src/main/cpp/ETInstallerModule.h +43 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/ETInstaller.kt +66 -0
- package/android/src/main/java/com/swmansion/rnexecutorch/LLM.kt +3 -3
- package/android/src/main/java/com/swmansion/rnexecutorch/RnExecutorchPackage.kt +7 -113
- package/common/ada/ada.cpp +17406 -0
- package/common/ada/ada.h +10274 -0
- package/common/pfft/pfft.c +2205 -0
- package/common/pfft/pfft.h +185 -0
- package/common/rnexecutorch/Log.h +489 -0
- package/common/rnexecutorch/RnExecutorchInstaller.cpp +78 -0
- package/common/rnexecutorch/RnExecutorchInstaller.h +112 -0
- package/common/rnexecutorch/TokenizerModule.cpp +52 -0
- package/common/rnexecutorch/TokenizerModule.h +26 -0
- package/common/rnexecutorch/data_processing/FFT.cpp +21 -0
- package/common/rnexecutorch/data_processing/FFT.h +23 -0
- package/common/rnexecutorch/data_processing/FileUtils.h +30 -0
- package/common/rnexecutorch/data_processing/ImageProcessing.cpp +240 -0
- package/common/rnexecutorch/data_processing/ImageProcessing.h +55 -0
- package/common/rnexecutorch/data_processing/Numerical.cpp +82 -0
- package/common/rnexecutorch/data_processing/Numerical.h +23 -0
- package/common/rnexecutorch/data_processing/base64.cpp +110 -0
- package/common/rnexecutorch/data_processing/base64.h +46 -0
- package/common/rnexecutorch/data_processing/dsp.cpp +65 -0
- package/common/rnexecutorch/data_processing/dsp.h +12 -0
- package/common/rnexecutorch/host_objects/JSTensorViewIn.h +12 -0
- package/common/rnexecutorch/host_objects/JSTensorViewOut.h +22 -0
- package/common/rnexecutorch/host_objects/JsiConversions.h +410 -0
- package/common/rnexecutorch/host_objects/ModelHostObject.h +239 -0
- package/common/rnexecutorch/jsi/JsiHostObject.cpp +108 -0
- package/common/rnexecutorch/jsi/JsiHostObject.h +87 -0
- package/common/rnexecutorch/jsi/OwningArrayBuffer.h +40 -0
- package/common/rnexecutorch/jsi/Promise.cpp +20 -0
- package/common/rnexecutorch/jsi/Promise.h +69 -0
- package/common/rnexecutorch/jsi/RuntimeAwareCache.h +58 -0
- package/common/rnexecutorch/jsi/RuntimeLifecycleMonitor.cpp +53 -0
- package/common/rnexecutorch/jsi/RuntimeLifecycleMonitor.h +35 -0
- package/common/rnexecutorch/metaprogramming/ConstructorHelpers.h +131 -0
- package/common/rnexecutorch/metaprogramming/FunctionHelpers.h +50 -0
- package/common/rnexecutorch/metaprogramming/TypeConcepts.h +37 -0
- package/common/rnexecutorch/models/BaseModel.cpp +181 -0
- package/common/rnexecutorch/models/BaseModel.h +47 -0
- package/common/rnexecutorch/models/EncoderDecoderBase.cpp +21 -0
- package/common/rnexecutorch/models/EncoderDecoderBase.h +31 -0
- package/common/rnexecutorch/models/classification/Classification.cpp +72 -0
- package/common/rnexecutorch/models/classification/Classification.h +26 -0
- package/{ios/RnExecutorch/models/classification/Constants.mm → common/rnexecutorch/models/classification/Constants.h} +7 -2
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.cpp +27 -0
- package/common/rnexecutorch/models/embeddings/BaseEmbeddings.h +17 -0
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.cpp +45 -0
- package/common/rnexecutorch/models/embeddings/image/ImageEmbeddings.h +23 -0
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.cpp +61 -0
- package/common/rnexecutorch/models/embeddings/text/TextEmbeddings.h +26 -0
- package/{ios/RnExecutorch/models/image_segmentation/Constants.mm → common/rnexecutorch/models/image_segmentation/Constants.h} +7 -2
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.cpp +173 -0
- package/common/rnexecutorch/models/image_segmentation/ImageSegmentation.h +43 -0
- package/{ios/RnExecutorch/utils/Constants.mm → common/rnexecutorch/models/object_detection/Constants.h} +9 -2
- package/common/rnexecutorch/models/object_detection/ObjectDetection.cpp +82 -0
- package/common/rnexecutorch/models/object_detection/ObjectDetection.h +31 -0
- package/{ios/RnExecutorch/utils/ObjectDetectionUtils.mm → common/rnexecutorch/models/object_detection/Utils.cpp} +10 -30
- package/common/rnexecutorch/models/object_detection/Utils.h +17 -0
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.cpp +88 -0
- package/common/rnexecutorch/models/ocr/CTCLabelConverter.h +29 -0
- package/common/rnexecutorch/models/ocr/Constants.h +34 -0
- package/common/rnexecutorch/models/ocr/Detector.cpp +102 -0
- package/common/rnexecutorch/models/ocr/Detector.h +30 -0
- package/common/rnexecutorch/models/ocr/DetectorUtils.cpp +703 -0
- package/common/rnexecutorch/models/ocr/DetectorUtils.h +80 -0
- package/common/rnexecutorch/models/ocr/OCR.cpp +52 -0
- package/common/rnexecutorch/models/ocr/OCR.h +36 -0
- package/common/rnexecutorch/models/ocr/RecognitionHandler.cpp +107 -0
- package/common/rnexecutorch/models/ocr/RecognitionHandler.h +40 -0
- package/common/rnexecutorch/models/ocr/RecognitionHandlerUtils.cpp +153 -0
- package/common/rnexecutorch/models/ocr/RecognitionHandlerUtils.h +72 -0
- package/common/rnexecutorch/models/ocr/Recognizer.cpp +80 -0
- package/common/rnexecutorch/models/ocr/Recognizer.h +36 -0
- package/common/rnexecutorch/models/ocr/RecognizerUtils.cpp +202 -0
- package/common/rnexecutorch/models/ocr/RecognizerUtils.h +70 -0
- package/common/rnexecutorch/models/ocr/Types.h +37 -0
- package/common/rnexecutorch/models/speech_to_text/MoonshineStrategy.cpp +31 -0
- package/common/rnexecutorch/models/speech_to_text/MoonshineStrategy.h +21 -0
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.cpp +70 -0
- package/common/rnexecutorch/models/speech_to_text/SpeechToText.h +31 -0
- package/common/rnexecutorch/models/speech_to_text/SpeechToTextStrategy.h +26 -0
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.cpp +38 -0
- package/common/rnexecutorch/models/speech_to_text/WhisperStrategy.h +25 -0
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.cpp +55 -0
- package/common/rnexecutorch/models/style_transfer/StyleTransfer.h +29 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.cpp +92 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalDetector.h +49 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.cpp +180 -0
- package/common/rnexecutorch/models/vertical_ocr/VerticalOCR.h +78 -0
- package/common/rnexecutorch/tests/LogTest.cpp +530 -0
- package/common/rnexecutorch/tests/README.md +20 -0
- package/common/rnexecutorch/tests/run_all_tests.sh +14 -0
- package/common/rnexecutorch/tests/run_test.sh +18 -0
- package/ios/ExecutorchLib.xcframework/Info.plist +4 -4
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib +0 -0
- package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist +0 -0
- package/ios/RnExecutorch/ETInstaller.h +8 -0
- package/ios/RnExecutorch/ETInstaller.mm +56 -0
- package/ios/RnExecutorch/utils/Conversions.h +8 -9
- package/ios/RnExecutorch/utils/Numerical.h +2 -0
- package/ios/RnExecutorch.xcodeproj/project.pbxproj +73 -0
- package/lib/common/Logger.d.ts +8 -0
- package/lib/common/Logger.js +19 -0
- package/lib/constants/modelUrls.d.ts +89 -0
- package/lib/constants/modelUrls.js +116 -0
- package/lib/constants/sttDefaults.js +66 -0
- package/lib/controllers/LLMController.js +210 -0
- package/lib/controllers/OCRController.js +65 -0
- package/lib/controllers/SpeechToTextController.d.ts +52 -0
- package/lib/controllers/SpeechToTextController.js +343 -0
- package/lib/hooks/natural_language_processing/useSpeechToText.js +44 -0
- package/lib/index.d.ts +50 -0
- package/{src/index.tsx → lib/index.js} +22 -10
- package/lib/module/Error.js +8 -6
- package/lib/module/Error.js.map +1 -1
- package/lib/module/common/Logger.js +23 -0
- package/lib/module/common/Logger.js.map +1 -0
- package/lib/module/constants/llmDefaults.js +8 -0
- package/lib/module/constants/llmDefaults.js.map +1 -1
- package/lib/module/constants/modelUrls.js +300 -84
- package/lib/module/constants/modelUrls.js.map +1 -1
- package/lib/module/constants/ocr/models.js +181 -286
- package/lib/module/constants/ocr/models.js.map +1 -1
- package/lib/module/constants/ocr/symbols.js +63 -63
- package/lib/module/constants/sttDefaults.js +12 -10
- package/lib/module/constants/sttDefaults.js.map +1 -1
- package/lib/module/controllers/LLMController.js +17 -11
- package/lib/module/controllers/LLMController.js.map +1 -1
- package/lib/module/controllers/OCRController.js +16 -9
- package/lib/module/controllers/OCRController.js.map +1 -1
- package/lib/module/controllers/SpeechToTextController.js +32 -19
- package/lib/module/controllers/SpeechToTextController.js.map +1 -1
- package/lib/module/controllers/VerticalOCRController.js +16 -9
- package/lib/module/controllers/VerticalOCRController.js.map +1 -1
- package/lib/module/hooks/computer_vision/useClassification.js +5 -5
- package/lib/module/hooks/computer_vision/useClassification.js.map +1 -1
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js +13 -0
- package/lib/module/hooks/computer_vision/useImageEmbeddings.js.map +1 -0
- package/lib/module/hooks/computer_vision/useImageSegmentation.js +4 -4
- package/lib/module/hooks/computer_vision/useImageSegmentation.js.map +1 -1
- package/lib/module/hooks/computer_vision/useOCR.js +14 -15
- package/lib/module/hooks/computer_vision/useOCR.js.map +1 -1
- package/lib/module/hooks/computer_vision/useObjectDetection.js +5 -5
- package/lib/module/hooks/computer_vision/useObjectDetection.js.map +1 -1
- package/lib/module/hooks/computer_vision/useStyleTransfer.js +5 -5
- package/lib/module/hooks/computer_vision/useStyleTransfer.js.map +1 -1
- package/lib/module/hooks/computer_vision/useVerticalOCR.js +16 -17
- package/lib/module/hooks/computer_vision/useVerticalOCR.js.map +1 -1
- package/lib/module/hooks/general/useExecutorchModule.js +5 -3
- package/lib/module/hooks/general/useExecutorchModule.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useLLM.js +22 -25
- package/lib/module/hooks/natural_language_processing/useLLM.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js +16 -14
- package/lib/module/hooks/natural_language_processing/useSpeechToText.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js +4 -5
- package/lib/module/hooks/natural_language_processing/useTextEmbeddings.js.map +1 -1
- package/lib/module/hooks/natural_language_processing/useTokenizer.js +20 -19
- package/lib/module/hooks/natural_language_processing/useTokenizer.js.map +1 -1
- package/lib/module/hooks/useNonStaticModule.js +52 -0
- package/lib/module/hooks/useNonStaticModule.js.map +1 -0
- package/lib/module/index.js +16 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/BaseModule.js +6 -3
- package/lib/module/modules/BaseModule.js.map +1 -1
- package/lib/module/modules/BaseNonStaticModule.js +17 -0
- package/lib/module/modules/BaseNonStaticModule.js.map +1 -0
- package/lib/module/modules/computer_vision/ClassificationModule.js +13 -8
- package/lib/module/modules/computer_vision/ClassificationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js +19 -0
- package/lib/module/modules/computer_vision/ImageEmbeddingsModule.js.map +1 -0
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js +21 -19
- package/lib/module/modules/computer_vision/ImageSegmentationModule.js.map +1 -1
- package/lib/module/modules/computer_vision/OCRModule.js +13 -10
- package/lib/module/modules/computer_vision/OCRModule.js.map +1 -1
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js +13 -8
- package/lib/module/modules/computer_vision/ObjectDetectionModule.js.map +1 -1
- package/lib/module/modules/computer_vision/StyleTransferModule.js +13 -8
- package/lib/module/modules/computer_vision/StyleTransferModule.js.map +1 -1
- package/lib/module/modules/computer_vision/VerticalOCRModule.js +15 -10
- package/lib/module/modules/computer_vision/VerticalOCRModule.js.map +1 -1
- package/lib/module/modules/general/ExecutorchModule.js +10 -36
- package/lib/module/modules/general/ExecutorchModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/LLMModule.js +18 -22
- package/lib/module/modules/natural_language_processing/LLMModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js +27 -16
- package/lib/module/modules/natural_language_processing/SpeechToTextModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js +15 -8
- package/lib/module/modules/natural_language_processing/TextEmbeddingsModule.js.map +1 -1
- package/lib/module/modules/natural_language_processing/TokenizerModule.js +20 -14
- package/lib/module/modules/natural_language_processing/TokenizerModule.js.map +1 -1
- package/lib/module/native/NativeETInstaller.js +5 -0
- package/lib/module/native/NativeETInstaller.js.map +1 -0
- package/lib/module/native/RnExecutorchModules.js +2 -11
- package/lib/module/native/RnExecutorchModules.js.map +1 -1
- package/lib/module/types/common.js +25 -8
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/types/stt.js +6 -0
- package/lib/module/types/stt.js.map +1 -1
- package/lib/module/utils/ResourceFetcher.js +276 -114
- package/lib/module/utils/ResourceFetcher.js.map +1 -1
- package/lib/module/utils/ResourceFetcherUtils.js +155 -0
- package/lib/module/utils/ResourceFetcherUtils.js.map +1 -0
- package/lib/module/utils/llm.js +41 -1
- package/lib/module/utils/llm.js.map +1 -1
- package/lib/modules/natural_language_processing/SpeechToTextModule.d.ts +14 -0
- package/lib/modules/natural_language_processing/SpeechToTextModule.js +30 -0
- package/lib/modules/natural_language_processing/TokenizerModule.js +29 -0
- package/lib/native/RnExecutorchModules.d.ts +3 -0
- package/lib/native/RnExecutorchModules.js +16 -0
- package/lib/typescript/Error.d.ts +2 -0
- package/lib/typescript/Error.d.ts.map +1 -1
- package/lib/typescript/common/Logger.d.ts +9 -0
- package/lib/typescript/common/Logger.d.ts.map +1 -0
- package/lib/typescript/constants/llmDefaults.d.ts +1 -0
- package/lib/typescript/constants/llmDefaults.d.ts.map +1 -1
- package/lib/typescript/constants/modelUrls.d.ts +223 -79
- package/lib/typescript/constants/modelUrls.d.ts.map +1 -1
- package/lib/typescript/constants/ocr/models.d.ts +882 -284
- package/lib/typescript/constants/ocr/models.d.ts.map +1 -1
- package/lib/typescript/constants/sttDefaults.d.ts +1 -0
- package/lib/typescript/constants/sttDefaults.d.ts.map +1 -1
- package/lib/typescript/controllers/LLMController.d.ts +3 -4
- package/lib/typescript/controllers/LLMController.d.ts.map +1 -1
- package/lib/typescript/controllers/OCRController.d.ts +5 -6
- package/lib/typescript/controllers/OCRController.d.ts.map +1 -1
- package/lib/typescript/controllers/SpeechToTextController.d.ts +11 -6
- package/lib/typescript/controllers/SpeechToTextController.d.ts.map +1 -1
- package/lib/typescript/controllers/VerticalOCRController.d.ts +5 -6
- package/lib/typescript/controllers/VerticalOCRController.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts +8 -6
- package/lib/typescript/hooks/computer_vision/useClassification.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useImageEmbeddings.d.ts +16 -0
- package/lib/typescript/hooks/computer_vision/useImageEmbeddings.d.ts.map +1 -0
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts +5 -3
- package/lib/typescript/hooks/computer_vision/useImageSegmentation.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts +4 -4
- package/lib/typescript/hooks/computer_vision/useOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts +5 -3
- package/lib/typescript/hooks/computer_vision/useObjectDetection.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts +5 -3
- package/lib/typescript/hooks/computer_vision/useStyleTransfer.d.ts.map +1 -1
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts +3 -5
- package/lib/typescript/hooks/computer_vision/useVerticalOCR.d.ts.map +1 -1
- package/lib/typescript/hooks/general/useExecutorchModule.d.ts +1 -1
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts +6 -4
- package/lib/typescript/hooks/natural_language_processing/useLLM.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts +7 -5
- package/lib/typescript/hooks/natural_language_processing/useSpeechToText.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts +9 -5
- package/lib/typescript/hooks/natural_language_processing/useTextEmbeddings.d.ts.map +1 -1
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts +6 -4
- package/lib/typescript/hooks/natural_language_processing/useTokenizer.d.ts.map +1 -1
- package/lib/typescript/hooks/useNonStaticModule.d.ts +21 -0
- package/lib/typescript/hooks/useNonStaticModule.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +18 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/modules/BaseModule.d.ts +1 -1
- package/lib/typescript/modules/BaseModule.d.ts.map +1 -1
- package/lib/typescript/modules/BaseNonStaticModule.d.ts +10 -0
- package/lib/typescript/modules/BaseNonStaticModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts +6 -6
- package/lib/typescript/modules/computer_vision/ClassificationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts +9 -0
- package/lib/typescript/modules/computer_vision/ImageEmbeddingsModule.d.ts.map +1 -0
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts +8 -28
- package/lib/typescript/modules/computer_vision/ImageSegmentationModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts +8 -7
- package/lib/typescript/modules/computer_vision/OCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts +7 -5
- package/lib/typescript/modules/computer_vision/ObjectDetectionModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts +6 -5
- package/lib/typescript/modules/computer_vision/StyleTransferModule.d.ts.map +1 -1
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts +7 -8
- package/lib/typescript/modules/computer_vision/VerticalOCRModule.d.ts.map +1 -1
- package/lib/typescript/modules/general/ExecutorchModule.d.ts +5 -8
- package/lib/typescript/modules/general/ExecutorchModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts +16 -16
- package/lib/typescript/modules/natural_language_processing/LLMModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts +19 -9
- package/lib/typescript/modules/natural_language_processing/SpeechToTextModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts +7 -5
- package/lib/typescript/modules/natural_language_processing/TextEmbeddingsModule.d.ts.map +1 -1
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts +10 -9
- package/lib/typescript/modules/natural_language_processing/TokenizerModule.d.ts.map +1 -1
- package/lib/typescript/native/{NativeStyleTransfer.d.ts → NativeETInstaller.d.ts} +2 -3
- package/lib/typescript/native/NativeETInstaller.d.ts.map +1 -0
- package/lib/typescript/native/RnExecutorchModules.d.ts +3 -21
- package/lib/typescript/native/RnExecutorchModules.d.ts.map +1 -1
- package/lib/typescript/types/common.d.ts +30 -2
- package/lib/typescript/types/common.d.ts.map +1 -1
- package/lib/typescript/types/stt.d.ts +5 -1
- package/lib/typescript/types/stt.d.ts.map +1 -1
- package/lib/typescript/utils/ResourceFetcher.d.ts +18 -10
- package/lib/typescript/utils/ResourceFetcher.d.ts.map +1 -1
- package/lib/typescript/utils/ResourceFetcherUtils.d.ts +55 -0
- package/lib/typescript/utils/ResourceFetcherUtils.d.ts.map +1 -0
- package/lib/typescript/utils/llm.d.ts +4 -0
- package/lib/typescript/utils/llm.d.ts.map +1 -1
- package/lib/utils/ResourceFetcherUtils.js +119 -0
- package/lib/utils/llm.js +72 -0
- package/package.json +22 -64
- package/react-native-executorch.podspec +75 -3
- package/src/Error.ts +8 -10
- package/src/common/Logger.ts +25 -0
- package/src/constants/llmDefaults.ts +11 -0
- package/src/constants/modelUrls.ts +365 -168
- package/src/constants/ocr/models.ts +826 -395
- package/src/constants/ocr/symbols.ts +63 -63
- package/src/constants/sttDefaults.ts +14 -18
- package/src/controllers/LLMController.ts +28 -18
- package/src/controllers/OCRController.ts +24 -15
- package/src/controllers/SpeechToTextController.ts +53 -40
- package/src/controllers/VerticalOCRController.ts +24 -14
- package/src/hooks/computer_vision/useClassification.ts +10 -11
- package/src/hooks/computer_vision/useImageEmbeddings.ts +15 -0
- package/src/hooks/computer_vision/useImageSegmentation.ts +5 -8
- package/src/hooks/computer_vision/useOCR.ts +29 -21
- package/src/hooks/computer_vision/useObjectDetection.ts +6 -9
- package/src/hooks/computer_vision/useStyleTransfer.ts +6 -6
- package/src/hooks/computer_vision/useVerticalOCR.ts +30 -27
- package/src/hooks/general/useExecutorchModule.ts +3 -3
- package/src/hooks/natural_language_processing/useLLM.ts +38 -28
- package/src/hooks/natural_language_processing/useSpeechToText.ts +34 -26
- package/src/hooks/natural_language_processing/useTextEmbeddings.ts +11 -11
- package/src/hooks/natural_language_processing/useTokenizer.ts +22 -22
- package/src/hooks/useNonStaticModule.ts +74 -0
- package/src/index.ts +108 -0
- package/src/modules/BaseModule.ts +9 -3
- package/src/modules/BaseNonStaticModule.ts +26 -0
- package/src/modules/computer_vision/ClassificationModule.ts +20 -11
- package/src/modules/computer_vision/ImageEmbeddingsModule.ts +26 -0
- package/src/modules/computer_vision/ImageSegmentationModule.ts +35 -27
- package/src/modules/computer_vision/OCRModule.ts +23 -15
- package/src/modules/computer_vision/ObjectDetectionModule.ts +24 -11
- package/src/modules/computer_vision/StyleTransferModule.ts +20 -11
- package/src/modules/computer_vision/VerticalOCRModule.ts +25 -21
- package/src/modules/general/ExecutorchModule.ts +18 -48
- package/src/modules/natural_language_processing/LLMModule.ts +27 -30
- package/src/modules/natural_language_processing/SpeechToTextModule.ts +42 -37
- package/src/modules/natural_language_processing/TextEmbeddingsModule.ts +27 -12
- package/src/modules/natural_language_processing/TokenizerModule.ts +27 -17
- package/src/native/NativeETInstaller.ts +8 -0
- package/src/native/RnExecutorchModules.ts +4 -46
- package/src/types/common.ts +40 -12
- package/src/types/stt.ts +5 -1
- package/src/utils/ResourceFetcher.ts +338 -119
- package/src/utils/ResourceFetcherUtils.ts +186 -0
- package/src/utils/llm.ts +65 -1
- package/third-party/android/libs/executorch/arm64-v8a/libexecutorch.so +0 -0
- package/third-party/android/libs/executorch/x86_64/libexecutorch.so +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_core.a +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_features2d.a +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_highgui.a +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_imgproc.a +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_photo.a +0 -0
- package/third-party/android/libs/opencv/arm64-v8a/libopencv_video.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_core.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_features2d.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_highgui.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_imgproc.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_photo.a +0 -0
- package/third-party/android/libs/opencv/x86_64/libopencv_video.a +0 -0
- package/third-party/android/libs/opencv-third-party/arm64-v8a/libkleidicv.a +0 -0
- package/third-party/android/libs/opencv-third-party/arm64-v8a/libkleidicv_hal.a +0 -0
- package/third-party/android/libs/opencv-third-party/arm64-v8a/libkleidicv_thread.a +0 -0
- package/third-party/include/c10/macros/Export.h +163 -0
- package/third-party/include/c10/macros/Macros.h +497 -0
- package/third-party/include/c10/util/BFloat16-inl.h +342 -0
- package/third-party/include/c10/util/BFloat16-math.h +266 -0
- package/third-party/include/c10/util/BFloat16.h +125 -0
- package/third-party/include/c10/util/Half-inl.h +347 -0
- package/third-party/include/c10/util/Half.h +416 -0
- package/third-party/include/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/include/c10/util/bit_cast.h +43 -0
- package/third-party/include/c10/util/floating_point_utils.h +33 -0
- package/third-party/include/c10/util/irange.h +107 -0
- package/third-party/include/executorch/ExecuTorch.h +13 -0
- package/third-party/include/executorch/ExecuTorchError.h +16 -0
- package/third-party/include/executorch/ExecuTorchLog.h +76 -0
- package/third-party/include/executorch/ExecuTorchModule.h +286 -0
- package/third-party/include/executorch/ExecuTorchTensor.h +742 -0
- package/third-party/include/executorch/ExecuTorchValue.h +219 -0
- package/third-party/include/executorch/extension/module/module.h +492 -0
- package/third-party/include/executorch/extension/tensor/tensor.h +13 -0
- package/third-party/include/executorch/extension/tensor/tensor_accessor.h +190 -0
- package/third-party/include/executorch/extension/tensor/tensor_ptr.h +347 -0
- package/third-party/include/executorch/extension/tensor/tensor_ptr_maker.h +653 -0
- package/third-party/include/executorch/runtime/backend/backend_execution_context.h +71 -0
- package/third-party/include/executorch/runtime/backend/backend_init_context.h +72 -0
- package/third-party/include/executorch/runtime/backend/interface.h +166 -0
- package/third-party/include/executorch/runtime/core/array_ref.h +235 -0
- package/third-party/include/executorch/runtime/core/data_loader.h +136 -0
- package/third-party/include/executorch/runtime/core/defines.h +20 -0
- package/third-party/include/executorch/runtime/core/error.h +229 -0
- package/third-party/include/executorch/runtime/core/evalue.h +521 -0
- package/third-party/include/executorch/runtime/core/event_tracer.h +565 -0
- package/third-party/include/executorch/runtime/core/event_tracer_hooks.h +323 -0
- package/third-party/include/executorch/runtime/core/event_tracer_hooks_delegate.h +197 -0
- package/third-party/include/executorch/runtime/core/exec_aten/exec_aten.h +147 -0
- package/third-party/include/executorch/runtime/core/exec_aten/util/dim_order_util.h +263 -0
- package/third-party/include/executorch/runtime/core/exec_aten/util/scalar_type_util.h +1331 -0
- package/third-party/include/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +21 -0
- package/third-party/include/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +69 -0
- package/third-party/include/executorch/runtime/core/exec_aten/util/tensor_util.h +1250 -0
- package/third-party/include/executorch/runtime/core/freeable_buffer.h +107 -0
- package/third-party/include/executorch/runtime/core/hierarchical_allocator.h +107 -0
- package/third-party/include/executorch/runtime/core/memory_allocator.h +198 -0
- package/third-party/include/executorch/runtime/core/named_data_map.h +86 -0
- package/third-party/include/executorch/runtime/core/portable_type/bfloat16.h +27 -0
- package/third-party/include/executorch/runtime/core/portable_type/bfloat16_math.h +14 -0
- package/third-party/include/executorch/runtime/core/portable_type/bits_types.h +83 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +163 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +497 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +342 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +266 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +125 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +347 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/Half.h +416 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +43 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +33 -0
- package/third-party/include/executorch/runtime/core/portable_type/c10/c10/util/irange.h +107 -0
- package/third-party/include/executorch/runtime/core/portable_type/complex.h +44 -0
- package/third-party/include/executorch/runtime/core/portable_type/device.h +70 -0
- package/third-party/include/executorch/runtime/core/portable_type/half.h +27 -0
- package/third-party/include/executorch/runtime/core/portable_type/optional.h +36 -0
- package/third-party/include/executorch/runtime/core/portable_type/qint_types.h +83 -0
- package/third-party/include/executorch/runtime/core/portable_type/scalar.h +110 -0
- package/third-party/include/executorch/runtime/core/portable_type/scalar_type.h +154 -0
- package/third-party/include/executorch/runtime/core/portable_type/string_view.h +29 -0
- package/third-party/include/executorch/runtime/core/portable_type/tensor.h +142 -0
- package/third-party/include/executorch/runtime/core/portable_type/tensor_impl.h +261 -0
- package/third-party/include/executorch/runtime/core/portable_type/tensor_options.h +60 -0
- package/third-party/include/executorch/runtime/core/result.h +258 -0
- package/third-party/include/executorch/runtime/core/span.h +93 -0
- package/third-party/include/executorch/runtime/core/tag.h +71 -0
- package/third-party/include/executorch/runtime/core/tensor_layout.h +79 -0
- package/third-party/include/executorch/runtime/core/tensor_shape_dynamism.h +39 -0
- package/third-party/include/executorch/runtime/executor/memory_manager.h +113 -0
- package/third-party/include/executorch/runtime/executor/method.h +387 -0
- package/third-party/include/executorch/runtime/executor/method_meta.h +251 -0
- package/third-party/include/executorch/runtime/executor/program.h +320 -0
- package/third-party/include/executorch/runtime/executor/pte_data_map.h +144 -0
- package/third-party/include/executorch/runtime/executor/tensor_parser.h +156 -0
- package/third-party/include/executorch/runtime/kernel/kernel_runtime_context.h +122 -0
- package/third-party/include/executorch/runtime/kernel/operator_registry.h +278 -0
- package/third-party/include/executorch/runtime/platform/abort.h +36 -0
- package/third-party/include/executorch/runtime/platform/assert.h +119 -0
- package/third-party/include/executorch/runtime/platform/clock.h +43 -0
- package/third-party/include/executorch/runtime/platform/compat_unistd.h +75 -0
- package/third-party/include/executorch/runtime/platform/compiler.h +191 -0
- package/third-party/include/executorch/runtime/platform/log.h +177 -0
- package/third-party/include/executorch/runtime/platform/platform.h +133 -0
- package/third-party/include/executorch/runtime/platform/profiler.h +292 -0
- package/third-party/include/executorch/runtime/platform/runtime.h +35 -0
- package/third-party/include/executorch/runtime/platform/system.h +49 -0
- package/third-party/include/executorch/runtime/platform/types.h +24 -0
- package/third-party/include/executorch/schema/extended_header.h +76 -0
- package/third-party/include/opencv2/core/affine.hpp +676 -0
- package/third-party/include/opencv2/core/async.hpp +107 -0
- package/third-party/include/opencv2/core/base.hpp +735 -0
- package/third-party/include/opencv2/core/bindings_utils.hpp +279 -0
- package/third-party/include/opencv2/core/bufferpool.hpp +39 -0
- package/third-party/include/opencv2/core/check.hpp +231 -0
- package/third-party/include/opencv2/core/core.hpp +55 -0
- package/third-party/include/opencv2/core/core_c.h +3261 -0
- package/third-party/include/opencv2/core/cv_cpu_dispatch.h +404 -0
- package/third-party/include/opencv2/core/cv_cpu_helper.h +856 -0
- package/third-party/include/opencv2/core/cvdef.h +1003 -0
- package/third-party/include/opencv2/core/cvstd.hpp +196 -0
- package/third-party/include/opencv2/core/cvstd.inl.hpp +188 -0
- package/third-party/include/opencv2/core/cvstd_wrapper.hpp +187 -0
- package/third-party/include/opencv2/core/detail/async_promise.hpp +73 -0
- package/third-party/include/opencv2/core/detail/dispatch_helper.impl.hpp +48 -0
- package/third-party/include/opencv2/core/detail/exception_ptr.hpp +24 -0
- package/third-party/include/opencv2/core/dualquaternion.hpp +1054 -0
- package/third-party/include/opencv2/core/dualquaternion.inl.hpp +464 -0
- package/third-party/include/opencv2/core/eigen.hpp +405 -0
- package/third-party/include/opencv2/core/fast_math.hpp +433 -0
- package/third-party/include/opencv2/core/hal/hal.hpp +451 -0
- package/third-party/include/opencv2/core/hal/interface.h +191 -0
- package/third-party/include/opencv2/core/hal/intrin.hpp +1222 -0
- package/third-party/include/opencv2/core/hal/intrin_avx.hpp +3378 -0
- package/third-party/include/opencv2/core/hal/intrin_avx512.hpp +3688 -0
- package/third-party/include/opencv2/core/hal/intrin_cpp.hpp +3446 -0
- package/third-party/include/opencv2/core/hal/intrin_forward.hpp +195 -0
- package/third-party/include/opencv2/core/hal/intrin_lasx.hpp +3243 -0
- package/third-party/include/opencv2/core/hal/intrin_lsx.hpp +2671 -0
- package/third-party/include/opencv2/core/hal/intrin_math.hpp +772 -0
- package/third-party/include/opencv2/core/hal/intrin_msa.hpp +1973 -0
- package/third-party/include/opencv2/core/hal/intrin_neon.hpp +2710 -0
- package/third-party/include/opencv2/core/hal/intrin_rvv071.hpp +3452 -0
- package/third-party/include/opencv2/core/hal/intrin_rvv_scalable.hpp +2559 -0
- package/third-party/include/opencv2/core/hal/intrin_sse.hpp +3528 -0
- package/third-party/include/opencv2/core/hal/intrin_sse_em.hpp +175 -0
- package/third-party/include/opencv2/core/hal/intrin_vsx.hpp +1756 -0
- package/third-party/include/opencv2/core/hal/intrin_wasm.hpp +2911 -0
- package/third-party/include/opencv2/core/hal/msa_macros.h +2079 -0
- package/third-party/include/opencv2/core/hal/simd_utils.impl.hpp +313 -0
- package/third-party/include/opencv2/core/mat.hpp +3842 -0
- package/third-party/include/opencv2/core/mat.inl.hpp +2753 -0
- package/third-party/include/opencv2/core/matx.hpp +603 -0
- package/third-party/include/opencv2/core/matx.inl.hpp +1132 -0
- package/third-party/include/opencv2/core/neon_utils.hpp +127 -0
- package/third-party/include/opencv2/core/operations.hpp +610 -0
- package/third-party/include/opencv2/core/optim.hpp +362 -0
- package/third-party/include/opencv2/core/parallel/backend/parallel_for.openmp.hpp +66 -0
- package/third-party/include/opencv2/core/parallel/backend/parallel_for.tbb.hpp +148 -0
- package/third-party/include/opencv2/core/parallel/parallel_backend.hpp +108 -0
- package/third-party/include/opencv2/core/persistence.hpp +1321 -0
- package/third-party/include/opencv2/core/quaternion.hpp +1889 -0
- package/third-party/include/opencv2/core/quaternion.inl.hpp +907 -0
- package/third-party/include/opencv2/core/saturate.hpp +347 -0
- package/third-party/include/opencv2/core/simd_intrinsics.hpp +90 -0
- package/third-party/include/opencv2/core/softfloat.hpp +657 -0
- package/third-party/include/opencv2/core/sse_utils.hpp +861 -0
- package/third-party/include/opencv2/core/traits.hpp +417 -0
- package/third-party/include/opencv2/core/types.hpp +2368 -0
- package/third-party/include/opencv2/core/types_c.h +2064 -0
- package/third-party/include/opencv2/core/utility.hpp +1296 -0
- package/third-party/include/opencv2/core/utils/allocator_stats.hpp +31 -0
- package/third-party/include/opencv2/core/utils/allocator_stats.impl.hpp +111 -0
- package/third-party/include/opencv2/core/utils/filesystem.hpp +91 -0
- package/third-party/include/opencv2/core/utils/fp_control_utils.hpp +70 -0
- package/third-party/include/opencv2/core/utils/instrumentation.hpp +127 -0
- package/third-party/include/opencv2/core/utils/logger.defines.hpp +50 -0
- package/third-party/include/opencv2/core/utils/logger.hpp +258 -0
- package/third-party/include/opencv2/core/utils/logtag.hpp +27 -0
- package/third-party/include/opencv2/core/utils/tls.hpp +230 -0
- package/third-party/include/opencv2/core/utils/trace.hpp +281 -0
- package/third-party/include/opencv2/core/version.hpp +29 -0
- package/third-party/include/opencv2/core/vsx_utils.hpp +1115 -0
- package/third-party/include/opencv2/core.hpp +3699 -0
- package/third-party/include/opencv2/cvconfig.h +155 -0
- package/third-party/include/opencv2/dnn/dnn.hpp +51 -0
- package/third-party/include/opencv2/dnn.hpp +17 -0
- package/third-party/include/opencv2/features2d/features2d.hpp +55 -0
- package/third-party/include/opencv2/features2d/hal/interface.h +32 -0
- package/third-party/include/opencv2/features2d.hpp +1756 -0
- package/third-party/include/opencv2/highgui/highgui.hpp +113 -0
- package/third-party/include/opencv2/highgui.hpp +17 -0
- package/third-party/include/opencv2/imgproc/bindings.hpp +34 -0
- package/third-party/include/opencv2/imgproc/detail/gcgraph.hpp +355 -0
- package/third-party/include/opencv2/imgproc/detail/legacy.hpp +35 -0
- package/third-party/include/opencv2/imgproc/hal/hal.hpp +246 -0
- package/third-party/include/opencv2/imgproc/hal/interface.h +52 -0
- package/third-party/include/opencv2/imgproc/imgproc.hpp +55 -0
- package/third-party/include/opencv2/imgproc/imgproc_c.h +1261 -0
- package/third-party/include/opencv2/imgproc/segmentation.hpp +168 -0
- package/third-party/include/opencv2/imgproc/types_c.h +632 -0
- package/third-party/include/opencv2/imgproc.hpp +5956 -0
- package/third-party/include/opencv2/opencv.hpp +102 -0
- package/third-party/include/opencv2/opencv_modules.hpp +19 -0
- package/third-party/include/opencv2/photo/legacy/constants_c.h +10 -0
- package/third-party/include/opencv2/photo/photo.hpp +55 -0
- package/third-party/include/opencv2/photo.hpp +975 -0
- package/third-party/include/opencv2/video/background_segm.hpp +341 -0
- package/third-party/include/opencv2/video/detail/tracking.detail.hpp +435 -0
- package/third-party/include/opencv2/video/legacy/constants_c.h +15 -0
- package/third-party/include/opencv2/video/tracking.hpp +1014 -0
- package/third-party/include/opencv2/video/video.hpp +55 -0
- package/third-party/include/opencv2/video.hpp +65 -0
- package/third-party/include/tokenizers-cpp/tokenizers_c.h +61 -0
- package/third-party/include/tokenizers-cpp/tokenizers_cpp.h +118 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.h +27 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/ETModel.mm +249 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.h +14 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/HuggingFaceTokenizer.mm +80 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.h +32 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Exported/LLaMARunner.mm +95 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/InputType.h +12 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/Utils.hpp +217 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.cpp +11 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/model/Model.h +11 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/irunner.h +48 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/runner.cpp +278 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/runner.h +67 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/stats.h +164 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/text_decoder_runner.cpp +65 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/text_decoder_runner.h +105 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/text_prefiller.cpp +91 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/text_prefiller.h +51 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/text_token_generator.h +162 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/runner/util.h +108 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/sampler/sampler.cpp +193 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/sampler/sampler.h +64 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/base64.h +202 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.cpp +313 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/bpe_tokenizer.h +57 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.cpp +78 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/llama_tiktoken.h +23 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.cpp +427 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tiktoken.h +87 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib/tokenizer/tokenizer.h +76 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.pbxproj +683 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/project.xcworkspace/xcuserdata/norbertklockiewicz.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/third-party/ios/ExecutorchLib/ExecutorchLib.xcodeproj/xcuserdata/norbertklockiewicz.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/third-party/ios/ExecutorchLib/build.sh +44 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64/libbackend_coreml_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_coreml.xcframework/ios-arm64-simulator/libbackend_coreml_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64/libbackend_mps_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_mps.xcframework/ios-arm64-simulator/libbackend_mps_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64/libbackend_xnnpack_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/backend_xnnpack.xcframework/ios-arm64-simulator/libbackend_xnnpack_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/Info.plist +47 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Export.h +163 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/macros/Macros.h +497 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-inl.h +342 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16-math.h +266 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/BFloat16.h +125 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half-inl.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/Half.h +416 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/bit_cast.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/floating_point_utils.h +33 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/c10/util/irange.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorch.h +13 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchError.h +16 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchLog.h +76 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchModule.h +286 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchTensor.h +742 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/ExecuTorchValue.h +219 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/module/module.h +492 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor.h +13 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_accessor.h +190 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/extension/tensor/tensor_ptr_maker.h +653 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_execution_context.h +71 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/backend_init_context.h +72 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/backend/interface.h +166 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/array_ref.h +235 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/data_loader.h +136 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/defines.h +20 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/error.h +229 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/evalue.h +521 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer.h +565 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks.h +323 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +197 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/exec_aten.h +147 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +263 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +1331 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +21 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +69 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +1250 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/freeable_buffer.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/hierarchical_allocator.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/memory_allocator.h +198 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/named_data_map.h +86 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16.h +27 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +14 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/bits_types.h +83 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +163 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +497 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +342 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +266 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +125 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +416 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +33 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/complex.h +44 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/device.h +70 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/half.h +27 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/optional.h +36 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/qint_types.h +83 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar.h +110 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/scalar_type.h +154 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/string_view.h +29 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor.h +142 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_impl.h +261 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/portable_type/tensor_options.h +60 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/result.h +258 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/span.h +93 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tag.h +71 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_layout.h +79 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/core/tensor_shape_dynamism.h +39 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/memory_manager.h +113 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method.h +387 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/method_meta.h +251 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/program.h +320 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/pte_data_map.h +144 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/executor/tensor_parser.h +156 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/kernel_runtime_context.h +122 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/kernel/operator_registry.h +278 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/abort.h +36 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/assert.h +119 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/clock.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compat_unistd.h +75 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/compiler.h +191 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/log.h +177 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/platform.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/profiler.h +292 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/runtime.h +35 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/system.h +49 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/runtime/platform/types.h +24 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/executorch/schema/extended_header.h +76 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/Headers/module.modulemap +5 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64/libexecutorch_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Export.h +163 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/macros/Macros.h +497 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-inl.h +342 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16-math.h +266 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/BFloat16.h +125 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half-inl.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/Half.h +416 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/bit_cast.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/floating_point_utils.h +33 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/c10/util/irange.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorch.h +13 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchError.h +16 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchLog.h +76 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchModule.h +286 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchTensor.h +742 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/ExecuTorchValue.h +219 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/module/module.h +492 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor.h +13 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_accessor.h +190 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/extension/tensor/tensor_ptr_maker.h +653 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_execution_context.h +71 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/backend_init_context.h +72 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/backend/interface.h +166 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/array_ref.h +235 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/data_loader.h +136 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/defines.h +20 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/error.h +229 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/evalue.h +521 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer.h +565 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks.h +323 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/event_tracer_hooks_delegate.h +197 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/exec_aten.h +147 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/dim_order_util.h +263 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/scalar_type_util.h +1331 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_dimension_limit.h +21 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h +69 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/exec_aten/util/tensor_util.h +1250 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/freeable_buffer.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/hierarchical_allocator.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/memory_allocator.h +198 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/named_data_map.h +86 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16.h +27 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bfloat16_math.h +14 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/bits_types.h +83 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Export.h +163 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h +497 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-inl.h +342 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16-math.h +266 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/BFloat16.h +125 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half-inl.h +347 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/Half.h +416 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/TypeSafeSignMath.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/bit_cast.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/floating_point_utils.h +33 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/c10/c10/util/irange.h +107 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/complex.h +44 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/device.h +70 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/half.h +27 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/optional.h +36 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/qint_types.h +83 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar.h +110 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/scalar_type.h +154 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/string_view.h +29 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor.h +142 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_impl.h +261 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/portable_type/tensor_options.h +60 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/result.h +258 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/span.h +93 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tag.h +71 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_layout.h +79 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/core/tensor_shape_dynamism.h +39 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/memory_manager.h +113 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method.h +387 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/method_meta.h +251 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/program.h +320 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/pte_data_map.h +144 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/executor/tensor_parser.h +156 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/kernel_runtime_context.h +122 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/kernel/operator_registry.h +278 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/abort.h +36 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/assert.h +119 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/clock.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compat_unistd.h +75 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/compiler.h +191 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/log.h +177 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/platform.h +133 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/profiler.h +292 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/runtime.h +35 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/system.h +49 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/runtime/platform/types.h +24 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/executorch/schema/extended_header.h +76 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/Headers/module.modulemap +5 -0
- package/third-party/ios/ExecutorchLib/frameworks/executorch.xcframework/ios-arm64-simulator/libexecutorch_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64/libkernels_custom_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_custom.xcframework/ios-arm64-simulator/libkernels_custom_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64/libkernels_optimized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_optimized.xcframework/ios-arm64-simulator/libkernels_optimized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64/libkernels_portable_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_portable.xcframework/ios-arm64-simulator/libkernels_portable_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64/libkernels_quantized_ios.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/kernels_quantized.xcframework/ios-arm64-simulator/libkernels_quantized_simulator.a +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/Info.plist +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/bitmap256.h +82 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/filtered_re2.h +111 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/pod_array.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter.h +130 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prefilter_tree.h +139 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/prog.h +483 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/re2.h +994 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/regexp.h +692 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/set.h +85 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_array.h +367 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/sparse_set.h +241 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/stringpiece.h +205 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_casefold.h +78 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/unicode_groups.h +64 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Headers/walker-inl.h +235 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/Info.plist +26 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64/re2.framework/re2 +0 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/bitmap256.h +82 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/filtered_re2.h +111 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/pod_array.h +43 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter.h +130 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prefilter_tree.h +139 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/prog.h +483 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/re2.h +994 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/regexp.h +692 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/set.h +85 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_array.h +367 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/sparse_set.h +241 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/stringpiece.h +205 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_casefold.h +78 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/unicode_groups.h +64 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Headers/walker-inl.h +235 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/Info.plist +26 -0
- package/third-party/ios/ExecutorchLib/frameworks/re2.xcframework/ios-arm64-simulator/re2.framework/re2 +0 -0
- package/third-party/ios/ios.toolchain.cmake +1122 -0
- package/LICENSE +0 -79
- package/README.md +0 -148
- package/android/src/main/java/com/swmansion/rnexecutorch/Classification.kt +0 -64
- package/android/src/main/java/com/swmansion/rnexecutorch/ETModule.kt +0 -90
- package/android/src/main/java/com/swmansion/rnexecutorch/ImageSegmentation.kt +0 -58
- package/android/src/main/java/com/swmansion/rnexecutorch/OCR.kt +0 -90
- package/android/src/main/java/com/swmansion/rnexecutorch/ObjectDetection.kt +0 -64
- package/android/src/main/java/com/swmansion/rnexecutorch/SpeechToText.kt +0 -91
- package/android/src/main/java/com/swmansion/rnexecutorch/StyleTransfer.kt +0 -54
- package/android/src/main/java/com/swmansion/rnexecutorch/TextEmbeddings.kt +0 -51
- package/android/src/main/java/com/swmansion/rnexecutorch/Tokenizer.kt +0 -86
- package/android/src/main/java/com/swmansion/rnexecutorch/VerticalOCR.kt +0 -179
- package/android/src/main/java/com/swmansion/rnexecutorch/models/BaseModel.kt +0 -54
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsModel.kt +0 -48
- package/android/src/main/java/com/swmansion/rnexecutorch/models/TextEmbeddings/TextEmbeddingsUtils.kt +0 -37
- package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/ClassificationModel.kt +0 -46
- package/android/src/main/java/com/swmansion/rnexecutorch/models/classification/Constants.kt +0 -1005
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/Constants.kt +0 -26
- package/android/src/main/java/com/swmansion/rnexecutorch/models/imageSegmentation/ImageSegmentationModel.kt +0 -142
- package/android/src/main/java/com/swmansion/rnexecutorch/models/objectDetection/SSDLiteLargeModel.kt +0 -74
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/Detector.kt +0 -82
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/RecognitionHandler.kt +0 -117
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/Recognizer.kt +0 -51
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/VerticalDetector.kt +0 -89
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/CTCLabelConverter.kt +0 -58
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/Constants.kt +0 -31
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/DetectorUtils.kt +0 -608
- package/android/src/main/java/com/swmansion/rnexecutorch/models/ocr/utils/RecognizerUtils.kt +0 -430
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/BaseS2TDecoder.kt +0 -39
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/BaseS2TModule.kt +0 -43
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/Moonshine.kt +0 -16
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/MoonshineDecoder.kt +0 -23
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/MoonshineEncoder.kt +0 -20
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/Whisper.kt +0 -16
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/WhisperDecoder.kt +0 -22
- package/android/src/main/java/com/swmansion/rnexecutorch/models/speechToText/WhisperEncoder.kt +0 -29
- package/android/src/main/java/com/swmansion/rnexecutorch/models/styleTransfer/StyleTransferModel.kt +0 -43
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ArrayUtils.kt +0 -87
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ETError.kt +0 -34
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ImageProcessor.kt +0 -237
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/Numerical.kt +0 -8
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/ObjectDetectionUtils.kt +0 -201
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/STFT.kt +0 -50
- package/android/src/main/java/com/swmansion/rnexecutorch/utils/TensorUtils.kt +0 -103
- package/ios/RnExecutorch/Classification.h +0 -5
- package/ios/RnExecutorch/Classification.mm +0 -54
- package/ios/RnExecutorch/ETModule.h +0 -5
- package/ios/RnExecutorch/ETModule.mm +0 -75
- package/ios/RnExecutorch/ImageSegmentation.h +0 -5
- package/ios/RnExecutorch/ImageSegmentation.mm +0 -60
- package/ios/RnExecutorch/OCR.h +0 -5
- package/ios/RnExecutorch/OCR.mm +0 -96
- package/ios/RnExecutorch/ObjectDetection.h +0 -5
- package/ios/RnExecutorch/ObjectDetection.mm +0 -56
- package/ios/RnExecutorch/SpeechToText.h +0 -5
- package/ios/RnExecutorch/SpeechToText.mm +0 -125
- package/ios/RnExecutorch/StyleTransfer.h +0 -5
- package/ios/RnExecutorch/StyleTransfer.mm +0 -55
- package/ios/RnExecutorch/TextEmbeddings.h +0 -5
- package/ios/RnExecutorch/TextEmbeddings.mm +0 -62
- package/ios/RnExecutorch/Tokenizer.h +0 -5
- package/ios/RnExecutorch/Tokenizer.mm +0 -83
- package/ios/RnExecutorch/VerticalOCR.h +0 -5
- package/ios/RnExecutorch/VerticalOCR.mm +0 -183
- package/ios/RnExecutorch/models/BaseModel.h +0 -21
- package/ios/RnExecutorch/models/BaseModel.mm +0 -43
- package/ios/RnExecutorch/models/classification/ClassificationModel.h +0 -10
- package/ios/RnExecutorch/models/classification/ClassificationModel.mm +0 -53
- package/ios/RnExecutorch/models/classification/Constants.h +0 -3
- package/ios/RnExecutorch/models/image_segmentation/Constants.h +0 -4
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.h +0 -10
- package/ios/RnExecutorch/models/image_segmentation/ImageSegmentationModel.mm +0 -146
- package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.hpp +0 -11
- package/ios/RnExecutorch/models/object_detection/SSDLiteLargeModel.mm +0 -64
- package/ios/RnExecutorch/models/ocr/Detector.h +0 -9
- package/ios/RnExecutorch/models/ocr/Detector.mm +0 -101
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.h +0 -16
- package/ios/RnExecutorch/models/ocr/RecognitionHandler.mm +0 -135
- package/ios/RnExecutorch/models/ocr/Recognizer.h +0 -8
- package/ios/RnExecutorch/models/ocr/Recognizer.mm +0 -77
- package/ios/RnExecutorch/models/ocr/VerticalDetector.h +0 -10
- package/ios/RnExecutorch/models/ocr/VerticalDetector.mm +0 -118
- package/ios/RnExecutorch/models/ocr/utils/CTCLabelConverter.h +0 -16
- package/ios/RnExecutorch/models/ocr/utils/CTCLabelConverter.mm +0 -80
- package/ios/RnExecutorch/models/ocr/utils/Constants.h +0 -26
- package/ios/RnExecutorch/models/ocr/utils/DetectorUtils.h +0 -31
- package/ios/RnExecutorch/models/ocr/utils/DetectorUtils.mm +0 -754
- package/ios/RnExecutorch/models/ocr/utils/OCRUtils.h +0 -10
- package/ios/RnExecutorch/models/ocr/utils/OCRUtils.mm +0 -67
- package/ios/RnExecutorch/models/ocr/utils/RecognizerUtils.h +0 -35
- package/ios/RnExecutorch/models/ocr/utils/RecognizerUtils.mm +0 -331
- package/ios/RnExecutorch/models/stt/Moonshine.hpp +0 -13
- package/ios/RnExecutorch/models/stt/Moonshine.mm +0 -64
- package/ios/RnExecutorch/models/stt/MoonshineDecoder.hpp +0 -16
- package/ios/RnExecutorch/models/stt/MoonshineDecoder.mm +0 -24
- package/ios/RnExecutorch/models/stt/MoonshineEncoder.hpp +0 -15
- package/ios/RnExecutorch/models/stt/MoonshineEncoder.mm +0 -18
- package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.hpp +0 -26
- package/ios/RnExecutorch/models/stt/SpeechToTextBaseModel.mm +0 -19
- package/ios/RnExecutorch/models/stt/Whisper.hpp +0 -12
- package/ios/RnExecutorch/models/stt/Whisper.mm +0 -68
- package/ios/RnExecutorch/models/stt/WhisperDecoder.hpp +0 -16
- package/ios/RnExecutorch/models/stt/WhisperDecoder.mm +0 -22
- package/ios/RnExecutorch/models/stt/WhisperEncoder.hpp +0 -15
- package/ios/RnExecutorch/models/stt/WhisperEncoder.mm +0 -21
- package/ios/RnExecutorch/models/style_transfer/StyleTransferModel.h +0 -11
- package/ios/RnExecutorch/models/style_transfer/StyleTransferModel.mm +0 -50
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.h +0 -15
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsModel.mm +0 -45
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.h +0 -8
- package/ios/RnExecutorch/models/text_embeddings/TextEmbeddingsUtils.mm +0 -49
- package/ios/RnExecutorch/utils/Constants.h +0 -8
- package/ios/RnExecutorch/utils/ObjectDetectionUtils.hpp +0 -23
- package/ios/RnExecutorch/utils/SFFT.hpp +0 -13
- package/ios/RnExecutorch/utils/SFFT.mm +0 -71
- package/lib/module/native/NativeClassification.js +0 -5
- package/lib/module/native/NativeClassification.js.map +0 -1
- package/lib/module/native/NativeETModule.js +0 -5
- package/lib/module/native/NativeETModule.js.map +0 -1
- package/lib/module/native/NativeImageSegmentation.js +0 -5
- package/lib/module/native/NativeImageSegmentation.js.map +0 -1
- package/lib/module/native/NativeOCR.js +0 -5
- package/lib/module/native/NativeOCR.js.map +0 -1
- package/lib/module/native/NativeObjectDetection.js +0 -5
- package/lib/module/native/NativeObjectDetection.js.map +0 -1
- package/lib/module/native/NativeSpeechToText.js +0 -5
- package/lib/module/native/NativeSpeechToText.js.map +0 -1
- package/lib/module/native/NativeStyleTransfer.js +0 -5
- package/lib/module/native/NativeStyleTransfer.js.map +0 -1
- package/lib/module/native/NativeTextEmbeddings.js +0 -5
- package/lib/module/native/NativeTextEmbeddings.js.map +0 -1
- package/lib/module/native/NativeTokenizer.js +0 -5
- package/lib/module/native/NativeTokenizer.js.map +0 -1
- package/lib/module/native/NativeVerticalOCR.js +0 -5
- package/lib/module/native/NativeVerticalOCR.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/typescript/native/NativeClassification.d.ts +0 -10
- package/lib/typescript/native/NativeClassification.d.ts.map +0 -1
- package/lib/typescript/native/NativeETModule.d.ts +0 -9
- package/lib/typescript/native/NativeETModule.d.ts.map +0 -1
- package/lib/typescript/native/NativeImageSegmentation.d.ts +0 -10
- package/lib/typescript/native/NativeImageSegmentation.d.ts.map +0 -1
- package/lib/typescript/native/NativeOCR.d.ts +0 -9
- package/lib/typescript/native/NativeOCR.d.ts.map +0 -1
- package/lib/typescript/native/NativeObjectDetection.d.ts +0 -9
- package/lib/typescript/native/NativeObjectDetection.d.ts.map +0 -1
- package/lib/typescript/native/NativeSpeechToText.d.ts +0 -12
- package/lib/typescript/native/NativeSpeechToText.d.ts.map +0 -1
- package/lib/typescript/native/NativeStyleTransfer.d.ts.map +0 -1
- package/lib/typescript/native/NativeTextEmbeddings.d.ts +0 -8
- package/lib/typescript/native/NativeTextEmbeddings.d.ts.map +0 -1
- package/lib/typescript/native/NativeTokenizer.d.ts +0 -12
- package/lib/typescript/native/NativeTokenizer.d.ts.map +0 -1
- package/lib/typescript/native/NativeVerticalOCR.d.ts +0 -9
- package/lib/typescript/native/NativeVerticalOCR.d.ts.map +0 -1
- package/src/native/NativeClassification.ts +0 -9
- package/src/native/NativeETModule.ts +0 -14
- package/src/native/NativeImageSegmentation.ts +0 -14
- package/src/native/NativeOCR.ts +0 -16
- package/src/native/NativeObjectDetection.ts +0 -10
- package/src/native/NativeSpeechToText.ts +0 -17
- package/src/native/NativeStyleTransfer.ts +0 -10
- package/src/native/NativeTextEmbeddings.ts +0 -9
- package/src/native/NativeTokenizer.ts +0 -13
- package/src/native/NativeVerticalOCR.ts +0 -16
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
#include "../Log.h"
|
|
2
|
+
#include <gtest/gtest.h>
|
|
3
|
+
|
|
4
|
+
#include <array>
|
|
5
|
+
#include <cmath>
|
|
6
|
+
#include <complex>
|
|
7
|
+
#include <deque>
|
|
8
|
+
#include <forward_list>
|
|
9
|
+
#include <fstream>
|
|
10
|
+
#include <functional>
|
|
11
|
+
#include <list>
|
|
12
|
+
#include <map>
|
|
13
|
+
#include <queue>
|
|
14
|
+
#include <regex>
|
|
15
|
+
#include <set>
|
|
16
|
+
#include <stack>
|
|
17
|
+
#include <stdexcept>
|
|
18
|
+
#include <string_view>
|
|
19
|
+
#include <unordered_map>
|
|
20
|
+
#include <unordered_set>
|
|
21
|
+
#include <vector>
|
|
22
|
+
|
|
23
|
+
namespace low_level_log_implementation {
|
|
24
|
+
|
|
25
|
+
class TestValue : public ::testing::Test {
|
|
26
|
+
protected:
|
|
27
|
+
TestValue() { oss << std::boolalpha; }
|
|
28
|
+
|
|
29
|
+
template <typename T>
|
|
30
|
+
void testValueViaComparison(const T &value,
|
|
31
|
+
const std::string &expectedOutput) {
|
|
32
|
+
printElement(oss, value);
|
|
33
|
+
EXPECT_EQ(oss.str(), expectedOutput);
|
|
34
|
+
clearOutputStream(oss);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
template <typename T>
|
|
38
|
+
void testValueViaRegex(const T &value, const std::string &expectedPattern) {
|
|
39
|
+
printElement(oss, value);
|
|
40
|
+
const std::regex pattern(expectedPattern);
|
|
41
|
+
EXPECT_TRUE(std::regex_search(oss.str(), pattern))
|
|
42
|
+
<< "Expected pattern not found: " << expectedPattern;
|
|
43
|
+
clearOutputStream(oss);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
void setOutputStreamPresicion(int precision) noexcept {
|
|
47
|
+
oss << std::fixed << std::setprecision(precision);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private:
|
|
51
|
+
std::ostringstream oss;
|
|
52
|
+
void clearOutputStream(std::ostringstream &os) noexcept {
|
|
53
|
+
oss.str("");
|
|
54
|
+
oss.clear();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
class DirectStreamableElementsPrintTest : public TestValue {};
|
|
59
|
+
|
|
60
|
+
class ContainerPrintTest : public TestValue {};
|
|
61
|
+
|
|
62
|
+
class NestedContainerPrintTest : public TestValue {};
|
|
63
|
+
|
|
64
|
+
class EgdeCasesPrintTest : public TestValue {};
|
|
65
|
+
|
|
66
|
+
class SmartPointerPrintTest : public TestValue {};
|
|
67
|
+
|
|
68
|
+
class OptionalPrintTest : public TestValue {};
|
|
69
|
+
|
|
70
|
+
class VariantPrintTest : public TestValue {};
|
|
71
|
+
|
|
72
|
+
class ErrorHandlingPrintTest : public TestValue {};
|
|
73
|
+
|
|
74
|
+
class FileSystemPrintTest : public TestValue {};
|
|
75
|
+
|
|
76
|
+
class UnsupportedLoggingTest : public ::testing::Test {};
|
|
77
|
+
|
|
78
|
+
class Point final {
|
|
79
|
+
public:
|
|
80
|
+
explicit constexpr Point(int x, int y) noexcept : x(x), y(y) {}
|
|
81
|
+
|
|
82
|
+
// Overloading the << operator to make Point directly streamable
|
|
83
|
+
friend std::ostream &operator<<(std::ostream &os, const Point &pt) noexcept {
|
|
84
|
+
os << "Point(" << pt.x << ", " << pt.y << ")";
|
|
85
|
+
return os;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private:
|
|
89
|
+
int x, y;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesIntegers) {
|
|
93
|
+
testValueViaComparison(123, "123");
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesStrings) {
|
|
97
|
+
testValueViaComparison(std::string("Hello World"), "Hello World");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesStringViews) {
|
|
101
|
+
testValueViaComparison(std::string_view("Hello World"), "Hello World");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesDoubles) {
|
|
105
|
+
constexpr double roughlyPi = 3.14159;
|
|
106
|
+
testValueViaComparison(roughlyPi, "3.14159");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesBooleans) {
|
|
110
|
+
testValueViaComparison(true, "true");
|
|
111
|
+
testValueViaComparison(false, "false");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesChar) {
|
|
115
|
+
testValueViaComparison('a', "a");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesCharPointer) {
|
|
119
|
+
const char *word = "Hello World";
|
|
120
|
+
testValueViaComparison(word, "Hello World");
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesComplexNumbers) {
|
|
124
|
+
using namespace std::complex_literals;
|
|
125
|
+
constexpr int presision = 1;
|
|
126
|
+
setOutputStreamPresicion(presision);
|
|
127
|
+
const std::complex<double> complexNumber = std::pow(1i, 2);
|
|
128
|
+
testValueViaComparison(complexNumber, "(-1.0,0.0)");
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesPoint) {
|
|
132
|
+
constexpr Point point(3, 4);
|
|
133
|
+
testValueViaComparison(point, "Point(3, 4)");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// log handles operator<<(&ostream) for std::pair
|
|
137
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesStdPair) {
|
|
138
|
+
std::pair<int, std::string> pairOfIntAndString = {42, "Hello"};
|
|
139
|
+
testValueViaComparison(pairOfIntAndString, "(42, Hello)");
|
|
140
|
+
|
|
141
|
+
// Testing edge cases with pairs
|
|
142
|
+
const std::pair<std::string, std::string> emptyPair = {"", ""};
|
|
143
|
+
testValueViaComparison(emptyPair, "(, )");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
TEST_F(DirectStreamableElementsPrintTest, handlesStaticArrayOfChars) {
|
|
147
|
+
constexpr char staticCharArray[] = "prompt tokens:";
|
|
148
|
+
testValueViaComparison(staticCharArray, "prompt tokens:");
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// log handles operator<<(&ostream) for std::tuple
|
|
152
|
+
TEST_F(DirectStreamableElementsPrintTest, HandlesStdTuple) {
|
|
153
|
+
const std::tuple<int, std::string, double> tupleOfDifferentTypes = {
|
|
154
|
+
42, "Tuple", 3.14};
|
|
155
|
+
testValueViaComparison(tupleOfDifferentTypes, "<42, Tuple, 3.14>");
|
|
156
|
+
|
|
157
|
+
// All empty or zero-initialized elements of tuple
|
|
158
|
+
const std::tuple<std::string, int, float> zeroInitializedTuple = {"", 0,
|
|
159
|
+
0.0f};
|
|
160
|
+
testValueViaComparison(zeroInitializedTuple, "<, 0, 0>");
|
|
161
|
+
|
|
162
|
+
// Nested tuple
|
|
163
|
+
const std::tuple<int, std::pair<std::string, bool>, float> nestedTuple = {
|
|
164
|
+
1, {"nested", true}, 2.5};
|
|
165
|
+
testValueViaComparison(nestedTuple, "<1, (nested, true), 2.5>");
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
TEST_F(ContainerPrintTest, VectorIntTest) {
|
|
169
|
+
const std::vector<int> vectorOfInts = {1, 2, 3, 4};
|
|
170
|
+
testValueViaComparison(vectorOfInts, "[1, 2, 3, 4]");
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
TEST_F(ContainerPrintTest, ListDoubleTest) {
|
|
174
|
+
const std::list<double> listOfDoubles = {1.1, 2.2, 3.3};
|
|
175
|
+
testValueViaComparison(listOfDoubles, "[1.1, 2.2, 3.3]");
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
TEST_F(ContainerPrintTest, DequeStringTest) {
|
|
179
|
+
const std::deque<std::string> dequeOfStrings = {"hello", "world"};
|
|
180
|
+
testValueViaComparison(dequeOfStrings, "[hello, world]");
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
TEST_F(ContainerPrintTest, SetTest) {
|
|
184
|
+
const std::set<std::string> setOfStrings = {"apple", "banana", "cherry"};
|
|
185
|
+
testValueViaComparison(setOfStrings,
|
|
186
|
+
"[apple, banana, cherry]"); // Note: Sets are sorted
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
TEST_F(ContainerPrintTest, MapTest) {
|
|
190
|
+
const std::map<std::string, int> mapStringToInt = {{"one", 1}, {"two", 2}};
|
|
191
|
+
testValueViaComparison(mapStringToInt, "[(one, 1), (two, 2)]");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
TEST_F(ContainerPrintTest, HandlesUnorderedSet) {
|
|
195
|
+
const std::unordered_set<int> unorderedSetOfInts = {4, 3, 2, 1};
|
|
196
|
+
// Pattern expects to find each element at least once in any order
|
|
197
|
+
testValueViaRegex(unorderedSetOfInts, R"(.*1.*2.*3.*4.*)");
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
TEST_F(ContainerPrintTest, HandlesUnorderedMultimap) {
|
|
201
|
+
const std::unordered_multimap<std::string, int> unorderedMultimapStringToInt =
|
|
202
|
+
{{"one", 1}, {"one", 2}, {"two", 2}};
|
|
203
|
+
std::string pattern = R"(\[\s*)";
|
|
204
|
+
// construct regex by adding each permutation
|
|
205
|
+
pattern += R"((?:\(one, 1\),\s*\(one, 2\),\s*\(two, 2\)|)";
|
|
206
|
+
pattern += R"(\(one, 1\),\s*\(two, 2\),\s*\(one, 2\)|)";
|
|
207
|
+
pattern += R"(\(one, 2\),\s*\(one, 1\),\s*\(two, 2\)|)";
|
|
208
|
+
pattern += R"(\(one, 2\),\s*\(two, 2\),\s*\(one, 1\)|)";
|
|
209
|
+
pattern += R"(\(two, 2\),\s*\(one, 1\),\s*\(one, 2\)|)";
|
|
210
|
+
pattern += R"(\(two, 2\),\s*\(one, 2\),\s*\(one, 1\))\s*\])";
|
|
211
|
+
|
|
212
|
+
testValueViaRegex(unorderedMultimapStringToInt, pattern);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
TEST_F(ContainerPrintTest, StackTest) {
|
|
216
|
+
std::stack<int> stackOfInts;
|
|
217
|
+
stackOfInts.push(1);
|
|
218
|
+
stackOfInts.push(2);
|
|
219
|
+
stackOfInts.push(3);
|
|
220
|
+
testValueViaComparison(stackOfInts, "[3, 2, 1]"); // LIFO order
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
TEST_F(ContainerPrintTest, QueueTest) {
|
|
224
|
+
std::queue<int> queueOfInts;
|
|
225
|
+
queueOfInts.push(1);
|
|
226
|
+
queueOfInts.push(2);
|
|
227
|
+
queueOfInts.push(3);
|
|
228
|
+
testValueViaComparison(queueOfInts, "[1, 2, 3]"); // FIFO order
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
TEST_F(ContainerPrintTest, PriorityQueueTest) {
|
|
232
|
+
std::priority_queue<int> priorityQueueOfInts;
|
|
233
|
+
priorityQueueOfInts.push(3);
|
|
234
|
+
priorityQueueOfInts.push(1);
|
|
235
|
+
priorityQueueOfInts.push(2);
|
|
236
|
+
testValueViaComparison(priorityQueueOfInts,
|
|
237
|
+
"[3, 2, 1]"); // Output based on internal max-heap
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
TEST_F(ContainerPrintTest, HandlesArray) {
|
|
241
|
+
constexpr std::array<int, 3> arrayOfInts = {1, 2, 3};
|
|
242
|
+
testValueViaComparison(arrayOfInts, "[1, 2, 3]");
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
TEST_F(ContainerPrintTest, HandlesForwardList) {
|
|
246
|
+
const std::forward_list<int> forwardListOfInts = {1, 2, 3};
|
|
247
|
+
testValueViaComparison(forwardListOfInts, "[1, 2, 3]");
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
TEST_F(ContainerPrintTest, HandlesMultiset) {
|
|
251
|
+
const std::multiset<int> multisetOfInts = {3, 2, 1, 2};
|
|
252
|
+
testValueViaComparison(multisetOfInts,
|
|
253
|
+
"[1, 2, 2, 3]"); // Multiset elements are sorted
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
TEST_F(ContainerPrintTest, HandlesMultimap) {
|
|
257
|
+
const std::multimap<std::string, int> multimapStringToInt = {
|
|
258
|
+
{"one", 1}, {"one", 2}, {"two", 2}};
|
|
259
|
+
testValueViaComparison(multimapStringToInt, "[(one, 1), (one, 2), (two, 2)]");
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
TEST_F(ContainerPrintTest, HandlesSpan) {
|
|
263
|
+
std::vector<int> vectorOfInts = {1, 2, 3, 4};
|
|
264
|
+
const std::span<int> spanOnVector(
|
|
265
|
+
vectorOfInts.begin(), vectorOfInts.end()); // Create a span from a vector
|
|
266
|
+
testValueViaComparison(spanOnVector, "[1, 2, 3, 4]");
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
TEST_F(ContainerPrintTest, HandlesStaticArray) {
|
|
270
|
+
constexpr int staticArray[] = {1, 2, 3, 4, 5};
|
|
271
|
+
testValueViaComparison(staticArray, "[1, 2, 3, 4, 5]");
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
TEST_F(NestedContainerPrintTest, HandlesListOfQueuesOfPoints) {
|
|
275
|
+
std::list<std::queue<Point>> listOfQueues = {std::queue<Point>()};
|
|
276
|
+
listOfQueues.front().push(Point(1, 1));
|
|
277
|
+
listOfQueues.front().push(Point(2, 2));
|
|
278
|
+
listOfQueues.front().push(Point(3, 3));
|
|
279
|
+
testValueViaComparison(listOfQueues,
|
|
280
|
+
"[[Point(1, 1), Point(2, 2), Point(3, 3)]]");
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
TEST_F(NestedContainerPrintTest, HandlesNestedVectors) {
|
|
284
|
+
const std::vector<std::vector<int>> nestedVector = {{1, 2}, {3, 4, 5}};
|
|
285
|
+
testValueViaComparison(nestedVector, "[[1, 2], [3, 4, 5]]");
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
TEST_F(NestedContainerPrintTest, HandlesMapOfVectorOfPoints) {
|
|
289
|
+
const std::map<std::string, std::vector<Point>> mapOfVectors = {
|
|
290
|
+
{"first", {Point(1, 2)}}, {"second", {Point(3, 4), Point(5, 6)}}};
|
|
291
|
+
testValueViaComparison(
|
|
292
|
+
mapOfVectors,
|
|
293
|
+
"[(first, [Point(1, 2)]), (second, [Point(3, 4), Point(5, 6)])]");
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
TEST_F(NestedContainerPrintTest, HandlesVectorOfMaps) {
|
|
297
|
+
const std::vector<std::map<std::string, int>> vectorOfMaps = {
|
|
298
|
+
{{"one", 1}, {"two", 2}}, {{"three", 3}, {"four", 4}}};
|
|
299
|
+
// word "three" is lexicographically smaller than "four"
|
|
300
|
+
testValueViaComparison(vectorOfMaps,
|
|
301
|
+
"[[(one, 1), (two, 2)], [(four, 4), (three, 3)]]");
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
TEST_F(NestedContainerPrintTest, HandlesComplexNestedStructures) {
|
|
305
|
+
const std::vector<std::map<std::string, std::list<std::set<int>>>>
|
|
306
|
+
complexNested = {{{"first", {{1, 2}, {3}}}, {"second", {{4}}}}};
|
|
307
|
+
testValueViaComparison(complexNested,
|
|
308
|
+
"[[(first, [[1, 2], [3]]), (second, [[4]])]]");
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
TEST_F(EgdeCasesPrintTest, HandleEmptyContainer) {
|
|
312
|
+
const std::vector<int> emptyVector{};
|
|
313
|
+
testValueViaComparison(emptyVector, "[]");
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
TEST_F(SmartPointerPrintTest, HandlesSharedPtr) {
|
|
317
|
+
const auto sharedPointer = std::make_shared<int>(10);
|
|
318
|
+
testValueViaComparison(sharedPointer, "10");
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
TEST_F(SmartPointerPrintTest, HandlesWeakPtr) {
|
|
322
|
+
auto sharedPointer = std::make_shared<int>(20);
|
|
323
|
+
std::weak_ptr<int> weakPointer = sharedPointer;
|
|
324
|
+
testValueViaComparison(weakPointer, "20");
|
|
325
|
+
|
|
326
|
+
sharedPointer.reset(); // Reset shared_ptr to make the weak_ptr expire
|
|
327
|
+
testValueViaComparison(weakPointer,
|
|
328
|
+
"expired"); // Test after the weak pointer has expired
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
TEST_F(SmartPointerPrintTest, HandlesUniquePtr) {
|
|
332
|
+
const auto uniquePointer = std::make_unique<int>(30);
|
|
333
|
+
testValueViaComparison(uniquePointer, "30");
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
TEST_F(OptionalPrintTest, HandlesOptional) {
|
|
337
|
+
std::optional<int> optionalInt{40};
|
|
338
|
+
testValueViaComparison(optionalInt, "Optional(40)");
|
|
339
|
+
optionalInt.reset();
|
|
340
|
+
testValueViaComparison(optionalInt, "nullopt");
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
TEST_F(VariantPrintTest, HandlesVariant) {
|
|
344
|
+
std::variant<int, std::string> variantIntOrString = 10;
|
|
345
|
+
testValueViaComparison(variantIntOrString, "Variant(10)");
|
|
346
|
+
variantIntOrString = "Hello";
|
|
347
|
+
testValueViaComparison(variantIntOrString, "Variant(Hello)");
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
TEST_F(ErrorHandlingPrintTest, HandlesErrorCode) {
|
|
351
|
+
const auto errorCodeValue =
|
|
352
|
+
std::make_error_code(std::errc::function_not_supported).value();
|
|
353
|
+
const std::error_code errorCode =
|
|
354
|
+
make_error_code(std::errc::function_not_supported);
|
|
355
|
+
testValueViaComparison(
|
|
356
|
+
errorCode, "ErrorCode(" + std::to_string(errorCodeValue) + ", generic)");
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
TEST_F(ErrorHandlingPrintTest, HandlesExceptionPtr) {
|
|
360
|
+
try {
|
|
361
|
+
throw std::runtime_error("test error");
|
|
362
|
+
} catch (...) {
|
|
363
|
+
const std::exception_ptr exceptionPointer = std::current_exception();
|
|
364
|
+
testValueViaComparison(exceptionPointer, "ExceptionPtr(\"test error\")");
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
TEST_F(FileSystemPrintTest, HandlesPath) {
|
|
369
|
+
const std::filesystem::path filePath = "/path/to/some/file.txt";
|
|
370
|
+
testValueViaComparison(filePath, "Path(\"/path/to/some/file.txt\")");
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
TEST_F(FileSystemPrintTest, HandlesDirectoryIterator) {
|
|
374
|
+
// Setup a temporary directory and files within
|
|
375
|
+
std::filesystem::path directory =
|
|
376
|
+
std::filesystem::temp_directory_path() / "test_dir";
|
|
377
|
+
std::filesystem::create_directory(directory);
|
|
378
|
+
|
|
379
|
+
std::ofstream(directory / "file1.txt");
|
|
380
|
+
std::ofstream(directory / "file2.txt");
|
|
381
|
+
|
|
382
|
+
std::filesystem::directory_iterator begin(directory);
|
|
383
|
+
|
|
384
|
+
testValueViaRegex(
|
|
385
|
+
begin,
|
|
386
|
+
R"(Directory\["file1.txt", "file2.txt"\]|Directory\["file2.txt", "file1.txt"\])");
|
|
387
|
+
|
|
388
|
+
// Cleanup
|
|
389
|
+
std::filesystem::remove_all(directory);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
TEST_F(UnsupportedLoggingTest, TestLoggingUnsupportedType) {
|
|
393
|
+
std::ostringstream oss;
|
|
394
|
+
class UnsupportedClass {};
|
|
395
|
+
const auto x = UnsupportedClass();
|
|
396
|
+
|
|
397
|
+
ASSERT_THROW({ printElement(oss, x); }, std::runtime_error);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
} // namespace low_level_log_implementation
|
|
401
|
+
|
|
402
|
+
namespace rnexecutorch {
|
|
403
|
+
|
|
404
|
+
namespace high_level_log_implementation {
|
|
405
|
+
|
|
406
|
+
class BufferTest : public ::testing::Test {
|
|
407
|
+
protected:
|
|
408
|
+
// Helper to validate the final output
|
|
409
|
+
void validateBuffer(const std::string &result, const std::string &expected,
|
|
410
|
+
std::size_t expectedSize) {
|
|
411
|
+
EXPECT_EQ(result, expected);
|
|
412
|
+
EXPECT_EQ(result.size(), expectedSize);
|
|
413
|
+
if (result.size() > expected.size()) {
|
|
414
|
+
EXPECT_EQ(result.substr(expected.size()), "...");
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
TEST_F(BufferTest, MessageShorterThanLimit) {
|
|
420
|
+
constexpr std::size_t smallLogLimit = 20;
|
|
421
|
+
const std::string message = "Short message";
|
|
422
|
+
auto result = getBuffer(message, smallLogLimit);
|
|
423
|
+
validateBuffer(result, message, message.size());
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
TEST_F(BufferTest, MessageExactlyAtLimit) {
|
|
427
|
+
// Creating a string with 1024 'a' characters
|
|
428
|
+
constexpr std::size_t defaultLogLimit = 1024;
|
|
429
|
+
const std::string message(defaultLogLimit, 'a');
|
|
430
|
+
auto result = getBuffer(message, defaultLogLimit);
|
|
431
|
+
validateBuffer(result, message, message.size());
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
TEST_F(BufferTest, MessageLongerThanLimit) {
|
|
435
|
+
constexpr std::size_t defaultLogLimit = 1024;
|
|
436
|
+
constexpr std::size_t sizeAboveLimit = 1050;
|
|
437
|
+
// Creating a string longer than the limit
|
|
438
|
+
const std::string message(sizeAboveLimit, 'a');
|
|
439
|
+
const auto expected = std::string(defaultLogLimit, 'a') + "...";
|
|
440
|
+
const auto result = getBuffer(message, defaultLogLimit);
|
|
441
|
+
validateBuffer(result, expected, expected.size());
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
} // namespace high_level_log_implementation
|
|
445
|
+
|
|
446
|
+
class LoggingTest : public ::testing::Test {
|
|
447
|
+
protected:
|
|
448
|
+
template <typename T>
|
|
449
|
+
void testLoggingDoesNotChangeContainer(const T &original) {
|
|
450
|
+
const auto copy = original; // Make a copy of the container
|
|
451
|
+
log(LOG_LEVEL::Info, original);
|
|
452
|
+
ASSERT_TRUE(check_if_same_content(original, copy))
|
|
453
|
+
<< "Logging modified the content of the container.";
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
private:
|
|
457
|
+
// == op for smart pointers compare addresses, check content maunally
|
|
458
|
+
template <typename T>
|
|
459
|
+
bool check_if_same_content(const std::shared_ptr<T> &a,
|
|
460
|
+
const std::shared_ptr<T> &b) const noexcept {
|
|
461
|
+
if (!a || !b) {
|
|
462
|
+
return a == b;
|
|
463
|
+
}
|
|
464
|
+
return *a == *b;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
template <typename T>
|
|
468
|
+
bool check_if_same_content(const T &original, const T &after) const noexcept {
|
|
469
|
+
// Requires that T has an equality operator (operator==)
|
|
470
|
+
return original == after;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
TEST_F(LoggingTest, LoggingDoesNotChangeSharedPtr) {
|
|
475
|
+
const auto original = std::make_shared<int>(42);
|
|
476
|
+
testLoggingDoesNotChangeContainer(original);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
TEST_F(LoggingTest, LoggingDoesNotChangeQueue) {
|
|
480
|
+
std::queue<int> original;
|
|
481
|
+
original.push(1);
|
|
482
|
+
original.push(2);
|
|
483
|
+
original.push(3);
|
|
484
|
+
testLoggingDoesNotChangeContainer(original);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
TEST_F(LoggingTest, LoggingDoesNotChangeVector) {
|
|
488
|
+
const std::vector<int> original = {1, 2, 3, 4, 5};
|
|
489
|
+
testLoggingDoesNotChangeContainer(original);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
TEST(LogFunctionTest, LoggingBasic) {
|
|
493
|
+
EXPECT_NO_THROW(log(LOG_LEVEL::Debug, "Test123"));
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
TEST(LogFunctionTest, LoggingWithNonDefaultLogSize) {
|
|
497
|
+
constexpr std::size_t sizeBiggerThanDefault = 2048;
|
|
498
|
+
const auto testString = std::string(sizeBiggerThanDefault, 'a');
|
|
499
|
+
EXPECT_NO_THROW(log<sizeBiggerThanDefault>(LOG_LEVEL::Info, testString));
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
TEST(LogFunctionTest, LoggingMoreThanOneElement) {
|
|
503
|
+
constexpr auto testStringLiteral = "Test123";
|
|
504
|
+
const auto testVector = std::vector<int>{1, 2, 3, 4};
|
|
505
|
+
const auto testPair = std::pair<int, double>(1, 2.0);
|
|
506
|
+
EXPECT_NO_THROW(
|
|
507
|
+
log(LOG_LEVEL::Debug, testStringLiteral, testVector, testPair));
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
TEST(MovingSequencable, MovingSequencableTest) {
|
|
511
|
+
std::priority_queue<int> q;
|
|
512
|
+
q.push(1);
|
|
513
|
+
q.push(2);
|
|
514
|
+
q.push(3);
|
|
515
|
+
|
|
516
|
+
log(LOG_LEVEL::Debug, q);
|
|
517
|
+
ASSERT_EQ(q.size(), 3);
|
|
518
|
+
const auto &cq = q;
|
|
519
|
+
log(LOG_LEVEL::Debug, cq);
|
|
520
|
+
ASSERT_EQ(cq.size(), 3);
|
|
521
|
+
log(LOG_LEVEL::Debug, std::move(q));
|
|
522
|
+
ASSERT_EQ(q.size(), 0);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
} // namespace rnexecutorch
|
|
526
|
+
|
|
527
|
+
int main(int argc, char **argv) {
|
|
528
|
+
::testing::InitGoogleTest(&argc, argv);
|
|
529
|
+
return RUN_ALL_TESTS();
|
|
530
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Native Test
|
|
2
|
+
This guide provide information on how functions are tested, how to install all needed dependencies and how to run tests.
|
|
3
|
+
|
|
4
|
+
### Used Tools
|
|
5
|
+
To test the native code we use [`googletest`](https://github.com/google/googletest). It is a flexible tool for creating unit tests.
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
The easiest way to install `googletest` is following:
|
|
9
|
+
* Clone repo locally and checkout on newest release:
|
|
10
|
+
`git clone git@github.com:google/googletest.git && cd googletest && git switch --detach v1.17.0`
|
|
11
|
+
* Build library files:
|
|
12
|
+
* `mkdir build && cd build`
|
|
13
|
+
* `cmake ..`
|
|
14
|
+
* `make`
|
|
15
|
+
* Add `/usr/local/include` and `/usr/local/lib` to your path if not already there.
|
|
16
|
+
|
|
17
|
+
### Usage
|
|
18
|
+
To run tests please use:
|
|
19
|
+
* `run_test.sh` if you want to run one specific test, e.g. `run_test.sh LogTest.cpp`.
|
|
20
|
+
* `run_all_tests.sh` if you want to run all tests in the `tests` directory.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Get the directory where the script is located
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
|
|
5
|
+
|
|
6
|
+
# Loop through all .cpp files in that directory
|
|
7
|
+
for file in "$SCRIPT_DIR"/*.cpp
|
|
8
|
+
do
|
|
9
|
+
if [ -f "$file" ]; then
|
|
10
|
+
file_name=$(basename "$file")
|
|
11
|
+
echo "Processing $file_name"
|
|
12
|
+
"$SCRIPT_DIR"/run_test.sh "$file"
|
|
13
|
+
fi
|
|
14
|
+
done
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Check if a file name is provided
|
|
4
|
+
if [ "$#" -ne 1 ]; then
|
|
5
|
+
echo "Usage: $0 <cpp_file>"
|
|
6
|
+
exit 1
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
file_name="$1"
|
|
10
|
+
|
|
11
|
+
# Compile the file with specified libraries
|
|
12
|
+
g++ -std=c++20 -o test_executable "$file_name" -lgtest -lgtest_main -lpthread
|
|
13
|
+
|
|
14
|
+
# Execute the binary
|
|
15
|
+
./test_executable
|
|
16
|
+
|
|
17
|
+
# Remove the executable
|
|
18
|
+
rm -f test_executable
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>ExecutorchLib.framework/ExecutorchLib</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-arm64
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>ExecutorchLib.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
@@ -17,14 +17,12 @@
|
|
|
17
17
|
</array>
|
|
18
18
|
<key>SupportedPlatform</key>
|
|
19
19
|
<string>ios</string>
|
|
20
|
-
<key>SupportedPlatformVariant</key>
|
|
21
|
-
<string>simulator</string>
|
|
22
20
|
</dict>
|
|
23
21
|
<dict>
|
|
24
22
|
<key>BinaryPath</key>
|
|
25
23
|
<string>ExecutorchLib.framework/ExecutorchLib</string>
|
|
26
24
|
<key>LibraryIdentifier</key>
|
|
27
|
-
<string>ios-arm64</string>
|
|
25
|
+
<string>ios-arm64-simulator</string>
|
|
28
26
|
<key>LibraryPath</key>
|
|
29
27
|
<string>ExecutorchLib.framework</string>
|
|
30
28
|
<key>SupportedArchitectures</key>
|
|
@@ -33,6 +31,8 @@
|
|
|
33
31
|
</array>
|
|
34
32
|
<key>SupportedPlatform</key>
|
|
35
33
|
<string>ios</string>
|
|
34
|
+
<key>SupportedPlatformVariant</key>
|
|
35
|
+
<string>simulator</string>
|
|
36
36
|
</dict>
|
|
37
37
|
</array>
|
|
38
38
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/ExecutorchLib
CHANGED
|
Binary file
|
package/ios/ExecutorchLib.xcframework/ios-arm64-simulator/ExecutorchLib.framework/Info.plist
CHANGED
|
Binary file
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#import "ETInstaller.h"
|
|
2
|
+
|
|
3
|
+
#import <React/RCTBridge+Private.h>
|
|
4
|
+
|
|
5
|
+
#import <React/RCTCallInvoker.h>
|
|
6
|
+
#import <ReactCommon/RCTTurboModule.h>
|
|
7
|
+
#include <rnexecutorch/RnExecutorchInstaller.h>
|
|
8
|
+
#include <stdexcept>
|
|
9
|
+
|
|
10
|
+
using namespace facebook::react;
|
|
11
|
+
|
|
12
|
+
@interface RCTBridge (JSIRuntime)
|
|
13
|
+
- (void *)runtime;
|
|
14
|
+
@end
|
|
15
|
+
|
|
16
|
+
@implementation ETInstaller
|
|
17
|
+
|
|
18
|
+
@synthesize callInvoker = _callInvoker;
|
|
19
|
+
|
|
20
|
+
RCT_EXPORT_MODULE(ETInstaller);
|
|
21
|
+
|
|
22
|
+
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) {
|
|
23
|
+
auto jsiRuntime =
|
|
24
|
+
reinterpret_cast<facebook::jsi::Runtime *>(self.bridge.runtime);
|
|
25
|
+
auto jsCallInvoker = _callInvoker.callInvoker;
|
|
26
|
+
|
|
27
|
+
assert(jsiRuntime != nullptr);
|
|
28
|
+
|
|
29
|
+
auto fetchUrl = [](std::string url) {
|
|
30
|
+
@try {
|
|
31
|
+
NSString *nsUrlStr =
|
|
32
|
+
[NSString stringWithCString:url.c_str()
|
|
33
|
+
encoding:[NSString defaultCStringEncoding]];
|
|
34
|
+
NSURL *nsUrl = [NSURL URLWithString:nsUrlStr];
|
|
35
|
+
NSData *data = [NSData dataWithContentsOfURL:nsUrl];
|
|
36
|
+
const std::byte *bytePtr =
|
|
37
|
+
reinterpret_cast<const std::byte *>(data.bytes);
|
|
38
|
+
int bufferLength = [data length];
|
|
39
|
+
return std::vector<std::byte>(bytePtr, bytePtr + bufferLength);
|
|
40
|
+
} @catch (NSException *exception) {
|
|
41
|
+
throw std::runtime_error("Error fetching data from a url");
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
rnexecutorch::RnExecutorchInstaller::injectJSIBindings(
|
|
45
|
+
jsiRuntime, jsCallInvoker, fetchUrl);
|
|
46
|
+
|
|
47
|
+
NSLog(@"Successfully installed JSI bindings for react-native-executorch!");
|
|
48
|
+
return @true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
52
|
+
(const facebook::react::ObjCTurboModule::InitParams &)params {
|
|
53
|
+
return std::make_shared<facebook::react::NativeETInstallerSpecJSI>(params);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@end
|