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 // eigen-src/unsupported/Eigen/CXX11/src/ThreadPool/EventCount.h:231:56: error: implicit conversion loses integer
45 // precision: 'uint64_t' (aka 'unsigned long long') to 'size_t' (aka 'unsigned long') [-Werror,-Wshorten-64-to-32]
46 // next = wnext == kStackMask ? nullptr : &waiters_[wnext];
47 // ~~~~~~~~ ^~~~~
48 #ifdef HAS_SHORTEN_64_TO_32
49 #pragma GCC diagnostic ignored "-Wshorten-64-to-32"
50 #endif
51 
52 #elif defined(_MSC_VER)
53 // build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76):
54 // warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence
55 
56 // unsupported\eigen\cxx11\src\Tensor\TensorUInt128.h(150,0): Warning C4245: 'initializing': conversion from '__int64'
57 // to 'uint64_t', signed/unsigned mismatch
58 #pragma warning(push)
59 #pragma warning(disable : 4554)
60 #pragma warning(disable : 4245)
61 #pragma warning(disable : 4127)
62 #endif
63 
64 #include "unsupported/Eigen/CXX11/Tensor"
65 
66 #if defined(__GNUC__)
67 #pragma GCC diagnostic pop
68 #elif defined(_MSC_VER)
69 #pragma warning(pop)
70 #endif