Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50291 - sandbox/libs/numeric/bindings/lapack/test
From: thomas.klimpel_at_[hidden]
Date: 2008-12-16 05:08:43


Author: klimpel
Date: 2008-12-16 05:08:42 EST (Tue, 16 Dec 2008)
New Revision: 50291
URL: http://svn.boost.org/trac/boost/changeset/50291

Log:
minor modifications, to make lapack regression tests pass with gcc-4.2.2 on linux64

Text files modified:
   sandbox/libs/numeric/bindings/lapack/test/ublas_gees.cpp | 5 +++--
   sandbox/libs/numeric/bindings/lapack/test/ublas_gels.cpp | 10 +++++-----
   sandbox/libs/numeric/bindings/lapack/test/ublas_gelsd.cpp | 8 ++++----
   sandbox/libs/numeric/bindings/lapack/test/ublas_gelss.cpp | 8 ++++----
   4 files changed, 16 insertions(+), 15 deletions(-)

Modified: sandbox/libs/numeric/bindings/lapack/test/ublas_gees.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/lapack/test/ublas_gees.cpp (original)
+++ sandbox/libs/numeric/bindings/lapack/test/ublas_gees.cpp 2008-12-16 05:08:42 EST (Tue, 16 Dec 2008)
@@ -47,6 +47,7 @@
 
    typedef ublas::matrix<T, ublas::column_major> matrix_type ;
    typedef ublas::vector<complex_type> vector_type ;
+ double safety_factor (1.5);
 
    // Set matrix
    matrix_type a( n, n );
@@ -62,13 +63,13 @@
 
    // Check Schur factorization
    if (norm_frobenius( prod( a2, z ) - prod( z, a ) )
- >= 10.0* norm_frobenius( a2 ) * std::numeric_limits< real_type >::epsilon() ) return 255 ;
+ >= safety_factor*10.0* norm_frobenius( a2 ) * std::numeric_limits< real_type >::epsilon() ) return 255 ;
 
    lapack::gees( a2, e2, workspace ) ;
    if (norm_2( e1 - e2 ) > norm_2( e1 ) * std::numeric_limits< real_type >::epsilon()) return 255 ;
 
    if (norm_frobenius( a2 - a )
- >= 10.0* norm_frobenius( a2 ) * std::numeric_limits< real_type >::epsilon() ) return 255 ;
+ >= safety_factor*10.0* norm_frobenius( a2 ) * std::numeric_limits< real_type >::epsilon() ) return 255 ;
 
 
    return 0 ;

Modified: sandbox/libs/numeric/bindings/lapack/test/ublas_gels.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/lapack/test/ublas_gels.cpp (original)
+++ sandbox/libs/numeric/bindings/lapack/test/ublas_gels.cpp 2008-12-16 05:08:42 EST (Tue, 16 Dec 2008)
@@ -255,7 +255,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -311,7 +311,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_range, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -367,7 +367,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_range));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -425,7 +425,7 @@
         ublas::column(vec, 0) = VectorGenerator<VecType>()(mat.size1());
         ublas::column(vec, 1) = VectorGenerator<VecType>()(mat.size1());
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
         const int nrhs = traits::matrix_size2(vec);
 
@@ -481,7 +481,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE

Modified: sandbox/libs/numeric/bindings/lapack/test/ublas_gelsd.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/lapack/test/ublas_gelsd.cpp (original)
+++ sandbox/libs/numeric/bindings/lapack/test/ublas_gelsd.cpp 2008-12-16 05:08:42 EST (Tue, 16 Dec 2008)
@@ -226,7 +226,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
         
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -281,7 +281,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_range, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -336,7 +336,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_range));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -393,7 +393,7 @@
         ublas::column(vec, 0) = VectorGenerator<VecType>()(mat.size1());
         ublas::column(vec, 1) = VectorGenerator<VecType>()(mat.size1());
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
         const int nrhs = traits::matrix_size2(vec);
 

Modified: sandbox/libs/numeric/bindings/lapack/test/ublas_gelss.cpp
==============================================================================
--- sandbox/libs/numeric/bindings/lapack/test/ublas_gelss.cpp (original)
+++ sandbox/libs/numeric/bindings/lapack/test/ublas_gelss.cpp 2008-12-16 05:08:42 EST (Tue, 16 Dec 2008)
@@ -226,7 +226,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -281,7 +281,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_range, col_size));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -336,7 +336,7 @@
         MatType mat(MatrixGenerator<MatType>()(row_size, col_range));
         VecType vec(VectorGenerator<VecType>()(row_size));
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
 
 #if USE_OPTIMAL_WORKSPACE
@@ -393,7 +393,7 @@
         ublas::column(vec, 0) = VectorGenerator<VecType>()(mat.size1());
         ublas::column(vec, 1) = VectorGenerator<VecType>()(mat.size1());
 
- const int m = traits::matrix_size1(mat);
+ //const int m = traits::matrix_size1(mat);
         const int n = traits::matrix_size2(mat);
         const int nrhs = traits::matrix_size2(vec);
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk