microsoft/onnxruntime-extensions

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
leca/gqa2

Branches

Tags

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

Clone

HTTPS

Download ZIP

include/ortx_types.h

35lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include <stdint.h>
7#include <stddef.h>
8
9#if defined(__CYGWIN__) || defined(__MINGW32__)
10#define ORTX_API_CALL __stdcall
11#elif defined(_WIN32)
12#define ORTX_API_CALL _stdcall
13#define ORTX_MUST_USE_RESULT
14#elif __APPLE__
15#define ORTX_API_CALL
16// To make symbols visible on macOS/iOS
17#define ORTX_MUST_USE_RESULT __attribute__((warn_unused_result))
18#else
19#define ORTX_API_CALL
20#define ORTX_MUST_USE_RESULT
21#endif
22
23typedef enum {
24 kOrtxOK = 0,
25 kOrtxErrorInvalidArgument = 1,
26 kOrtxErrorOutOfMemory = 2,
27 kOrtxErrorInvalidFile = 3,
28 kOrtxErrorCorruptData = 4,
29 kOrtxErrorNotFound = 5,
30 kOrtxErrorAlreadyExists = 6,
31 kOrtxErrorOutOfRange = 7,
32 kOrtxErrorNotImplemented = 8,
33 kOrtxErrorInternal = 9,
34 kOrtxErrorUnknown = 1000
35} extError_t;
36