Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-24 10:24:59

0001 // Copyright (c) ONNX Project Contributors
0002 
0003 /*
0004  * SPDX-License-Identifier: Apache-2.0
0005  */
0006 
0007 #pragma once
0008 
0009 #include <cstdint>
0010 
0011 namespace ONNX_NAMESPACE {
0012 
0013 // Determine if the processor is little endian or not
0014 inline bool is_processor_little_endian() {
0015   constexpr std::int32_t value = 1;
0016   return reinterpret_cast<const std::uint8_t*>(&value)[0] == 1;
0017 }
0018 
0019 } // namespace ONNX_NAMESPACE