microsoft/onnxruntime-extensions

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
9e7f8e5b1dd903dfdbb526fdb68db0ef83d9a7e8

Branches

Tags

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

Clone

HTTPS

Download ZIP

includes/onnxruntime_extensions.h

32lines · 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#ifdef _WIN32
19#define ORTX_EXPORT __declspec(dllexport)
20#else
21#define ORTX_EXPORT
22#endif
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28ORTX_EXPORT OrtStatus* ORT_API_CALL RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api);
29
30#ifdef __cplusplus
31}
32#endif
33