eigen3: Update to 3.3.8
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
_realname=eigen
|
||||
pkgbase=mingw-w64-${_realname}3
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}3")
|
||||
pkgver=3.3.7
|
||||
pkgrel=2
|
||||
pkgver=3.3.8
|
||||
pkgrel=1
|
||||
pkgdesc="Lightweight C++ template library for vector and matrix math (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://eigen.tuxfamily.org/'
|
||||
@@ -16,18 +16,21 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-boost"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-mpfr"
|
||||
#"${MINGW_PACKAGE_PREFIX}-qt4"
|
||||
)
|
||||
source=("https://gitlab.com/libeigen/eigen/-/archive/${pkgver}/eigen-${pkgver}.tar.bz2"
|
||||
'eigen-3.1.2_osversion.patch'
|
||||
'TryRunResults.cmake'
|
||||
'eigen-pkgconfig.patch'
|
||||
'install_FindEigen3.patch')
|
||||
sha256sums=('685adf14bd8e9c015b78097c1dc22f2f01343756f196acdc76a678e1ae352e11'
|
||||
'install_FindEigen3.patch'
|
||||
'eigen-bug2011.patch'
|
||||
'eigen-paradiso.patch')
|
||||
sha256sums=('0215c6593c4ee9f1f7f28238c4e8995584ebf3b556e9dbf933d84feb98d5b9ef'
|
||||
'604b5c33e98a5873a81bb92a734dbf30547b482fde519aed5abc5e9ff2dffc6b'
|
||||
'9ebec4761a7de150ade4b421407a4b5148065416fa8010ecfbdd404bab68f899'
|
||||
'38d41a475a65de5ad92d1939c9f4fa7460b8152d5beb7256bcbaf630460b5c89'
|
||||
'c219f577e51571482fdfb38aec104c806cc6ee4c455627d70e99e59d2df7c32d')
|
||||
'c219f577e51571482fdfb38aec104c806cc6ee4c455627d70e99e59d2df7c32d'
|
||||
'c04d624d550b119be0f810786baba7e0d7809edefd4854a2db6dbd98a7da5a7d'
|
||||
'14c239a5b6c1efe1c2e6f33fc9c449a500b74ded2e865ca730b213c142f1f750')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"/eigen-${pkgver}
|
||||
@@ -35,6 +38,10 @@ prepare() {
|
||||
patch -Np2 -i "${srcdir}/eigen-3.1.2_osversion.patch"
|
||||
patch -Np1 -i "${srcdir}/eigen-pkgconfig.patch"
|
||||
patch -Np1 -i "${srcdir}/install_FindEigen3.patch"
|
||||
|
||||
# Upstream patches
|
||||
patch -Np1 -i "${srcdir}/eigen-bug2011.patch"
|
||||
patch -Np1 -i "${srcdir}/eigen-paradiso.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
64
mingw-w64-eigen3/eigen-bug2011.patch
Normal file
64
mingw-w64-eigen3/eigen-bug2011.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001
|
||||
From: Luke Peterson <hazelnusse@gmail.com>
|
||||
Date: Thu, 8 Oct 2020 12:16:53 -0700
|
||||
Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm
|
||||
|
||||
This resolves a compilation error associated with
|
||||
Eigen::eigen_assert_exception. It also eliminates the counting of
|
||||
exceptions that may occur in the OpenMP parallel section. If an
|
||||
unhandled exception occurs in this section, the behavior is non-conforming
|
||||
according to the OpenMP specification.
|
||||
---
|
||||
Eigen/src/Core/products/Parallelizer.h | 14 +++++---------
|
||||
test/CMakeLists.txt | 2 +-
|
||||
2 files changed, 6 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
|
||||
index 67b2442b5..a3cc05b77 100644
|
||||
--- a/Eigen/src/Core/products/Parallelizer.h
|
||||
+++ b/Eigen/src/Core/products/Parallelizer.h
|
||||
@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
|
||||
|
||||
ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);
|
||||
|
||||
- int errorCount = 0;
|
||||
- #pragma omp parallel num_threads(threads) reduction(+: errorCount)
|
||||
+ #pragma omp parallel num_threads(threads)
|
||||
{
|
||||
Index i = omp_get_thread_num();
|
||||
// Note that the actual number of threads might be lower than the number of request ones.
|
||||
@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
|
||||
info[i].lhs_start = r0;
|
||||
info[i].lhs_length = actualBlockRows;
|
||||
|
||||
- EIGEN_TRY {
|
||||
- if(transpose) func(c0, actualBlockCols, 0, rows, info);
|
||||
- else func(0, rows, c0, actualBlockCols, info);
|
||||
- } EIGEN_CATCH(...) {
|
||||
- ++errorCount;
|
||||
- }
|
||||
+ if(transpose)
|
||||
+ func(c0, actualBlockCols, 0, rows, info);
|
||||
+ else
|
||||
+ func(0, rows, c0, actualBlockCols, info);
|
||||
}
|
||||
- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index 0747aa6cb..b02577780 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -163,7 +163,7 @@ ei_add_test(constructor)
|
||||
ei_add_test(linearstructure)
|
||||
ei_add_test(integer_types)
|
||||
ei_add_test(unalignedcount)
|
||||
-if(NOT EIGEN_TEST_NO_EXCEPTIONS)
|
||||
+if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP)
|
||||
ei_add_test(exceptions)
|
||||
endif()
|
||||
ei_add_test(redux)
|
||||
--
|
||||
GitLab
|
||||
|
||||
26
mingw-w64-eigen3/eigen-paradiso.patch
Normal file
26
mingw-w64-eigen3/eigen-paradiso.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From bfdd4a9903a17ab02ed5fae34f9da8490bcb4192 Mon Sep 17 00:00:00 2001
|
||||
From: szczepaniak bartek <rybka.figa@gmail.com>
|
||||
Date: Thu, 8 Oct 2020 19:38:35 +0000
|
||||
Subject: [PATCH] Fix Paradiso.
|
||||
|
||||
EIGEN_USING_STD -> EIGEN_USING_STD_MATH
|
||||
---
|
||||
Eigen/src/PardisoSupport/PardisoSupport.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Eigen/src/PardisoSupport/PardisoSupport.h b/Eigen/src/PardisoSupport/PardisoSupport.h
|
||||
index f8c7d0780..98d0e3f21 100644
|
||||
--- a/Eigen/src/PardisoSupport/PardisoSupport.h
|
||||
+++ b/Eigen/src/PardisoSupport/PardisoSupport.h
|
||||
@@ -192,7 +192,7 @@ class PardisoImpl : public SparseSolverBase<Derived>
|
||||
void pardisoInit(int type)
|
||||
{
|
||||
m_type = type;
|
||||
- EIGEN_USING_STD(abs);
|
||||
+ EIGEN_USING_STD_MATH(abs);
|
||||
bool symmetric = abs(m_type) < 10;
|
||||
m_iparm[0] = 1; // No solver default
|
||||
m_iparm[1] = 2; // use Metis for the ordering
|
||||
--
|
||||
GitLab
|
||||
|
||||
Reference in New Issue
Block a user