microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
includes/onnxruntime_extensions.h
29lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | // Note: The following include path is used for building Swift Package Manager support for ORT Extensions. |
| 7 | // The macro is defined in cxxSettings config in Package.swift. |
| 8 | // The reason why we need a prefix is that when Xcode includes the package it copies it to an internally generated path with |
| 9 | // the package name as a prefix. |
| 10 | // And we don't have control over the include paths when that happens in the user's iOS app. |
| 11 | // The only way we found to make the include path work automatically for now. |
| 12 | #ifdef ORT_SWIFT_PACKAGE_MANAGER_BUILD |
| 13 | #include "onnxruntime/onnxruntime_c_api.h" |
| 14 | #else |
| 15 | #include "onnxruntime_c_api.h" |
| 16 | #endif |
| 17 | |
| 18 | |
| 19 | #ifdef __cplusplus |
| 20 | extern "C" { |
| 21 | #endif |
| 22 | |
| 23 | OrtStatus* ORT_API_CALL RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api); |
| 24 | |
| 25 | int ORT_API_CALL GetActiveOrtAPIVersion(); |
| 26 | |
| 27 | #ifdef __cplusplus |
| 28 | } |
| 29 | #endif |
| 30 | |