mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-05 03:30:37 +08:00
Workaround i387 issue in unit test
(grafted from a64156cae5e4fc72a783a14584f1140c5a68a3b3 )
This commit is contained in:
parent
32f0c782c3
commit
b3b9d7a14c
13
test/ref.cpp
13
test/ref.cpp
@ -34,6 +34,18 @@ inline void on_temporary_creation(int) {
|
|||||||
|
|
||||||
// test Ref.h
|
// test Ref.h
|
||||||
|
|
||||||
|
// Deal with i387 extended precision
|
||||||
|
#if EIGEN_ARCH_i386 && !(EIGEN_ARCH_x86_64)
|
||||||
|
|
||||||
|
#if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(4,4)
|
||||||
|
#pragma GCC optimize ("-ffloat-store")
|
||||||
|
#else
|
||||||
|
#undef VERIFY_IS_EQUAL
|
||||||
|
#define VERIFY_IS_EQUAL(X,Y) VERIFY_IS_APPROX(X,Y)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Index Index;
|
typedef typename MatrixType::Index Index;
|
||||||
@ -71,7 +83,6 @@ template<typename MatrixType> void ref_matrix(const MatrixType& m)
|
|||||||
rm2 = m2.block(i,j,brows,bcols);
|
rm2 = m2.block(i,j,brows,bcols);
|
||||||
VERIFY_IS_EQUAL(m1, m2);
|
VERIFY_IS_EQUAL(m1, m2);
|
||||||
|
|
||||||
|
|
||||||
ConstRefDynMat rm3 = m1.block(i,j,brows,bcols);
|
ConstRefDynMat rm3 = m1.block(i,j,brows,bcols);
|
||||||
m1.block(i,j,brows,bcols) *= 2;
|
m1.block(i,j,brows,bcols) *= 2;
|
||||||
m2.block(i,j,brows,bcols) *= 2;
|
m2.block(i,j,brows,bcols) *= 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user