Skip to content

Commit 8e0cb34

Browse files
committed
add RcppEigen patches
1 parent 3683c5e commit 8e0cb34

File tree

8 files changed

+256
-92
lines changed

8 files changed

+256
-92
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2020-12-05 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/Eigen: Upgraded to Eigen 3.3.9
4+
* inst/include/unsupported/Eigen: Idem
5+
* patches/eigen-3.3.9.diff: Carried local CRAN patches forward
6+
17
2020-08-16 Dirk Eddelbuettel <[email protected]>
28

39
* README.md: Add JSS badge

inst/include/Eigen/CholmodSupport

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "src/Core/util/DisableStupidWarnings.h"
1414

1515
extern "C" {
16-
#include <cholmod.h>
16+
#include <RcppEigenCholmod.h>
1717
}
1818

1919
/** \ingroup Support_modules
@@ -45,4 +45,3 @@ extern "C" {
4545
#include "src/Core/util/ReenableStupidWarnings.h"
4646

4747
#endif // EIGEN_CHOLMODSUPPORT_MODULE_H
48-

inst/include/Eigen/src/Core/arch/CUDA/Half.h

+2
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,14 @@ struct half : public half_impl::half_base {
127127
EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long) const {
128128
return static_cast<unsigned long>(half_impl::half_to_float(*this));
129129
}
130+
#if EIGEN_HAS_CXX11
130131
EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(long long) const {
131132
return static_cast<long long>(half_impl::half_to_float(*this));
132133
}
133134
EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(unsigned long long) const {
134135
return static_cast<unsigned long long>(half_to_float(*this));
135136
}
137+
#endif
136138
EIGEN_DEVICE_FUNC EIGEN_EXPLICIT_CAST(float) const {
137139
return half_impl::half_to_float(*this);
138140
}

inst/include/Eigen/src/Core/arch/SSE/Complex.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<flo
9898
res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), reinterpret_cast<const __m64*>(&from));
9999
#elif EIGEN_GNUC_AT_LEAST(4,6)
100100
// Suppress annoying "may be used uninitialized in this function" warning with gcc >= 4.6
101-
#pragma GCC diagnostic push
102-
#pragma GCC diagnostic ignored "-Wuninitialized"
101+
//#pragma GCC diagnostic push
102+
//#pragma GCC diagnostic ignored "-Wuninitialized"
103103
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
104-
#pragma GCC diagnostic pop
104+
//#pragma GCC diagnostic pop
105105
#else
106106
res.v = _mm_loadl_pi(res.v, (const __m64*)&from);
107107
#endif

inst/include/Eigen/src/Core/util/DisableStupidWarnings.h

+23-22
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#ifdef _MSC_VER
55
// 4100 - unreferenced formal parameter (occurred e.g. in aligned_allocator::destroy(pointer p))
66
// 4101 - unreferenced local variable
7-
// 4127 - conditional expression is constant
87
// 4181 - qualifier applied to reference type ignored
98
// 4211 - nonstandard extension used : redefined extern to static
109
// 4244 - 'argument' : conversion from 'type1' to 'type2', possible loss of data
@@ -20,7 +19,7 @@
2019
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
2120
#pragma warning( push )
2221
#endif
23-
#pragma warning( disable : 4100 4101 4127 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800)
22+
#pragma warning( disable : 4100 4101 4181 4211 4244 4273 4324 4503 4512 4522 4700 4714 4717 4800)
2423

2524
#elif defined __INTEL_COMPILER
2625
// 2196 - routine is both "inline" and "noinline" ("noinline" assumed)
@@ -38,32 +37,33 @@
3837
#elif defined __clang__
3938
// -Wconstant-logical-operand - warning: use of logical && with constant operand; switch to bitwise & or remove constant
4039
// this is really a stupid warning as it warns on compile-time expressions involving enums
41-
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
42-
#pragma clang diagnostic push
43-
#endif
44-
#pragma clang diagnostic ignored "-Wconstant-logical-operand"
40+
//#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
41+
// #pragma clang diagnostic push
42+
//#endif
43+
//#pragma clang diagnostic ignored "-Wconstant-logical-operand"
4544

4645
#elif defined __GNUC__
4746

48-
#if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
49-
#pragma GCC diagnostic push
50-
#endif
51-
// g++ warns about local variables shadowing member functions, which is too strict
52-
#pragma GCC diagnostic ignored "-Wshadow"
53-
#if __GNUC__ == 4 && __GNUC_MINOR__ < 8
54-
// Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions:
55-
#pragma GCC diagnostic ignored "-Wtype-limits"
56-
#endif
57-
#if __GNUC__>=6
58-
#pragma GCC diagnostic ignored "-Wignored-attributes"
59-
#endif
60-
#if __GNUC__==7
61-
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
62-
#pragma GCC diagnostic ignored "-Wattributes"
63-
#endif
47+
// #if (!defined(EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS)) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
48+
// #pragma GCC diagnostic push
49+
// #endif
50+
// // g++ warns about local variables shadowing member functions, which is too strict
51+
// #pragma GCC diagnostic ignored "-Wshadow"
52+
// #if __GNUC__ == 4 && __GNUC_MINOR__ < 8
53+
// // Until g++-4.7 there are warnings when comparing unsigned int vs 0, even in templated functions:
54+
// #pragma GCC diagnostic ignored "-Wtype-limits"
55+
// #endif
56+
// #if __GNUC__>=6
57+
// #pragma GCC diagnostic ignored "-Wignored-attributes"
58+
// #endif
59+
// #if __GNUC__==7
60+
// // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
61+
// #pragma GCC diagnostic ignored "-Wattributes"
62+
// #endif
6463
#endif
6564

6665
#if defined __NVCC__
66+
#pragma diag_suppress boolean_controlling_expr_is_constant
6767
// Disable the "statement is unreachable" message
6868
#pragma diag_suppress code_is_unreachable
6969
// Disable the "dynamic initialization in unreachable code" message
@@ -81,6 +81,7 @@
8181
#pragma diag_suppress 2671
8282
#pragma diag_suppress 2735
8383
#pragma diag_suppress 2737
84+
#pragma diag_suppress 2739
8485
#endif
8586

8687
#else

0 commit comments

Comments
 (0)