HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
endian.h
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License.
3
4
#pragma once
5
6
namespace
onnxruntime {
7
8
// the semantics of this enum should match std::endian from C++20
9
enum class
endian
{
10
#if defined(_WIN32)
11
little
= 0,
12
big
= 1,
13
native
=
little
,
14
#elif defined(__GNUC__) || defined(__clang__)
15
little
= __ORDER_LITTLE_ENDIAN__,
16
big
= __ORDER_BIG_ENDIAN__,
17
native
= __BYTE_ORDER__,
18
#else
19
#error onnxruntime::endian is not implemented in this environment.
20
#endif
21
};
22
23
static_assert(
24
endian::native
==
endian::little
||
endian::native
==
endian::big
,
25
"Only little-endian or big-endian native byte orders are supported."
);
26
27
}
// namespace onnxruntime
endian::little
endian::big
onnxruntime::endian
endian
Definition:
endian.h:9
endian::native
onnxruntime
core
framework
endian.h
Generated on Sat Mar 29 2025 02:43:23 for HDK by
1.8.6