microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0d5d19f67b28024de0b88d4a61bcc4157dc06248

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

include/onnxruntime_extensions.h

32lines · modecode

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