mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Set of fixes and workaround to make sun studio more happy.
Still remains the problem of alignment and vectorization.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// This file is part of Eigen, a lightweight C++ template library
|
||||
// for linear algebra.
|
||||
//
|
||||
// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr>
|
||||
// Copyright (C) 2008-2009 Gael Guennebaud <g.gael@free.fr>
|
||||
//
|
||||
// Eigen is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
|
||||
@@ -107,7 +107,7 @@ template<typename MatrixType> void basicStuff(const MatrixType& m)
|
||||
{
|
||||
VERIFY_IS_NOT_APPROX(m3, m1);
|
||||
}
|
||||
|
||||
|
||||
m3.real() = m1.real();
|
||||
VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), static_cast<const MatrixType&>(m1).real());
|
||||
VERIFY_IS_APPROX(static_cast<const MatrixType&>(m3).real(), m1.real());
|
||||
@@ -121,16 +121,16 @@ template<typename MatrixType> void basicStuffComplex(const MatrixType& m)
|
||||
|
||||
int rows = m.rows();
|
||||
int cols = m.cols();
|
||||
|
||||
|
||||
Scalar s1 = ei_random<Scalar>(),
|
||||
s2 = ei_random<Scalar>();
|
||||
|
||||
|
||||
VERIFY(ei_real(s1)==ei_real_ref(s1));
|
||||
VERIFY(ei_imag(s1)==ei_imag_ref(s1));
|
||||
ei_real_ref(s1) = ei_real(s2);
|
||||
ei_imag_ref(s1) = ei_imag(s2);
|
||||
VERIFY(s1==s2);
|
||||
|
||||
|
||||
RealMatrixType rm1 = RealMatrixType::Random(rows,cols),
|
||||
rm2 = RealMatrixType::Random(rows,cols);
|
||||
MatrixType cm(rows,cols);
|
||||
@@ -162,7 +162,7 @@ void test_basicstuff()
|
||||
CALL_SUBTEST( basicStuff(MatrixXcd(20, 20)) );
|
||||
CALL_SUBTEST( basicStuff(Matrix<float, 100, 100>()) );
|
||||
CALL_SUBTEST( basicStuff(Matrix<long double,Dynamic,Dynamic>(10,10)) );
|
||||
|
||||
|
||||
CALL_SUBTEST( basicStuffComplex(MatrixXcf(21, 17)) );
|
||||
CALL_SUBTEST( basicStuffComplex(MatrixXcd(2, 3)) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user