HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eigen_common_wrapper.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // Licensed under the MIT License.
5 //
6 //-----------------------------------------------------------------------------
7 #pragma once
8 #include "onnxruntime_config.h"
9 // build/external/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h:162:71:
10 // error: ignoring attributes on template argument "Eigen::PacketType<const float, Eigen::DefaultDevice>::type {aka __vector(4) float}" [-Werror=ignored-attributes]
11 #if defined(__GNUC__)
12 #pragma GCC diagnostic push
13 #if __GNUC__ >= 6
14 #pragma GCC diagnostic ignored "-Wignored-attributes"
15 #endif
16 #pragma GCC diagnostic ignored "-Wunused-parameter"
17 #pragma GCC diagnostic ignored "-Wunused-result"
18 #ifdef HAS_DEPRECATED_COPY
19 #pragma GCC diagnostic ignored "-Wdeprecated-copy"
20 #endif
21 // cmake/external/eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
22 // error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘Eigen::internal::Packet4c’
23 // {aka ‘struct Eigen::internal::eigen_packet_wrapper<int, 2>’} from an array of ‘const int8_t’
24 // {aka ‘const signed char’} [-Werror=class-memaccess]
25 #ifdef HAS_CLASS_MEMACCESS
26 #pragma GCC diagnostic ignored "-Wclass-memaccess"
27 #endif
28 
29 // cmake/external/eigen\Eigen/src/Core/util/Meta.h:454:25:
30 // error: 'result_of<Eigen::internal::scalar_product_op<unsigned long long> (const unsigned long long &, const unsigned long long &)>'
31 // is deprecated [-Werror,-Wdeprecated-declarations]
32 // typedef typename std::result_of<T>::type type1;
33 #ifdef HAS_DEPRECATED_DECLARATIONS
34 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
35 #endif
36 
37 // cmake/external/eigen\Eigen/CXX11/src/Tensor/TensorTrace.h:130:9:
38 // error: variable 'num_distinct_reduce_dims' set but not used [-Werror,-Wunused-but-set-variable]
39 // int num_distinct_reduce_dims = 0;
40 #ifdef HAS_UNUSED_BUT_SET_VARIABLE
41 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
42 #endif
43 
44 #elif defined(_MSC_VER)
45 // build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76):
46 // warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence
47 
48 // unsupported\eigen\cxx11\src\Tensor\TensorUInt128.h(150,0): Warning C4245: 'initializing': conversion from '__int64'
49 // to 'uint64_t', signed/unsigned mismatch
50 #pragma warning(push)
51 #pragma warning(disable : 4554)
52 #pragma warning(disable : 4245)
53 #pragma warning(disable : 4127)
54 #endif
55 
56 #include "unsupported/Eigen/CXX11/Tensor"
57 
58 #if defined(__GNUC__)
59 #pragma GCC diagnostic pop
60 #elif defined(_MSC_VER)
61 #pragma warning(pop)
62 #endif