1 | /* |
---|---|
2 | * SPDX-License-Identifier: Apache-2.0 |
3 | */ |
4 | |
5 | #pragma once |
6 | |
7 | namespace ONNX_NAMESPACE { |
8 | |
9 | // Determine if the processor is little endian or not |
10 | inline bool is_processor_little_endian() { |
11 | int num = 1; |
12 | if (*(char*)&num == 1) |
13 | return true; |
14 | return false; |
15 | } |
16 | |
17 | } // namespace ONNX_NAMESPACE |
18 |