Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50284 - in sandbox/boost/numeric/bindings: blas lapack
From: thomas.klimpel_at_[hidden]
Date: 2008-12-15 16:30:09


Author: klimpel
Date: 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
New Revision: 50284
URL: http://svn.boost.org/trac/boost/changeset/50284

Log:
white space cleanup
Text files modified:
   sandbox/boost/numeric/bindings/blas/blas.h | 8
   sandbox/boost/numeric/bindings/blas/blas1.hpp | 22
   sandbox/boost/numeric/bindings/blas/blas1_overloads.hpp | 13
   sandbox/boost/numeric/bindings/blas/blas2.hpp | 64 +-
   sandbox/boost/numeric/bindings/blas/blas3.hpp | 40 +-
   sandbox/boost/numeric/bindings/lapack/gbsv.hpp | 78 ++--
   sandbox/boost/numeric/bindings/lapack/gees.hpp | 106 ++--
   sandbox/boost/numeric/bindings/lapack/geev.hpp | 432 +++++++++++-----------
   sandbox/boost/numeric/bindings/lapack/gels.hpp | 344 +++++++++---------
   sandbox/boost/numeric/bindings/lapack/gelsd.hpp | 756 ++++++++++++++++++++--------------------
   sandbox/boost/numeric/bindings/lapack/gelss.hpp | 634 ++++++++++++++++----------------
   sandbox/boost/numeric/bindings/lapack/geqrf.hpp | 60 +-
   sandbox/boost/numeric/bindings/lapack/gesdd.hpp | 660 +++++++++++++++++-----------------
   sandbox/boost/numeric/bindings/lapack/gesv.hpp | 310 ++++++++--------
   sandbox/boost/numeric/bindings/lapack/gesvd.hpp | 488 ++++++++++++------------
   sandbox/boost/numeric/bindings/lapack/hbev.hpp | 62 +-
   sandbox/boost/numeric/bindings/lapack/hbevx.hpp | 48 +-
   sandbox/boost/numeric/bindings/lapack/heev.hpp | 66 +-
   sandbox/boost/numeric/bindings/lapack/heevd.hpp | 6
   sandbox/boost/numeric/bindings/lapack/heevx.hpp | 6
   sandbox/boost/numeric/bindings/lapack/hegv.hpp | 84 ++--
   sandbox/boost/numeric/bindings/lapack/hesv.hpp | 466 ++++++++++++------------
   sandbox/boost/numeric/bindings/lapack/hpsv.hpp | 162 ++++----
   sandbox/boost/numeric/bindings/lapack/hseqr.hpp | 112 ++--
   sandbox/boost/numeric/bindings/lapack/ilaenv.hpp | 9
   sandbox/boost/numeric/bindings/lapack/lapack.h | 450 +++++++++++-----------
   sandbox/boost/numeric/bindings/lapack/lapack.hpp | 13
   sandbox/boost/numeric/bindings/lapack/lapack_names.h | 21
   sandbox/boost/numeric/bindings/lapack/orgqr.hpp | 88 ++--
   sandbox/boost/numeric/bindings/lapack/ormqr.hpp | 122 +++---
   sandbox/boost/numeric/bindings/lapack/posv.hpp | 192 +++++-----
   sandbox/boost/numeric/bindings/lapack/ppsv.hpp | 158 ++++----
   sandbox/boost/numeric/bindings/lapack/ptsv.hpp | 90 ++--
   sandbox/boost/numeric/bindings/lapack/spsv.hpp | 240 ++++++------
   sandbox/boost/numeric/bindings/lapack/steqr.hpp | 30
   sandbox/boost/numeric/bindings/lapack/syev.hpp | 66 +-
   sandbox/boost/numeric/bindings/lapack/syevd.hpp | 6
   sandbox/boost/numeric/bindings/lapack/syevx.hpp | 6
   sandbox/boost/numeric/bindings/lapack/sygv.hpp | 4
   sandbox/boost/numeric/bindings/lapack/sysv.hpp | 610 ++++++++++++++++----------------
   sandbox/boost/numeric/bindings/lapack/sytrd.hpp | 42 +-
   sandbox/boost/numeric/bindings/lapack/trevc.hpp | 80 ++--
   sandbox/boost/numeric/bindings/lapack/trexc.hpp | 70 +-
   sandbox/boost/numeric/bindings/lapack/workspace.hpp | 6
   44 files changed, 3663 insertions(+), 3667 deletions(-)

Modified: sandbox/boost/numeric/bindings/blas/blas.h
==============================================================================
--- sandbox/boost/numeric/bindings/blas/blas.h (original)
+++ sandbox/boost/numeric/bindings/blas/blas.h 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 //
-// Copyright (C) 2002, 2003 Si-Lab b.v.b.a and Toon Knapen
+// Copyright (C) 2002, 2003 Si-Lab b.v.b.a and Toon Knapen
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,7 +11,7 @@
 
 /*
  * const-correct prototypes for BLAS functions
- *
+ *
  */
 
 #include <boost/numeric/bindings/blas/blas_names.h>
@@ -36,8 +36,8 @@
   double BLAS_DDOT (const int *n, const double *x, const int *incx, const double *y, const int *incy);
 
   void BLAS_CDOTU(fcomplex_t* ret, const int *n, const fcomplex_t *x, const int *incx, const fcomplex_t *y, const int *incy);
- void BLAS_ZDOTU(dcomplex_t* ret, const int *n, const dcomplex_t *x, const int *incx, const dcomplex_t *y, const int *incy);
-
+ void BLAS_ZDOTU(dcomplex_t* ret, const int *n, const dcomplex_t *x, const int *incx, const dcomplex_t *y, const int *incy);
+
   void BLAS_CDOTC(fcomplex_t* ret, const int *n, const fcomplex_t *x, const int *incx, const fcomplex_t *y, const int *incy);
   void BLAS_ZDOTC(dcomplex_t* ret, const int *n, const dcomplex_t *x, const int *incx, const dcomplex_t *y, const int *incy);
 

Modified: sandbox/boost/numeric/bindings/blas/blas1.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/blas/blas1.hpp (original)
+++ sandbox/boost/numeric/bindings/blas/blas1.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -59,7 +59,7 @@
   // y <- alpha * x + y
   template < typename value_type, typename vector_type_x, typename vector_type_y >
   void axpy(const value_type& alpha, const vector_type_x &x, vector_type_y &y )
- {
+ {
 #ifdef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
     BOOST_STATIC_ASSERT( ( is_same< value_type, typename vector_type_x::value_type >::value ) ) ;
     BOOST_STATIC_ASSERT( ( is_same< value_type, typename vector_type_y::value_type >::value ) ) ;
@@ -75,14 +75,14 @@
     const value_type *x_ptr = traits::vector_storage( x ) ;
     value_type *y_ptr = traits::vector_storage( y ) ;
 
- detail::axpy( n, alpha, x_ptr, stride_x, y_ptr, stride_y ) ;
+ detail::axpy( n, alpha, x_ptr, stride_x, y_ptr, stride_y ) ;
   }
 
 
   // dot <- x^T * y (real vectors)
   template < typename vector_type_x, typename vector_type_y >
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typename traits::vector_traits< vector_type_x >::value_type
+ typename traits::vector_traits< vector_type_x >::value_type
 #else
   typename vector_type_x::value_type
 #endif
@@ -98,7 +98,7 @@
 
     typedef
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typename traits::vector_traits< vector_type_x >::value_type
+ typename traits::vector_traits< vector_type_x >::value_type
 #else
     typename vector_type_x::value_type
 #endif
@@ -117,7 +117,7 @@
   // dotu <- x^T * y (complex vectors)
   template < typename vector_type_x, typename vector_type_y >
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typename traits::vector_traits< vector_type_x >::value_type
+ typename traits::vector_traits< vector_type_x >::value_type
 #else
   typename vector_type_x::value_type
 #endif
@@ -143,16 +143,16 @@
     const int stride_y = traits::vector_stride( y ) ;
     const value_type *x_ptr = traits::vector_storage( x ) ;
     const value_type *y_ptr = traits::vector_storage( y ) ;
-
+
     value_type ret ;
     detail::dotu( ret, n, x_ptr, stride_x, y_ptr, stride_y ) ;
     return ret;
   }
 
- // dotc <- x^H * y (complex vectors)
+ // dotc <- x^H * y (complex vectors)
   template < typename vector_type_x, typename vector_type_y >
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typename traits::vector_traits< vector_type_x >::value_type
+ typename traits::vector_traits< vector_type_x >::value_type
 #else
   typename vector_type_x::value_type
 #endif
@@ -178,7 +178,7 @@
     const int stride_y = traits::vector_stride( y ) ;
     const value_type *x_ptr = traits::vector_storage( x ) ;
     const value_type *y_ptr = traits::vector_storage( y ) ;
-
+
     value_type ret ;
     detail::dotc( ret, n, x_ptr, stride_x, y_ptr, stride_y ) ;
     return ret;
@@ -212,11 +212,11 @@
   // .. for now works only with real vectors
   template < typename vector_type >
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typename traits::type_traits< typename traits::vector_traits< vector_type >::value_type >::real_type
+ typename traits::type_traits< typename traits::vector_traits< vector_type >::value_type >::real_type
 #else
   typename traits::type_traits< typename vector_type::value_type >::real_type
 #endif
- asum(const vector_type &x)
+ asum(const vector_type &x)
   {
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
     typedef typename traits::vector_traits< vector_type >::value_type value_type;

Modified: sandbox/boost/numeric/bindings/blas/blas1_overloads.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/blas/blas1_overloads.hpp (original)
+++ sandbox/boost/numeric/bindings/blas/blas1_overloads.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -17,19 +17,19 @@
 
   using namespace boost::numeric::bindings::traits ;
 
- // x *= alpha
- inline void scal(const int& n, const float& alpha, float* x, const int& incx) { BLAS_SSCAL( &n, &alpha, x , &incx ) ; }
+ // x *= alpha
+ inline void scal(const int& n, const float& alpha, float* x, const int& incx) { BLAS_SSCAL( &n, &alpha, x , &incx ) ; }
   inline void scal(const int& n, const double& alpha, double* x, const int& incx) { BLAS_DSCAL( &n, &alpha, x , &incx ) ; }
   inline void scal(const int& n, const complex_f& alpha, complex_f* x, const int& incx) { BLAS_CSCAL( &n, complex_ptr( &alpha ), complex_ptr( x ), &incx ) ; }
   inline void scal(const int& n, const complex_d& alpha, complex_d* x, const int& incx) { BLAS_ZSCAL( &n, complex_ptr( &alpha ), complex_ptr( x ), &incx ) ; }
 
- // y += alpha * x
+ // y += alpha * x
   inline void axpy(const int& n, const float & alpha, const float * x, const int& incx, float * y, const int& incy) { BLAS_SAXPY( &n, &alpha , x , &incx, y , &incy ) ; }
   inline void axpy(const int& n, const double & alpha, const double * x, const int& incx, double * y, const int& incy) { BLAS_DAXPY( &n, &alpha , x , &incx, y , &incy ) ; }
   inline void axpy(const int& n, const complex_f& alpha, const complex_f* x, const int& incx, complex_f* y, const int& incy) { BLAS_CAXPY( &n, complex_ptr( &alpha ), complex_ptr( x ), &incx, complex_ptr( y ), &incy ) ; }
   inline void axpy(const int& n, const complex_d& alpha, const complex_d* x, const int& incx, complex_d* y, const int& incy) { BLAS_ZAXPY( &n, complex_ptr( &alpha ), complex_ptr( x ), &incx, complex_ptr( y ), &incy ) ; }
 
- // x^T . y
+ // x^T . y
   inline float dot(const int& n, const float * x, const int& incx, const float * y, const int& incy) { return BLAS_SDOT( &n, x, &incx, y, &incy ) ; }
   inline double dot(const int& n, const double* x, const int& incx, const double* y, const int& incy) { return BLAS_DDOT( &n, x, &incx, y, &incy ) ; }
 
@@ -46,13 +46,13 @@
   inline double nrm2(const int& n, const double* x, const int& incx) { return BLAS_DNRM2( &n, x, &incx ) ; }
   inline float nrm2(const int& n, const complex_f* x, const int& incx) { return BLAS_SCNRM2( &n, complex_ptr(x), &incx ) ; }
   inline double nrm2(const int& n, const complex_d* x, const int& incx) { return BLAS_DZNRM2( &n, complex_ptr(x), &incx ) ; }
-
+
   // 1-norm
   inline float asum(const int& n, const float* x, const int& incx) { return BLAS_SASUM( &n, x, &incx ) ; }
   inline double asum(const int& n, const double* x, const int& incx) { return BLAS_DASUM( &n, x, &incx ) ; }
   inline float asum(const int& n, const complex_f* x, const int& incx) { return BLAS_SCASUM( &n, complex_ptr(x), &incx ) ; }
   inline double asum(const int& n, const complex_d* x, const int& incx) { return BLAS_DZASUM( &n, complex_ptr(x), &incx ) ; }
-
+
   // copy
   inline void copy(const int& n, const float* x, const int& incx, float* y, const int& incy) { BLAS_SCOPY( &n, x, &incx, y, &incy ) ; }
   inline void copy(const int& n, const double* x, const int& incx, double* y, const int& incy) { BLAS_DCOPY( &n, x, &incx, y, &incy ) ; }
@@ -61,4 +61,3 @@
 }}}}}
 
 #endif // BOOST_NUMERIC_BINDINGS_BLAS_BLAS1_OVERLOADS_HPP
-

Modified: sandbox/boost/numeric/bindings/blas/blas2.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/blas/blas2.hpp (original)
+++ sandbox/boost/numeric/bindings/blas/blas2.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -14,7 +14,7 @@
 #include <boost/numeric/bindings/traits/transpose.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits.hpp>
-#include <cassert>
+#include <cassert>
 
 namespace boost { namespace numeric { namespace bindings { namespace blas {
 
@@ -22,13 +22,13 @@
   // op (A) == A || A^T || A^H
   // ! CAUTION this function assumes that all matrices involved are column-major matrices
   template < typename matrix_type, typename vector_type_x, typename vector_type_y, typename value_type >
- void gemv(const char TRANS,
- const value_type& alpha,
- const matrix_type &a,
- const vector_type_x &x,
- const value_type& beta,
- vector_type_y &y
- )
+ void gemv(const char TRANS,
+ const value_type& alpha,
+ const matrix_type &a,
+ const vector_type_x &x,
+ const value_type& beta,
+ vector_type_y &y
+ )
   {
     // precondition: matrix_type must be dense or dense_proxy
     /* not all compilers can handle the traits
@@ -39,9 +39,9 @@
 
     const int m = traits::matrix_size1( a ) ;
     const int n = traits::matrix_size2( a ) ;
- assert ( traits::vector_size( x ) >= (TRANS == traits::NO_TRANSPOSE ? n : m) ) ;
- assert ( traits::vector_size( y ) >= (TRANS == traits::NO_TRANSPOSE ? m : n) ) ;
- const int lda = traits::leading_dimension( a ) ;
+ assert ( traits::vector_size( x ) >= (TRANS == traits::NO_TRANSPOSE ? n : m) ) ;
+ assert ( traits::vector_size( y ) >= (TRANS == traits::NO_TRANSPOSE ? m : n) ) ;
+ const int lda = traits::leading_dimension( a ) ;
     const int stride_x = traits::vector_stride( x ) ;
     const int stride_y = traits::vector_stride( y ) ;
 
@@ -52,13 +52,13 @@
     detail::gemv( TRANS, m, n, alpha, a_ptr, lda, x_ptr, stride_x, beta, y_ptr, stride_y );
   }
 
- // A <- alpha * x * trans(y) ( outer product ), alpha, x and y are real-valued
+ // A <- alpha * x * trans(y) ( outer product ), alpha, x and y are real-valued
   // ! CAUTION this function assumes that all matrices involved are column-major matrices
   template < typename vector_type_x, typename vector_type_y, typename value_type, typename matrix_type >
- void ger( const value_type& alpha,
- const vector_type_x &x,
+ void ger( const value_type& alpha,
+ const vector_type_x &x,
             const vector_type_y &y,
- matrix_type &a
+ matrix_type &a
             )
   {
     // precondition: matrix_type must be dense or dense_proxy
@@ -70,9 +70,9 @@
 
     const int m = traits::matrix_size1( a ) ;
     const int n = traits::matrix_size2( a ) ;
- assert ( traits::vector_size( x ) <= m ) ;
- assert ( traits::vector_size( y ) <= n ) ;
- const int lda = traits::leading_dimension( a ) ;
+ assert ( traits::vector_size( x ) <= m ) ;
+ assert ( traits::vector_size( y ) <= n ) ;
+ const int lda = traits::leading_dimension( a ) ;
     const int stride_x = traits::vector_stride( x ) ;
     const int stride_y = traits::vector_stride( y ) ;
 
@@ -85,8 +85,8 @@
 /*
   // A <- alpha * x * trans(y) ( outer product ), alpha, x and y are complex-valued
   template < typename vector_type_x, typename vector_type_y, typename value_type, typename matrix_type >
- void geru( const value_type& alpha,
- const vector_type_x &x,
+ void geru( const value_type& alpha,
+ const vector_type_x &x,
              const vector_type_y &y,
              matrix_type &a
              )
@@ -96,14 +96,14 @@
 // BOOST_STATIC_ASSERT( ( boost::is_same< typename mtraits::matrix_structure,
 // boost::numeric::bindings::traits::general_t
 // >::value ) ) ;
-
+
 
 // BOOST_STATIC_ASSERT( ( boost::is_same< x.value_type(), FEMTown::Complex() >::value ) ) ;
     const int m = traits::matrix_size1( a ) ;
     const int n = traits::matrix_size2( a ) ;
- assert ( traits::vector_size( x ) <= m ) ;
- assert ( traits::vector_size( y ) <= n ) ;
- const int lda = traits::leading_dimension( a ) ;
+ assert ( traits::vector_size( x ) <= m ) ;
+ assert ( traits::vector_size( y ) <= n ) ;
+ const int lda = traits::leading_dimension( a ) ;
     const int stride_x = traits::vector_stride( x ) ;
     const int stride_y = traits::vector_stride( y ) ;
 
@@ -117,14 +117,14 @@
   /*
   // y <- alpha * A * x + beta * y
   template < typename matrix_type, typename vector_type_x, typename vector_type_y >
- void gemv(const typename traits::matrix_traits<matrix_type>::value_type &alpha,
- const matrix_type &a,
- const vector_type_x &x,
- const typename traits::vector_traits<vector_type_y>::value_type &beta,
- vector_type_y &y
- )
+ void gemv(const typename traits::matrix_traits<matrix_type>::value_type &alpha,
+ const matrix_type &a,
+ const vector_type_x &x,
+ const typename traits::vector_traits<vector_type_y>::value_type &beta,
+ vector_type_y &y
+ )
   {
- gemv( traits::NO_TRANSPOSE, alpha, a, x, beta, y );
+ gemv( traits::NO_TRANSPOSE, alpha, a, x, beta, y );
   }
 
 
@@ -132,7 +132,7 @@
   template < typename matrix_type, typename vector_type_x, typename vector_type_y >
   void gemv(const matrix_type &a, const vector_type_x &x, vector_type_y &y)
   {
- typedef typename traits::matrix_traits<matrix_type>::value_type val_t;
+ typedef typename traits::matrix_traits<matrix_type>::value_type val_t;
     gemv( traits::NO_TRANSPOSE, (val_t) 1, a, x, (val_t) 0, y );
   }
   */

Modified: sandbox/boost/numeric/bindings/blas/blas3.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/blas/blas3.hpp (original)
+++ sandbox/boost/numeric/bindings/blas/blas3.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -15,24 +15,24 @@
 
 namespace boost { namespace numeric { namespace bindings { namespace blas {
 
- // C <- alpha * op (A) * op (B) + beta * C
+ // C <- alpha * op (A) * op (B) + beta * C
   // op (X) == X || X^T || X^H
   template < typename value_type, typename matrix_type_a, typename matrix_type_b, typename matrix_type_c >
   // ! CAUTION this function assumes that all matrices involved are column-major matrices
- void gemm(const char TRANSA, const char TRANSB,
- const value_type& alpha,
- const matrix_type_a &a,
- const matrix_type_b &b,
- const value_type &beta,
- matrix_type_c &c
- )
+ void gemm(const char TRANSA, const char TRANSB,
+ const value_type& alpha,
+ const matrix_type_a &a,
+ const matrix_type_b &b,
+ const value_type &beta,
+ matrix_type_c &c
+ )
   {
     const int m = TRANSA == traits::NO_TRANSPOSE ? traits::matrix_size1( a ) : traits::matrix_size2( a ) ;
     const int n = TRANSB == traits::NO_TRANSPOSE ? traits::matrix_size2( b ) : traits::matrix_size1( b );
     const int k = TRANSA == traits::NO_TRANSPOSE ? traits::matrix_size2( a ) : traits::matrix_size1( a ) ;
     assert( k == ( TRANSB == traits::NO_TRANSPOSE ? traits::matrix_size1( b ) : traits::matrix_size2( b ) ) ) ;
- assert( m == traits::matrix_size1( c ) );
- assert( n == traits::matrix_size2( c ) );
+ assert( m == traits::matrix_size1( c ) );
+ assert( n == traits::matrix_size2( c ) );
     const int lda = traits::leading_dimension( a );
     const int ldb = traits::leading_dimension( b );
     const int ldc = traits::leading_dimension( c );
@@ -45,27 +45,27 @@
   }
 
 
- // C <- alpha * A * B + beta * C
+ // C <- alpha * A * B + beta * C
   template < typename value_type, typename matrix_type_a, typename matrix_type_b, typename matrix_type_c >
   void gemm(const value_type& alpha,
- const matrix_type_a &a,
- const matrix_type_b &b,
- const value_type &beta,
- matrix_type_c &c
- )
+ const matrix_type_a &a,
+ const matrix_type_b &b,
+ const value_type &beta,
+ matrix_type_c &c
+ )
   {
     gemm( traits::NO_TRANSPOSE, traits::NO_TRANSPOSE, alpha, a, b, beta, c ) ;
   }
 
 
- // C <- A * B
+ // C <- A * B
   // ! CAUTION this function assumes that all matrices involved are column-major matrices
- template <
- typename matrix_type_a, typename matrix_type_b, typename matrix_type_c
+ template <
+ typename matrix_type_a, typename matrix_type_b, typename matrix_type_c
>
   void gemm(const matrix_type_a &a, const matrix_type_b &b, matrix_type_c &c)
   {
- typedef typename traits::matrix_traits<matrix_type_c>::value_type val_t;
+ typedef typename traits::matrix_traits<matrix_type_c>::value_type val_t;
     gemm( traits::NO_TRANSPOSE, traits::NO_TRANSPOSE, (val_t) 1, a, b, (val_t) 0, c ) ;
   }
 

Modified: sandbox/boost/numeric/bindings/lapack/gbsv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gbsv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gbsv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -14,13 +14,13 @@
 #include <boost/numeric/bindings/lapack/lapack.h>
 
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -28,25 +28,25 @@
     namespace detail {
       inline
       void gbtrf (int const n, int const m, int const kl, int const ku,
- float* ab, int const ldab, int* ipiv, int* info)
+ float* ab, int const ldab, int* ipiv, int* info)
       {
         LAPACK_SGBTRF (&n, &m, &kl, &ku, ab, &ldab, ipiv, info);
       }
       inline
       void gbtrf (int const n, int const m, int const kl, int const ku,
- double* ab, int const ldab, int* ipiv, int* info)
+ double* ab, int const ldab, int* ipiv, int* info)
       {
         LAPACK_DGBTRF (&n, &m, &kl, &ku, ab, &ldab, ipiv, info);
       }
       inline
       void gbtrf (int const n, int const m, int const kl, int const ku,
- traits::complex_f* ab, int const ldab, int* ipiv, int* info)
+ traits::complex_f* ab, int const ldab, int* ipiv, int* info)
       {
         LAPACK_CGBTRF (&n, &m, &kl, &ku, traits::complex_ptr(ab), &ldab, ipiv, info);
       }
       inline
       void gbtrf (int const n, int const m, int const kl, int const ku,
- traits::complex_d* ab, int const ldab, int* ipiv, int* info)
+ traits::complex_d* ab, int const ldab, int* ipiv, int* info)
       {
         LAPACK_ZGBTRF (&n, &m, &kl, &ku, traits::complex_ptr(ab), &ldab, ipiv, info);
       }
@@ -57,17 +57,17 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::banded_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::ordering_type,
+ typename traits::matrix_traits<MatrA>::ordering_type,
         traits::row_major_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (a);
- int const m = traits::matrix_size2 (a);
+ int const m = traits::matrix_size2 (a);
       assert (traits::vector_size (ipiv) == (m < n ? m : n));
 
       // if the matrix has kl lower and ku upper diagonals, then we should have
@@ -78,13 +78,13 @@
 
       assert(ku >= 0);
 
- int info;
+ int info;
       detail::gbtrf (n, m, kl, ku,
- traits::matrix_storage (a),
- ld,
- traits::vector_storage (ipiv),
+ traits::matrix_storage (a),
+ ld,
+ traits::vector_storage (ipiv),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -92,28 +92,28 @@
       inline
       void gbtrs (char const trans, int const n, int const kl, int const ku, int const m,
                   float const* ab, int const ldab, int const* ipiv,
- float* b, int const ldb, int* info)
+ float* b, int const ldb, int* info)
       {
         LAPACK_SGBTRS (&trans, &n, &kl, &ku, &m, ab, &ldab, ipiv, b, &ldb, info);
       }
       inline
       void gbtrs (char const trans, int const n, int const kl, int const ku, int const m,
                   double const* ab, int const ldab, int const* ipiv,
- double* b, int const ldb, int* info)
+ double* b, int const ldb, int* info)
       {
         LAPACK_DGBTRS (&trans, &n, &kl, &ku, &m, ab, &ldab, ipiv, b, &ldb, info);
       }
       inline
       void gbtrs (char const trans, int const n, int const kl, int const ku, int const m,
                   traits::complex_f const* ab, int const ldab, int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* b, int const ldb, int* info)
       {
         LAPACK_CGBTRS (&trans, &n, &kl, &ku, &m, traits::complex_ptr(ab), &ldab, ipiv, traits::complex_ptr(b), &ldb, info);
       }
       inline
       void gbtrs (char const trans, int const n, int const kl, int const ku, int const m,
                   traits::complex_d const* ab, int const ldab, int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d* b, int const ldb, int* info)
       {
         LAPACK_ZGBTRS (&trans, &n, &kl, &ku, &m, traits::complex_ptr(ab), &ldab, ipiv, traits::complex_ptr(b), &ldb, info);
       }
@@ -121,21 +121,21 @@
 
 
     template <typename MatrA, typename MatrB, typename IVec>
- int gbtrs (char const trans, MatrA const& a, IVec const& ipiv, MatrB& b)
+ int gbtrs (char const trans, MatrA const& a, IVec const& ipiv, MatrB& b)
     {
- assert (trans == 'N' || trans == 'T' || trans == 'C');
+ assert (trans == 'N' || trans == 'T' || trans == 'C');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::banded_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (ipiv));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (ipiv));
 
       // if the matrix has kl lower and ku upper diagonals, then we should have
       // allocated kl lower and kl+ku upper diagonals
@@ -145,23 +145,23 @@
 
       assert(ku >= 0);
 
- int info;
- detail::gbtrs (trans, n, kl, ku, traits::matrix_size2 (b),
+ int info;
+ detail::gbtrs (trans, n, kl, ku, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
-#endif
+ traits::matrix_storage_const (a),
+#endif
                      ld,
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
 #else
- traits::vector_storage_const (ipiv),
+ traits::vector_storage_const (ipiv),
 #endif
                      traits::matrix_storage (b),
                      traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -169,4 +169,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/gees.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gees.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gees.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -22,23 +22,23 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 #include <boost/numeric/bindings/traits/detail/utils.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Schur factorization of general matrix.
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * gees() computes a Schur factorization of an N-by-N matrix A.
      *
      * The Schur decomposition is A = U S * herm(U) where U is a
@@ -56,14 +56,14 @@
      * array with vector_size( work ) >= 2*matrix_size1( a )
      * and rwork is a real array with
      * vector_size( rwork ) >= matrix_size1( a ).
- */
+ */
 
     namespace detail {
- inline
+ inline
       void gees (char const jobvs, char const sort, logical_t* select, int const n,
                  float* a, int const lda, int& sdim, traits::complex_f* w,
                  float* vs, int const ldvs, float* work, int const lwork,
- bool* bwork, int& info)
+ bool* bwork, int& info)
       {
         traits::detail::array<float> wr(n);
         traits::detail::array<float> wi(n);
@@ -77,11 +77,11 @@
       }
 
 
- inline
+ inline
       void gees (char const jobvs, char const sort, logical_t* select, int const n,
                  double* a, int const lda, int& sdim, traits::complex_d* w,
                  double* vs, int const ldvs, double* work, int const lwork,
- bool* bwork, int& info)
+ bool* bwork, int& info)
       {
         traits::detail::array<double> wr(n);
         traits::detail::array<double> wi(n);
@@ -95,12 +95,12 @@
       }
 
 
- inline
+ inline
       void gees (char const jobvs, char const sort, logical_t* select, int const n,
                  traits::complex_f* a, int const lda, int& sdim, traits::complex_f* w,
                  traits::complex_f* vs, int const ldvs,
                  traits::complex_f* work, int lwork, float* rwork, bool* bwork,
- int& info)
+ int& info)
       {
         LAPACK_CGEES (&jobvs, &sort, select, &n, traits::complex_ptr(a), &lda, &sdim,
                       traits::complex_ptr(w), traits::complex_ptr (vs), &ldvs,
@@ -108,19 +108,19 @@
       }
 
 
- inline
+ inline
       void gees (char const jobvs, char const sort, logical_t* select, int const n,
                  traits::complex_d* a, int const lda, int& sdim, traits::complex_d* w,
                  traits::complex_d* vs, int const ldvs,
                  traits::complex_d* work, int lwork, double* rwork, bool* bwork,
- int& info)
+ int& info)
       {
         LAPACK_ZGEES (&jobvs, &sort, select, &n, traits::complex_ptr(a), &lda, &sdim,
                       traits::complex_ptr(w), traits::complex_ptr(vs), &ldvs,
                       traits::complex_ptr(work), &lwork, rwork, bwork, &info);
       }
 
- }
+ }
 
 
     namespace detail {
@@ -128,41 +128,41 @@
        template <typename MatrA, typename SchVec, typename EigVal, typename Work>
        int gees (char jobvs, MatrA& a, EigVal& w, SchVec& vs, Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
            traits::general_t
- >::value));
+ >::value));
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SchVec>::matrix_structure,
+ typename traits::matrix_traits<SchVec>::matrix_structure,
            traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
          typedef typename MatrA::value_type value_type ;
 
          int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (vs));
- assert (n == traits::matrix_size2 (vs));
- assert (n == traits::vector_size (w));
- assert (3*n <= traits::vector_size (work));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (vs));
+ assert (n == traits::matrix_size2 (vs));
+ assert (n == traits::vector_size (w));
+ assert (3*n <= traits::vector_size (work));
 
          logical_t* select=0;
          bool* bwork=0;
 
- int info, sdim;
+ int info, sdim;
          detail::gees (jobvs, 'N', select, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                        traits::leading_dimension (a),
                        sdim,
                        traits::vector_storage (w),
                        traits::matrix_storage (vs),
                        traits::leading_dimension (vs),
- traits::vector_storage( work ),
- traits::vector_size( work ),
+ traits::vector_storage( work ),
+ traits::vector_size( work ),
                        bwork, info);
- return info ;
+ return info ;
        } // gees()
 
 
@@ -170,45 +170,45 @@
        template <typename MatrA, typename SchVec, typename EigVal,
                  typename Work, typename RWork>
        int gees (char jobvs, MatrA& a, EigVal& w, SchVec& vs,
- Work& work, RWork& rwork) {
+ Work& work, RWork& rwork) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
            traits::general_t
- >::value));
+ >::value));
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SchVec>::matrix_structure,
+ typename traits::matrix_traits<SchVec>::matrix_structure,
            traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
          typedef typename MatrA::value_type value_type ;
 
          int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (vs));
- assert (n == traits::matrix_size2 (vs));
- assert (n == traits::vector_size (w));
- assert (2*n <= traits::vector_size (work));
- assert (n <= traits::vector_size (rwork));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (vs));
+ assert (n == traits::matrix_size2 (vs));
+ assert (n == traits::vector_size (w));
+ assert (2*n <= traits::vector_size (work));
+ assert (n <= traits::vector_size (rwork));
 
          logical_t* select=0;
          bool* bwork=0;
 
- int info, sdim;
+ int info, sdim;
          detail::gees (jobvs, 'N', select, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                        traits::leading_dimension (a),
                        sdim,
                        traits::vector_storage (w),
                        traits::matrix_storage (vs),
                        traits::leading_dimension (vs),
- traits::vector_storage( work ),
- traits::vector_size( work ),
- traits::vector_storage( rwork ),
+ traits::vector_storage( work ),
+ traits::vector_size( work ),
+ traits::vector_storage( rwork ),
                        bwork, info);
- return info ;
+ return info ;
        } // gees()
 
 
@@ -331,4 +331,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/geev.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/geev.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/geev.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright (c) Andreas Kloeckner 2004
  * Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
@@ -7,7 +7,7 @@
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -22,26 +22,26 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Eigendecomposition of a general matrix A * V = V * D
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * geev() computes the eigendecomposition of a N x N matrix,
- * where V is a N x N matrix and D is a diagonal matrix. The
- * diagonal element D(i,i) is an eigenvalue of A and Q(:,i) is
+ * where V is a N x N matrix and D is a diagonal matrix. The
+ * diagonal element D(i,i) is an eigenvalue of A and Q(:,i) is
      * a corresponding eigenvector.
      *
      *
@@ -65,64 +65,64 @@
      * If you choose to leave them real, you have to pick apart the complex-conjugate
      * eigenpairs as per the LAPACK documentation. If you choose them complex,
      * the code will do the picking-apart on your behalf, at the expense of 4*N
- * extra storage. Only if vr is complex, it will really fulfill its invariant
+ * extra storage. Only if vr is complex, it will really fulfill its invariant
      * on exit to the code in all cases, since complex pairs spoil that relation.
- */
+ */
 
     namespace detail {
 
       inline
       int geev_backend(const char* jobvl, const char* jobvr, const int* n, float* a,
- const int* lda, float* wr, float* wi, float* vl, const int* ldvl,
- float* vr, const int* ldvr, float* work, const int* lwork)
+ const int* lda, float* wr, float* wi, float* vl, const int* ldvl,
+ float* vr, const int* ldvr, float* work, const int* lwork)
       {
- int info;
- LAPACK_SGEEV(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, &info);
- return info;
+ int info;
+ LAPACK_SGEEV(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, &info);
+ return info;
       }
 
       inline
       int geev_backend(const char* jobvl, const char* jobvr, const int* n, double* a,
- const int* lda, double* wr, double* wi, double* vl, const int* ldvl,
- double* vr, const int* ldvr, double* work, const int* lwork)
+ const int* lda, double* wr, double* wi, double* vl, const int* ldvl,
+ double* vr, const int* ldvr, double* work, const int* lwork)
       {
- int info;
- LAPACK_DGEEV(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, &info);
- return info;
+ int info;
+ LAPACK_DGEEV(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, work, lwork, &info);
+ return info;
       }
 
       inline
       int geev_backend(const char* jobvl, const char* jobvr, const int* n, traits::complex_f* a,
- const int* lda, traits::complex_f* w, traits::complex_f* vl, const int* ldvl,
- traits::complex_f* vr, const int* ldvr, traits::complex_f* work, const int* lwork,
- float* rwork)
+ const int* lda, traits::complex_f* w, traits::complex_f* vl, const int* ldvl,
+ traits::complex_f* vr, const int* ldvr, traits::complex_f* work, const int* lwork,
+ float* rwork)
       {
- int info;
- LAPACK_CGEEV(jobvl, jobvr, n,
- traits::complex_ptr(a), lda,
- traits::complex_ptr(w),
- traits::complex_ptr(vl), ldvl,
- traits::complex_ptr(vr), ldvr,
- traits::complex_ptr(work), lwork,
- rwork, &info);
- return info;
+ int info;
+ LAPACK_CGEEV(jobvl, jobvr, n,
+ traits::complex_ptr(a), lda,
+ traits::complex_ptr(w),
+ traits::complex_ptr(vl), ldvl,
+ traits::complex_ptr(vr), ldvr,
+ traits::complex_ptr(work), lwork,
+ rwork, &info);
+ return info;
       }
 
       inline
       int geev_backend(const char* jobvl, const char* jobvr, const int* n, traits::complex_d* a,
- const int* lda, traits::complex_d* w, traits::complex_d* vl, const int* ldvl,
- traits::complex_d* vr, const int* ldvr, traits::complex_d* work, const int* lwork,
- double* rwork)
+ const int* lda, traits::complex_d* w, traits::complex_d* vl, const int* ldvl,
+ traits::complex_d* vr, const int* ldvr, traits::complex_d* work, const int* lwork,
+ double* rwork)
       {
- int info;
- LAPACK_ZGEEV(jobvl, jobvr, n,
- traits::complex_ptr(a), lda,
- traits::complex_ptr(w),
- traits::complex_ptr(vl), ldvl,
- traits::complex_ptr(vr), ldvr,
- traits::complex_ptr(work), lwork,
- rwork, &info);
- return info;
+ int info;
+ LAPACK_ZGEEV(jobvl, jobvr, n,
+ traits::complex_ptr(a), lda,
+ traits::complex_ptr(w),
+ traits::complex_ptr(vl), ldvl,
+ traits::complex_ptr(vr), ldvr,
+ traits::complex_ptr(work), lwork,
+ rwork, &info);
+ return info;
       }
 
 
@@ -135,174 +135,174 @@
 
       // real case
       template <typename A, typename W, typename V>
- int geev(real_case, const char jobvl, const char jobvr, A& a, W& w,
- V* vl, V *vr)
+ int geev(real_case, const char jobvl, const char jobvr, A& a, W& w,
+ V* vl, V *vr)
       {
- int const n = traits::matrix_size1(a);
- typedef typename A::value_type value_type;
- traits::detail::array<value_type> wr(n);
- traits::detail::array<value_type> wi(n);
-
- traits::detail::array<value_type> vl2(vl ? 0 : n);
- traits::detail::array<value_type> vr2(vr ? 0 : n);
- value_type* vl_real = vl ? traits::matrix_storage(*vl) : vl2.storage();
- const int ldvl = vl ? traits::matrix_size2(*vl) : 1;
- value_type* vr_real = vr ? traits::matrix_storage(*vr) : vr2.storage();
- const int ldvr = vr ? traits::matrix_size2(*vr) : 1;
-
-
- // workspace query
- int lwork = -1;
- value_type work_temp;
- int result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- wr.storage(), wi.storage(),
- vl_real, &ldvl, vr_real, &ldvr,
- &work_temp, &lwork);
- if (result != 0)
- return result;
-
- lwork = (int) work_temp;
- traits::detail::array<value_type> work(lwork);
- result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- wr.storage(), wi.storage(),
- vl_real, &ldvl, vr_real, &ldvr,
- work.storage(), &lwork);
-
- for (int i = 0; i < n; i++)
- traits::vector_storage(w)[i] = std::complex<value_type>(wr[i], wi[i]);
- return result;
+ int const n = traits::matrix_size1(a);
+ typedef typename A::value_type value_type;
+ traits::detail::array<value_type> wr(n);
+ traits::detail::array<value_type> wi(n);
+
+ traits::detail::array<value_type> vl2(vl ? 0 : n);
+ traits::detail::array<value_type> vr2(vr ? 0 : n);
+ value_type* vl_real = vl ? traits::matrix_storage(*vl) : vl2.storage();
+ const int ldvl = vl ? traits::matrix_size2(*vl) : 1;
+ value_type* vr_real = vr ? traits::matrix_storage(*vr) : vr2.storage();
+ const int ldvr = vr ? traits::matrix_size2(*vr) : 1;
+
+
+ // workspace query
+ int lwork = -1;
+ value_type work_temp;
+ int result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ wr.storage(), wi.storage(),
+ vl_real, &ldvl, vr_real, &ldvr,
+ &work_temp, &lwork);
+ if (result != 0)
+ return result;
+
+ lwork = (int) work_temp;
+ traits::detail::array<value_type> work(lwork);
+ result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ wr.storage(), wi.storage(),
+ vl_real, &ldvl, vr_real, &ldvr,
+ work.storage(), &lwork);
+
+ for (int i = 0; i < n; i++)
+ traits::vector_storage(w)[i] = std::complex<value_type>(wr[i], wi[i]);
+ return result;
       }
 
       // mixed (i.e. real with complex vectors) case
       template <typename A, typename W, typename V>
- int geev(mixed_case, const char jobvl, const char jobvr, A& a, W& w,
- V* vl, V *vr)
+ int geev(mixed_case, const char jobvl, const char jobvr, A& a, W& w,
+ V* vl, V *vr)
       {
- int const n = traits::matrix_size1(a);
- typedef typename A::value_type value_type;
- traits::detail::array<value_type> wr(n);
- traits::detail::array<value_type> wi(n);
-
- traits::detail::array<value_type> vl2(vl ? n*n : n);
- traits::detail::array<value_type> vr2(vr ? n*n : n);
- const int ldvl2 = vl ? n : 1;
- const int ldvr2 = vr ? n : 1;
-
- // workspace query
- int lwork = -1;
- value_type work_temp;
- int result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- wr.storage(), wi.storage(),
- vl2.storage(), &ldvl2, vr2.storage(), &ldvr2,
- &work_temp, &lwork);
- if (result != 0)
- return result;
-
- lwork = (int) work_temp;
- traits::detail::array<value_type> work(lwork);
- result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- wr.storage(), wi.storage(),
- vl2.storage(), &ldvl2, vr2.storage(), &ldvr2,
- work.storage(), &lwork);
-
- typedef typename V::value_type vec_value_type;
- vec_value_type* vl_stor = NULL;
- vec_value_type* vr_stor = NULL;
- int ldvl = 0, ldvr = 0;
- if (vl)
- {
- vl_stor = traits::matrix_storage(*vl);
- ldvl = traits::matrix_size2(*vl);
- }
- if (vr)
- {
- vr_stor = traits::matrix_storage(*vr);
- ldvr = traits::matrix_size2(*vr);
- }
-
- for (int i = 0; i < n; i++)
+ int const n = traits::matrix_size1(a);
+ typedef typename A::value_type value_type;
+ traits::detail::array<value_type> wr(n);
+ traits::detail::array<value_type> wi(n);
+
+ traits::detail::array<value_type> vl2(vl ? n*n : n);
+ traits::detail::array<value_type> vr2(vr ? n*n : n);
+ const int ldvl2 = vl ? n : 1;
+ const int ldvr2 = vr ? n : 1;
+
+ // workspace query
+ int lwork = -1;
+ value_type work_temp;
+ int result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ wr.storage(), wi.storage(),
+ vl2.storage(), &ldvl2, vr2.storage(), &ldvr2,
+ &work_temp, &lwork);
+ if (result != 0)
+ return result;
+
+ lwork = (int) work_temp;
+ traits::detail::array<value_type> work(lwork);
+ result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ wr.storage(), wi.storage(),
+ vl2.storage(), &ldvl2, vr2.storage(), &ldvr2,
+ work.storage(), &lwork);
+
+ typedef typename V::value_type vec_value_type;
+ vec_value_type* vl_stor = NULL;
+ vec_value_type* vr_stor = NULL;
+ int ldvl = 0, ldvr = 0;
+ if (vl)
+ {
+ vl_stor = traits::matrix_storage(*vl);
+ ldvl = traits::matrix_size2(*vl);
+ }
+ if (vr)
+ {
+ vr_stor = traits::matrix_storage(*vr);
+ ldvr = traits::matrix_size2(*vr);
+ }
+
+ for (int i = 0; i < n; i++)
         {
           traits::vector_storage(w)[i] = std::complex<value_type>(wr[i], wi[i]);
- if (wi[i] != 0)
- {
- assert(i+1 < n);
- assert(wr[i+1] == wr[i]);
- assert(wi[i+1] == -wi[i]);
+ if (wi[i] != 0)
+ {
+ assert(i+1 < n);
+ assert(wr[i+1] == wr[i]);
+ assert(wi[i+1] == -wi[i]);
 
             traits::vector_storage(w)[i+1] = std::complex<value_type>(wr[i+1], wi[i+1]);
- for (int j = 0; j < n; j++)
- {
- if (vl)
- {
- vl_stor[i*ldvl+j] = std::complex<value_type>(vl2[i*n+j], vl2[(i+1)*n+j]);
- vl_stor[(i+1)*ldvl+j] = std::complex<value_type>(vl2[i*n+j], -vl2[(i+1)*n+j]);
- }
- if (vr)
- {
- vr_stor[i*ldvr+j] = std::complex<value_type>(vr2[i*n+j], vr2[(i+1)*n+j]);
- vr_stor[(i+1)*ldvr+j] = std::complex<value_type>(vr2[i*n+j], -vr2[(i+1)*n+j]);
- }
- }
-
- i++;
- }
- else
- {
- for (int j = 0; j < n; j++)
- {
- if (vl)
- vl_stor[i*ldvl+j] = vl2[i*n+j];
- if (vr)
- vr_stor[i*ldvr+j] = vr2[i*n+j];
- }
- }
- }
- return result;
+ for (int j = 0; j < n; j++)
+ {
+ if (vl)
+ {
+ vl_stor[i*ldvl+j] = std::complex<value_type>(vl2[i*n+j], vl2[(i+1)*n+j]);
+ vl_stor[(i+1)*ldvl+j] = std::complex<value_type>(vl2[i*n+j], -vl2[(i+1)*n+j]);
+ }
+ if (vr)
+ {
+ vr_stor[i*ldvr+j] = std::complex<value_type>(vr2[i*n+j], vr2[(i+1)*n+j]);
+ vr_stor[(i+1)*ldvr+j] = std::complex<value_type>(vr2[i*n+j], -vr2[(i+1)*n+j]);
+ }
+ }
+
+ i++;
+ }
+ else
+ {
+ for (int j = 0; j < n; j++)
+ {
+ if (vl)
+ vl_stor[i*ldvl+j] = vl2[i*n+j];
+ if (vr)
+ vr_stor[i*ldvr+j] = vr2[i*n+j];
+ }
+ }
+ }
+ return result;
       }
 
       // complex case
       template <typename A, typename W, typename V>
- int geev(complex_case, const char jobvl, const char jobvr, A& a, W& w,
- V* vl, V *vr)
+ int geev(complex_case, const char jobvl, const char jobvr, A& a, W& w,
+ V* vl, V *vr)
       {
- typedef typename A::value_type value_type;
- typedef typename traits::type_traits<value_type>::real_type real_type;
+ typedef typename A::value_type value_type;
+ typedef typename traits::type_traits<value_type>::real_type real_type;
 
- int const n = traits::matrix_size1(a);
- traits::detail::array<real_type> rwork(2*n);
+ int const n = traits::matrix_size1(a);
+ traits::detail::array<real_type> rwork(2*n);
 
- traits::detail::array<value_type> vl2(vl ? 0 : n);
- traits::detail::array<value_type> vr2(vr ? 0 : n);
- value_type* vl_real = vl ? traits::matrix_storage(*vl) : vl2.storage();
- const int ldvl = vl ? traits::matrix_size2(*vl) : 1;
- value_type* vr_real = vr ? traits::matrix_storage(*vr) : vr2.storage();
- const int ldvr = vr ? traits::matrix_size2(*vr) : 1;
-
- // workspace query
- int lwork = -1;
- value_type work_temp;
- int result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- traits::vector_storage(w),
- vl_real, &ldvl, vr_real, &ldvr,
- &work_temp, &lwork, rwork.storage());
- if (result != 0)
- return result;
-
- lwork = (int) std::real(work_temp);
- traits::detail::array<value_type> work(lwork);
- result = geev_backend(&jobvl, &jobvr, &n,
- traits::matrix_storage(a), &n,
- traits::vector_storage(w),
- vl_real, &ldvl, vr_real, &ldvr,
- work.storage(), &lwork,
- rwork.storage());
+ traits::detail::array<value_type> vl2(vl ? 0 : n);
+ traits::detail::array<value_type> vr2(vr ? 0 : n);
+ value_type* vl_real = vl ? traits::matrix_storage(*vl) : vl2.storage();
+ const int ldvl = vl ? traits::matrix_size2(*vl) : 1;
+ value_type* vr_real = vr ? traits::matrix_storage(*vr) : vr2.storage();
+ const int ldvr = vr ? traits::matrix_size2(*vr) : 1;
+
+ // workspace query
+ int lwork = -1;
+ value_type work_temp;
+ int result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ traits::vector_storage(w),
+ vl_real, &ldvl, vr_real, &ldvr,
+ &work_temp, &lwork, rwork.storage());
+ if (result != 0)
+ return result;
+
+ lwork = (int) std::real(work_temp);
+ traits::detail::array<value_type> work(lwork);
+ result = geev_backend(&jobvl, &jobvr, &n,
+ traits::matrix_storage(a), &n,
+ traits::vector_storage(w),
+ vl_real, &ldvl, vr_real, &ldvr,
+ work.storage(), &lwork,
+ rwork.storage());
 
- return result;
+ return result;
       }
 
     } // namespace detail
@@ -310,25 +310,25 @@
 
     // gateway / dispatch routine
     template <typename A, typename W, typename V>
- int geev(A& a, W& w, V* vl, V* vr, optimal_workspace)
+ int geev(A& a, W& w, V* vl, V* vr, optimal_workspace)
     {
       // input checking
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
- traits::general_t
- >::value));
-#endif
+ typename traits::matrix_traits<A>::matrix_structure,
+ traits::general_t
+ >::value));
+#endif
 
 #ifndef NDEBUG
       int const n = traits::matrix_size1(a);
 #endif
 
- assert(traits::matrix_size2(a)==n);
- assert(traits::vector_size(w)==n);
- assert(traits::vector_size(w)==n);
- assert(!vr || traits::matrix_size1(*vr)==n);
- assert(!vl || traits::matrix_size1(*vl)==n);
+ assert(traits::matrix_size2(a)==n);
+ assert(traits::vector_size(w)==n);
+ assert(traits::vector_size(w)==n);
+ assert(!vr || traits::matrix_size1(*vr)==n);
+ assert(!vl || traits::matrix_size1(*vl)==n);
 
       // preparation
       typedef typename A::value_type value_type;
@@ -337,19 +337,19 @@
 
       // dispatch
       return detail::geev(typename boost::mpl::if_<
- boost::is_same<value_type, real_type>,
- typename boost::mpl::if_<
- boost::is_same<vec_value_type, real_type>,
- detail::real_case,
- detail::mixed_case>::type,
- detail::complex_case>::type(),
- vl != 0 ? 'V' : 'N',
- vr != 0 ? 'V' : 'N',
- a, w, vl, vr);
+ boost::is_same<value_type, real_type>,
+ typename boost::mpl::if_<
+ boost::is_same<vec_value_type, real_type>,
+ detail::real_case,
+ detail::mixed_case>::type,
+ detail::complex_case>::type(),
+ vl != 0 ? 'V' : 'N',
+ vr != 0 ? 'V' : 'N',
+ a, w, vl, vr);
     }
 
   }
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/gels.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gels.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gels.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -20,185 +20,185 @@
 #include <boost/numeric/bindings/traits/detail/utils.hpp>
 
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
 #endif
 
 namespace boost { namespace numeric { namespace bindings {
-
- namespace lapack {
 
- ////////////////////////////////////////////////////////////////////////
- //
- // Linear Least Squares of an underdetermined or overdetermined matrix
- //
- ///////////////////////////////////////////////////////////////////////
-
- /* gels - uses the LQ or QR factorization to solve an overdetermined
- * or underdetermined linear system. A full rank matrix is
- * assumed.
- *
- * The linear least squares system is defined by A*x=b. A is the m-by-n
- * coefficients matrix and b is the m-by-nrhs matrix. Several
- * right hand side vectors b and solution vectors x can be handled in
- * a single call; they are stored as the columns of the m-by-nrhs right
- * hand side matrix B and the n-by-nrh solution matrix x.
- *
- * If trans = 'N' and m >= n: find least squares solution of overdetermined system
- * minimizes || b - A x ||2
- *
- * if trans = 'N' and m < n: find minimum norm solution of underdetermined system
- * A*X = B
- *
- * if trans = 'T' or 'C' and m >= n: find minimum norm soltion of underdetermined system
- * A^H*X = B
- *
- * if trans = 'T' or 'C' and m < n: find least squares solution of overdetermined system
- * minimize || b - A^H x ||2
- *
- * Workspace is organized following the arguments in the calling sequence.
- * optimal_workspace() : for optimizing use of blas 3 kernels
- * minimal_workspace() : minimum size of work arrays, but does not allow for optimization
- * of blas 3 kernels
- * workspace( work ) : where work size must be at least min(m, n) + max(1, m, n, nrhs)
- *
- *
- * Each solution vector x (length n) is returned column-wise in the rhs matrix B.
- */
-
- namespace detail {
-
- inline void gels(char const trans, const int m, const int n,
- const int nrhs, float *a, const int lda,
- float *b, const int ldb, float *work,
- const int lwork, int *info)
- {
- LAPACK_SGELS(&trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, info);
- }
-
- inline void gels(char const trans, const int m, const int n,
- const int nrhs, double *a, const int lda,
- double *b, const int ldb, double *work,
- const int lwork, int *info)
- {
- LAPACK_DGELS(&trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, info);
- }
-
- inline void gels(char const trans, const int m, const int n,
- const int nrhs, traits::complex_f *a, const int lda,
- traits::complex_f *b, const int ldb, traits::complex_f *work,
- const int lwork, int *info)
- {
- LAPACK_CGELS(&trans, &m, &n, &nrhs,
- traits::complex_ptr(a), &lda,
- traits::complex_ptr(b), &ldb,
- traits::complex_ptr(work), &lwork, info);
- }
-
- inline void gels(char const trans, const int m, const int n,
- const int nrhs, traits::complex_d *a, const int lda,
- traits::complex_d *b, const int ldb, traits::complex_d *work,
- const int lwork, int *info)
- {
- LAPACK_ZGELS(&trans, &m, &n, &nrhs,
- traits::complex_ptr(a), &lda,
- traits::complex_ptr(b), &ldb,
- traits::complex_ptr(work), &lwork, info);
- }
-
- // generic function that calls more detailed lapack function
- template <typename MatrA, typename VecB, typename Work>
- int gels(const char trans, MatrA& A, VecB& b, Work& work)
- {
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int mrhs = traits::matrix_size1(b);
- const int nrhs = traits::matrix_size2(b);
-
- // sanity checks
- assert(trans == 'N' || trans == 'T' || trans == 'C');
- assert(m >= 0 && n >= 0);
- assert(mrhs >= 0 && nrhs >= 0);
- assert(traits::leading_dimension(A) >= 1 && traits::leading_dimension(b) >= 1);
- assert(mrhs == std::max(m, n));
-
- int info;
- detail::gels(trans,
- traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(b),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(b),
- traits::leading_dimension(b),
- traits::vector_storage(work),
- traits::vector_size(work),
- &info);
-
- return info;
- }
-
- // query for recommended workspace
- template <typename MatrA, typename VecB>
- int gels_optimal_work(const char trans, MatrA& A, VecB& b)
- {
- typename MatrA::value_type work;
- int info;
- detail::gels(trans,
- traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(b),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(b),
- traits::leading_dimension(b),
- &work, //traits::vector_storage(work),
- -1, // traits::vector_size(work),
- &info);
-
- assert(info == 0);
-
- int lwork = traits::detail::to_int(work);
-
- return lwork;
- }
- } // namespace detail
-
-
- template <typename MatrA, typename VecB>
- int gels(const char trans, MatrA& A, VecB& b, optimal_workspace)
- {
- // query optimal workspace size
- int work_size = detail::gels_optimal_work(trans, A, b);
- traits::detail::array<typename MatrA::value_type> work(work_size);
-
- return detail::gels(trans, A, b, work);
- }
-
- template <typename MatrA, typename VecB>
- int gels(const char trans, MatrA& A, VecB& b, minimal_workspace)
- {
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int r = traits::matrix_size2(b);
-
- const int minmn = std::min(m, n); //m < n ? m : n;
- const int maxmn = std::max(m, n); // m > n ? m : n;
- const int maxdim = std::max(maxmn, r); // maxmn > r ? maxmn : r;
-
- traits::detail::array<typename MatrA::value_type> work(minmn + std::max(1, maxdim));
-
- return detail::gels(trans, A, b, work);
- }
-
- template <typename MatrA, typename VecB, typename Work>
- int gels(const char trans, MatrA& A, VecB& b, detail::workspace1<Work> workspace)
- {
- return detail::gels(trans, A, b, workspace.w_);
- }
+ namespace lapack {
 
- } // namespace lapack
+ ////////////////////////////////////////////////////////////////////////
+ //
+ // Linear Least Squares of an underdetermined or overdetermined matrix
+ //
+ ///////////////////////////////////////////////////////////////////////
+
+ /* gels - uses the LQ or QR factorization to solve an overdetermined
+ * or underdetermined linear system. A full rank matrix is
+ * assumed.
+ *
+ * The linear least squares system is defined by A*x=b. A is the m-by-n
+ * coefficients matrix and b is the m-by-nrhs matrix. Several
+ * right hand side vectors b and solution vectors x can be handled in
+ * a single call; they are stored as the columns of the m-by-nrhs right
+ * hand side matrix B and the n-by-nrh solution matrix x.
+ *
+ * If trans = 'N' and m >= n: find least squares solution of overdetermined system
+ * minimizes || b - A x ||2
+ *
+ * if trans = 'N' and m < n: find minimum norm solution of underdetermined system
+ * A*X = B
+ *
+ * if trans = 'T' or 'C' and m >= n: find minimum norm soltion of underdetermined system
+ * A^H*X = B
+ *
+ * if trans = 'T' or 'C' and m < n: find least squares solution of overdetermined system
+ * minimize || b - A^H x ||2
+ *
+ * Workspace is organized following the arguments in the calling sequence.
+ * optimal_workspace() : for optimizing use of blas 3 kernels
+ * minimal_workspace() : minimum size of work arrays, but does not allow for optimization
+ * of blas 3 kernels
+ * workspace( work ) : where work size must be at least min(m, n) + max(1, m, n, nrhs)
+ *
+ *
+ * Each solution vector x (length n) is returned column-wise in the rhs matrix B.
+ */
+
+ namespace detail {
+
+ inline void gels(char const trans, const int m, const int n,
+ const int nrhs, float *a, const int lda,
+ float *b, const int ldb, float *work,
+ const int lwork, int *info)
+ {
+ LAPACK_SGELS(&trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, info);
+ }
+
+ inline void gels(char const trans, const int m, const int n,
+ const int nrhs, double *a, const int lda,
+ double *b, const int ldb, double *work,
+ const int lwork, int *info)
+ {
+ LAPACK_DGELS(&trans, &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork, info);
+ }
+
+ inline void gels(char const trans, const int m, const int n,
+ const int nrhs, traits::complex_f *a, const int lda,
+ traits::complex_f *b, const int ldb, traits::complex_f *work,
+ const int lwork, int *info)
+ {
+ LAPACK_CGELS(&trans, &m, &n, &nrhs,
+ traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(work), &lwork, info);
+ }
+
+ inline void gels(char const trans, const int m, const int n,
+ const int nrhs, traits::complex_d *a, const int lda,
+ traits::complex_d *b, const int ldb, traits::complex_d *work,
+ const int lwork, int *info)
+ {
+ LAPACK_ZGELS(&trans, &m, &n, &nrhs,
+ traits::complex_ptr(a), &lda,
+ traits::complex_ptr(b), &ldb,
+ traits::complex_ptr(work), &lwork, info);
+ }
+
+ // generic function that calls more detailed lapack function
+ template <typename MatrA, typename VecB, typename Work>
+ int gels(const char trans, MatrA& A, VecB& b, Work& work)
+ {
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int mrhs = traits::matrix_size1(b);
+ const int nrhs = traits::matrix_size2(b);
+
+ // sanity checks
+ assert(trans == 'N' || trans == 'T' || trans == 'C');
+ assert(m >= 0 && n >= 0);
+ assert(mrhs >= 0 && nrhs >= 0);
+ assert(traits::leading_dimension(A) >= 1 && traits::leading_dimension(b) >= 1);
+ assert(mrhs == std::max(m, n));
+
+ int info;
+ detail::gels(trans,
+ traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(b),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(b),
+ traits::leading_dimension(b),
+ traits::vector_storage(work),
+ traits::vector_size(work),
+ &info);
+
+ return info;
+ }
+
+ // query for recommended workspace
+ template <typename MatrA, typename VecB>
+ int gels_optimal_work(const char trans, MatrA& A, VecB& b)
+ {
+ typename MatrA::value_type work;
+ int info;
+ detail::gels(trans,
+ traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(b),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(b),
+ traits::leading_dimension(b),
+ &work, //traits::vector_storage(work),
+ -1, // traits::vector_size(work),
+ &info);
+
+ assert(info == 0);
+
+ int lwork = traits::detail::to_int(work);
+
+ return lwork;
+ }
+ } // namespace detail
+
+
+ template <typename MatrA, typename VecB>
+ int gels(const char trans, MatrA& A, VecB& b, optimal_workspace)
+ {
+ // query optimal workspace size
+ int work_size = detail::gels_optimal_work(trans, A, b);
+ traits::detail::array<typename MatrA::value_type> work(work_size);
+
+ return detail::gels(trans, A, b, work);
+ }
+
+ template <typename MatrA, typename VecB>
+ int gels(const char trans, MatrA& A, VecB& b, minimal_workspace)
+ {
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int r = traits::matrix_size2(b);
+
+ const int minmn = std::min(m, n); //m < n ? m : n;
+ const int maxmn = std::max(m, n); // m > n ? m : n;
+ const int maxdim = std::max(maxmn, r); // maxmn > r ? maxmn : r;
+
+ traits::detail::array<typename MatrA::value_type> work(minmn + std::max(1, maxdim));
+
+ return detail::gels(trans, A, b, work);
+ }
+
+ template <typename MatrA, typename VecB, typename Work>
+ int gels(const char trans, MatrA& A, VecB& b, detail::workspace1<Work> workspace)
+ {
+ return detail::gels(trans, A, b, workspace.w_);
+ }
+
+ } // namespace lapack
 
 }}}
 

Modified: sandbox/boost/numeric/bindings/lapack/gelsd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gelsd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gelsd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -21,395 +21,395 @@
 #include <boost/numeric/bindings/lapack/ilaenv.hpp>
 
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
 #endif
 
 namespace boost { namespace numeric { namespace bindings {
 
- namespace lapack {
+ namespace lapack {
 
- namespace detail {
+ namespace detail {
 
- inline void gelsd(const int m, const int n, const int nrhs,
- float *a, const int lda, float *b, const int ldb,
- float *s, const float rcond, int *rank, float *work,
- const int lwork, int *iwork, int *info)
- {
- LAPACK_SGELSD(&m, &n, &nrhs, a, &lda, b, &ldb, s,
- &rcond, rank, work, &lwork, iwork, info);
- }
-
- inline void gelsd(const int m, const int n, const int nrhs,
- double *a, const int lda, double *b, const int ldb,
- double *s, const double rcond, int *rank, double *work,
- const int lwork, int *iwork, int *info)
- {
- LAPACK_DGELSD(&m, &n, &nrhs, a, &lda, b, &ldb, s,
- &rcond, rank, work, &lwork, iwork, info);
- }
-
- inline void gelsd(const int m, const int n, const int nrhs,
- traits::complex_f *a, const int lda, traits::complex_f *b,
- const int ldb, float *s, const float rcond, int *rank,
- traits::complex_f *work, const int lwork, float *rwork,
- int *iwork, int *info)
- {
- LAPACK_CGELSD(&m, &n, &nrhs, traits::complex_ptr(a),
- &lda, traits::complex_ptr(b), &ldb, s,
- &rcond, rank, traits::complex_ptr(work),
- &lwork, rwork, iwork, info);
- }
-
- inline void gelsd(const int m, const int n, const int nrhs,
- traits::complex_d *a, const int lda, traits::complex_d *b,
- const int ldb, double *s, const double rcond, int *rank,
- traits::complex_d *work, const int lwork, double *rwork,
- int *iwork, int *info)
- {
- LAPACK_ZGELSD(&m, &n, &nrhs, traits::complex_ptr(a),
- &lda, traits::complex_ptr(b), &ldb, s,
- &rcond, rank, traits::complex_ptr(work),
- &lwork, rwork, iwork, info);
- }
-
- // gelsd for real type
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
- const int maxmn = std::max(m, n);
- const int minmn = std::min(m, n);
-
- // sanity checks
- assert(m >= 0 && n >= 0);
- assert(nrhs >= 0);
- assert(traits::leading_dimension(A) >= std::max(1, m));
- assert(traits::leading_dimension(B) >= std::max(1, maxmn));
- assert(traits::vector_size(work) >= 1);
- assert(traits::vector_size(s) >= std::max(1, minmn));
-
- int info;
- const real_t rcond = -1; // use machine precision
- int rank;
-
- // query for maximum size of subproblems
- const int smlsiz = ilaenv(9, "GELSD", "");
- const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
-
- traits::detail::array<int> iwork(3*minmn*nlvl + 11*minmn);
-
- detail::gelsd(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- traits::vector_storage(work),
- traits::vector_size(work),
- traits::vector_storage(iwork),
- &info);
-
- return info;
- }
-
- // gelsd for complex type
- template <typename MatrA, typename MatrB, typename VecS,
- typename Work, typename RWork>
- int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
- const int maxmn = std::max(m, n);
- const int minmn = std::min(m, n);
-
- // sanity checks
- assert(m >= 0 && n >= 0);
- assert(nrhs >= 0);
- assert(traits::leading_dimension(A) >= std::max(1, m));
- assert(traits::leading_dimension(B) >= std::max(1, maxmn));
- assert(traits::vector_size(work) >= 1);
- assert(traits::vector_size(s) >= std::max(1, minmn));
-
- int info;
- const real_t rcond = -1; // use machine precision
- int rank;
-
- // query for maximum size of subproblems
- const int smlsiz = ilaenv(9, "GELSD", "");
- const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
-
- traits::detail::array<int> iwork(3*minmn*nlvl + 11*minmn);
-
- detail::gelsd(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- traits::vector_storage(work),
- traits::vector_size(work),
- traits::vector_storage(rwork),
- traits::vector_storage(iwork),
- &info);
-
- return info;
- }
-
- template <int N>
- struct Gelsd { };
-
- // specialization for gelsd real flavors (sgelsd, dgelsd)
- template <>
- struct Gelsd<1>
- {
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- // query for maximum size of subproblems
- const int smlsiz = ilaenv(9, "GELSD", "");
- const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
-
- const int lwork = 12*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
- minmn*nrhs + (smlsiz+1)*(smlsiz+1);
-
- traits::detail::array<val_t> work(lwork);
-
- return gelsd(A, B, s, work);
- }
-
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- val_t temp_work;
- int temp_iwork;
-
- const real_t rcond = -1;
- int rank;
- int info;
-
- // query for optimal workspace size
- detail::gelsd(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- &temp_work, //traits::vector_storage(work),
- -1, //traits::vector_size(work),
- &temp_iwork,
- &info);
-
- assert(info == 0);
-
- const int lwork = traits::detail::to_int(temp_work);
-
- traits::detail::array<val_t> work(lwork);
-
- return gelsd(A, B, s, work);
- }
-
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace1<Work> workspace) const
- {
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- return gelsd(A, B, s, workspace.w_);
- }
- };
-
- // specialization for gelsd (cgelsd, zgelsd)
- template <>
- struct Gelsd<2>
- {
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- // query for maximum size of subproblems
- const int smlsiz = ilaenv(9, "GELSD", "");
- const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
-
- traits::detail::array<val_t> work(2*minmn + minmn*nrhs);
-
- const int rwork_size = 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
- 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1);
-
- traits::detail::array<real_t> rwork(std::max(1, rwork_size));
-
- return gelsd(A, B, s, work, rwork);
- }
-
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- val_t temp_work;
- real_t temp_rwork;
- int temp_iwork;
-
- const real_t rcond = -1;
- int rank;
- int info;
-
- // query for optimal workspace size
- detail::gelsd(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- &temp_work, //traits::vector_storage(work),
- -1, //traits::vector_size(work),
- &temp_rwork,
- &temp_iwork,
- &info);
-
- assert(info == 0);
-
- const int lwork = traits::detail::to_int(temp_work);
-
- traits::detail::array<val_t> work(lwork);
-
- // query for maximum size of subproblems
- const int smlsiz = ilaenv(9, "GELSD", "");
- const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
-
- const int rwork_size = 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
- 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1);
-
- traits::detail::array<real_t> rwork(std::max(1, rwork_size));
-
- return gelsd(A, B, s, work, rwork);
- }
-
- template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
- int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace2<Work, RWork> workspace) const
- {
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
-
- return gelsd(A, B, s, workspace.w_, workspace.wr_);
- }
- };
-
- } // detail
-
- // gelsd
- // Parameters:
- // A: matrix of coefficients
- // B: matrix of solutions (stored column-wise)
- // s: vector to store singular values on output, length >= max(1, min(m,n))
- // workspace: either optimal, minimal, or user supplied
- //
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int gelsd(MatrA& A, MatrB& B, VecS& s, Work workspace)
- {
- typedef typename MatrA::value_type val_t;
-
- return detail::Gelsd<n_workspace_args<val_t>::value>() (A, B, s, workspace);
- }
-
- // gelsd, no singular values are returned
- // Parameters:
- // A: matrix of coefficients
- // B: matrix of solutions (stored column-wise)
- // workspace: either optimal, minimal, or user supplied
- //
- template <typename MatrA, typename MatrB, typename Work>
- int gelsd(MatrA& A, MatrB& B, Work workspace)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
+ inline void gelsd(const int m, const int n, const int nrhs,
+ float *a, const int lda, float *b, const int ldb,
+ float *s, const float rcond, int *rank, float *work,
+ const int lwork, int *iwork, int *info)
+ {
+ LAPACK_SGELSD(&m, &n, &nrhs, a, &lda, b, &ldb, s,
+ &rcond, rank, work, &lwork, iwork, info);
+ }
+
+ inline void gelsd(const int m, const int n, const int nrhs,
+ double *a, const int lda, double *b, const int ldb,
+ double *s, const double rcond, int *rank, double *work,
+ const int lwork, int *iwork, int *info)
+ {
+ LAPACK_DGELSD(&m, &n, &nrhs, a, &lda, b, &ldb, s,
+ &rcond, rank, work, &lwork, iwork, info);
+ }
+
+ inline void gelsd(const int m, const int n, const int nrhs,
+ traits::complex_f *a, const int lda, traits::complex_f *b,
+ const int ldb, float *s, const float rcond, int *rank,
+ traits::complex_f *work, const int lwork, float *rwork,
+ int *iwork, int *info)
+ {
+ LAPACK_CGELSD(&m, &n, &nrhs, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, s,
+ &rcond, rank, traits::complex_ptr(work),
+ &lwork, rwork, iwork, info);
+ }
+
+ inline void gelsd(const int m, const int n, const int nrhs,
+ traits::complex_d *a, const int lda, traits::complex_d *b,
+ const int ldb, double *s, const double rcond, int *rank,
+ traits::complex_d *work, const int lwork, double *rwork,
+ int *iwork, int *info)
+ {
+ LAPACK_ZGELSD(&m, &n, &nrhs, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, s,
+ &rcond, rank, traits::complex_ptr(work),
+ &lwork, rwork, iwork, info);
+ }
+
+ // gelsd for real type
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+ const int maxmn = std::max(m, n);
+ const int minmn = std::min(m, n);
+
+ // sanity checks
+ assert(m >= 0 && n >= 0);
+ assert(nrhs >= 0);
+ assert(traits::leading_dimension(A) >= std::max(1, m));
+ assert(traits::leading_dimension(B) >= std::max(1, maxmn));
+ assert(traits::vector_size(work) >= 1);
+ assert(traits::vector_size(s) >= std::max(1, minmn));
+
+ int info;
+ const real_t rcond = -1; // use machine precision
+ int rank;
+
+ // query for maximum size of subproblems
+ const int smlsiz = ilaenv(9, "GELSD", "");
+ const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
+
+ traits::detail::array<int> iwork(3*minmn*nlvl + 11*minmn);
+
+ detail::gelsd(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ traits::vector_storage(work),
+ traits::vector_size(work),
+ traits::vector_storage(iwork),
+ &info);
+
+ return info;
+ }
+
+ // gelsd for complex type
+ template <typename MatrA, typename MatrB, typename VecS,
+ typename Work, typename RWork>
+ int gelsd(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+ const int maxmn = std::max(m, n);
+ const int minmn = std::min(m, n);
+
+ // sanity checks
+ assert(m >= 0 && n >= 0);
+ assert(nrhs >= 0);
+ assert(traits::leading_dimension(A) >= std::max(1, m));
+ assert(traits::leading_dimension(B) >= std::max(1, maxmn));
+ assert(traits::vector_size(work) >= 1);
+ assert(traits::vector_size(s) >= std::max(1, minmn));
+
+ int info;
+ const real_t rcond = -1; // use machine precision
+ int rank;
+
+ // query for maximum size of subproblems
+ const int smlsiz = ilaenv(9, "GELSD", "");
+ const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
+
+ traits::detail::array<int> iwork(3*minmn*nlvl + 11*minmn);
+
+ detail::gelsd(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ traits::vector_storage(work),
+ traits::vector_size(work),
+ traits::vector_storage(rwork),
+ traits::vector_storage(iwork),
+ &info);
+
+ return info;
+ }
+
+ template <int N>
+ struct Gelsd { };
+
+ // specialization for gelsd real flavors (sgelsd, dgelsd)
+ template <>
+ struct Gelsd<1>
+ {
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ // query for maximum size of subproblems
+ const int smlsiz = ilaenv(9, "GELSD", "");
+ const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
+
+ const int lwork = 12*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
+ minmn*nrhs + (smlsiz+1)*(smlsiz+1);
+
+ traits::detail::array<val_t> work(lwork);
+
+ return gelsd(A, B, s, work);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ val_t temp_work;
+ int temp_iwork;
+
+ const real_t rcond = -1;
+ int rank;
+ int info;
+
+ // query for optimal workspace size
+ detail::gelsd(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ &temp_work, //traits::vector_storage(work),
+ -1, //traits::vector_size(work),
+ &temp_iwork,
+ &info);
+
+ assert(info == 0);
+
+ const int lwork = traits::detail::to_int(temp_work);
+
+ traits::detail::array<val_t> work(lwork);
+
+ return gelsd(A, B, s, work);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace1<Work> workspace) const
+ {
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ return gelsd(A, B, s, workspace.w_);
+ }
+ };
+
+ // specialization for gelsd (cgelsd, zgelsd)
+ template <>
+ struct Gelsd<2>
+ {
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ // query for maximum size of subproblems
+ const int smlsiz = ilaenv(9, "GELSD", "");
+ const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
+
+ traits::detail::array<val_t> work(2*minmn + minmn*nrhs);
+
+ const int rwork_size = 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
+ 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1);
+
+ traits::detail::array<real_t> rwork(std::max(1, rwork_size));
+
+ return gelsd(A, B, s, work, rwork);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ val_t temp_work;
+ real_t temp_rwork;
+ int temp_iwork;
+
+ const real_t rcond = -1;
+ int rank;
+ int info;
+
+ // query for optimal workspace size
+ detail::gelsd(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ &temp_work, //traits::vector_storage(work),
+ -1, //traits::vector_size(work),
+ &temp_rwork,
+ &temp_iwork,
+ &info);
+
+ assert(info == 0);
+
+ const int lwork = traits::detail::to_int(temp_work);
+
+ traits::detail::array<val_t> work(lwork);
+
+ // query for maximum size of subproblems
+ const int smlsiz = ilaenv(9, "GELSD", "");
+ const int nlvl = static_cast<int>(((std::log(static_cast<float>(minmn))/std::log(2.f))/ (smlsiz+1)) + 1);
+
+ const int rwork_size = 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl +
+ 3*smlsiz*nrhs + (smlsiz+1)*(smlsiz+1);
+
+ traits::detail::array<real_t> rwork(std::max(1, rwork_size));
+
+ return gelsd(A, B, s, work, rwork);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
+ int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace2<Work, RWork> workspace) const
+ {
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, nrhs); // maxmnr = maxmn > nrhs ? maxmn : nrhs
+
+ return gelsd(A, B, s, workspace.w_, workspace.wr_);
+ }
+ };
+
+ } // detail
+
+ // gelsd
+ // Parameters:
+ // A: matrix of coefficients
+ // B: matrix of solutions (stored column-wise)
+ // s: vector to store singular values on output, length >= max(1, min(m,n))
+ // workspace: either optimal, minimal, or user supplied
+ //
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int gelsd(MatrA& A, MatrB& B, VecS& s, Work workspace)
+ {
+ typedef typename MatrA::value_type val_t;
+
+ return detail::Gelsd<n_workspace_args<val_t>::value>() (A, B, s, workspace);
+ }
+
+ // gelsd, no singular values are returned
+ // Parameters:
+ // A: matrix of coefficients
+ // B: matrix of solutions (stored column-wise)
+ // workspace: either optimal, minimal, or user supplied
+ //
+ template <typename MatrA, typename MatrB, typename Work>
+ int gelsd(MatrA& A, MatrB& B, Work workspace)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
 
- const int s_size = std::max(1, std::min(m,n));
- traits::detail::array<real_t> s(s_size);
+ const int s_size = std::max(1, std::min(m,n));
+ traits::detail::array<real_t> s(s_size);
 
- return detail::Gelsd<n_workspace_args<val_t>::value>() (A, B, s, workspace);
- }
+ return detail::Gelsd<n_workspace_args<val_t>::value>() (A, B, s, workspace);
+ }
 
- } // lapack
+ } // lapack
 
 }}}
 

Modified: sandbox/boost/numeric/bindings/lapack/gelss.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gelss.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gelss.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -27,327 +27,327 @@
 
 namespace boost { namespace numeric { namespace bindings {
 
- namespace lapack {
-
- namespace detail {
-
- inline void gelss(const int m, const int n, const int nrhs,
- float *a, const int lda, float *b, const int ldb,
- float *s, const float rcond, int *rank, float *work,
+ namespace lapack {
+
+ namespace detail {
+
+ inline void gelss(const int m, const int n, const int nrhs,
+ float *a, const int lda, float *b, const int ldb,
+ float *s, const float rcond, int *rank, float *work,
+ const int lwork, int *info)
+ {
+ LAPACK_SGELSS(&m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work, &lwork, info);
+ }
+
+ inline void gelss(const int m, const int n, const int nrhs,
+ double *a, const int lda, double *b, const int ldb,
+ double *s, const double rcond, int *rank, double *work,
                               const int lwork, int *info)
- {
- LAPACK_SGELSS(&m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work, &lwork, info);
- }
-
- inline void gelss(const int m, const int n, const int nrhs,
- double *a, const int lda, double *b, const int ldb,
- double *s, const double rcond, int *rank, double *work,
- const int lwork, int *info)
- {
- LAPACK_DGELSS(&m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work, &lwork, info);
- }
-
- inline void gelss(const int m, const int n, const int nrhs,
- traits::complex_f *a, const int lda, traits::complex_f *b,
- const int ldb, float *s, const float rcond, int *rank,
- traits::complex_f *work, const int lwork, float *rwork, int *info)
- {
- LAPACK_CGELSS(&m, &n, &nrhs, traits::complex_ptr(a),
- &lda, traits::complex_ptr(b), &ldb, s,
- &rcond, rank, traits::complex_ptr(work),
- &lwork, rwork, info);
- }
-
- inline void gelss(const int m, const int n, const int nrhs,
- traits::complex_d *a, const int lda, traits::complex_d *b,
- const int ldb, double *s, const double rcond, int *rank,
- traits::complex_d *work, const int lwork, double *rwork, int *info)
- {
- LAPACK_ZGELSS(&m, &n, &nrhs, traits::complex_ptr(a),
- &lda, traits::complex_ptr(b), &ldb, s,
- &rcond, rank, traits::complex_ptr(work),
- &lwork, rwork, info);
- }
-
- // gelss for real type
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int gelss(MatrA& A, MatrB& B, VecS& s, Work& work)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
- const int maxmn = std::max(m, n);
- const int minmn = std::min(m, n);
-
- // sanity checks
- assert(m >= 0 && n >= 0);
- assert(nrhs >= 0);
- assert(traits::leading_dimension(A) >= std::max(1, m));
- assert(traits::leading_dimension(B) >= std::max(1, maxmn));
- assert(traits::vector_size(work) >= 1);
- assert(traits::vector_size(s) >= std::max(1, minmn));
-
- int info;
- const real_t rcond = -1; // use machine precision
- int rank;
-
- detail::gelss(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- traits::vector_storage(work),
- traits::vector_size(work),
- &info);
-
- return info;
- }
-
- // gelss for complex type
- template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
- int gelss(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int nrhs = traits::matrix_size2(B);
- const int maxmn = std::max(m, n);
- const int minmn = std::min(m, n);
-
- // sanity checks
- assert(m >= 0 && n >= 0);
- assert(nrhs >= 0);
- assert(traits::leading_dimension(A) >= std::max(1, m));
- assert(traits::leading_dimension(B) >= std::max(1, maxmn));
- assert(traits::vector_size(work) >= 1);
- assert(traits::vector_size(s) >= std::max(1, minmn));
-
- int info;
- const real_t rcond = -1; // use machine precision
- int rank;
-
- detail::gelss(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- traits::vector_storage(work),
- traits::vector_size(work),
- traits::vector_storage(rwork),
- &info);
-
- return info;
- }
-
- // default minimal workspace functor
- template <int N>
- struct Gelss { };
-
- // specialization for gelss (sgelss, dgelss)
- template <>
- struct Gelss<1>
- {
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int rhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
-
- traits::detail::array<val_t> work(3*minmn + std::max(2*minmn, maxmnr));
-
- return gelss(A, B, s, work);
- }
-
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int rhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
-
- val_t temp_work;
-
- const real_t rcond = -1;
- int rank;
- int info;
-
- // query for optimal workspace size
- detail::gelss(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- &temp_work, //traits::vector_storage(work),
- -1, //traits::vector_size(work),
- &info);
-
- assert(info == 0);
-
- const int lwork = traits::detail::to_int(temp_work);
-
- traits::detail::array<val_t> work(lwork);
-
- return gelss(A, B, s, work);
- }
-
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace1<Work> workspace) const
- {
- return gelss(A, B, s, workspace.w_);
- }
- };
-
- // specialization for gelss (cgelss, zgelss)
- template <>
- struct Gelss<2>
- {
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int rhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
-
- traits::detail::array<val_t> work(2*minmn + maxmnr);
- traits::detail::array<real_t> rwork(std::max(1, (5*minmn)));
-
- return gelss(A, B, s, work, rwork);
- }
-
- template <typename MatrA, typename MatrB, typename VecS>
- int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
- const int rhs = traits::matrix_size2(B);
-
- const int minmn = std::min(m, n); // minmn = m < n ? m : n
- const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
- const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
-
- val_t temp_work;
- real_t temp_rwork;
-
- const real_t rcond = -1;
- int rank;
- int info;
-
- // query for optimal workspace size
- detail::gelss(traits::matrix_size1(A),
- traits::matrix_size2(A),
- traits::matrix_size2(B),
- traits::matrix_storage(A),
- traits::leading_dimension(A),
- traits::matrix_storage(B),
- traits::leading_dimension(B),
- traits::vector_storage(s),
- rcond,
- &rank,
- &temp_work, //traits::vector_storage(work),
- -1, //traits::vector_size(work),
- &temp_rwork,
- &info);
-
- assert(info == 0);
-
- const int lwork = traits::detail::to_int(temp_work);
-
- traits::detail::array<val_t> work(lwork);
- traits::detail::array<real_t> rwork(std::max(1, (5*minmn)));
-
- return gelss(A, B, s, work, rwork);
- }
-
- template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
- int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace2<Work, RWork> workspace) const
- {
- return gelss(A, B, s, workspace.w_, workspace.wr);
- }
- };
-
- } // detail
-
- // gelss
- // Parameters:
- // A: matrix of coefficients
- // B: matrix of solutions (stored column-wise)
- // s: vector to store singular values on output, length >= max(1, min(m,n))
- // workspace: either optimal, minimal, or user supplied
- //
- template <typename MatrA, typename MatrB, typename VecS, typename Work>
- int gelss(MatrA& A, MatrB& B, VecS& s, Work workspace)
- {
- typedef typename MatrA::value_type val_t;
-
- return detail::Gelss<n_workspace_args<val_t>::value>() (A, B, s, workspace);
- }
-
- // gelss, no singular values are returned
- // Parameters:
- // A: matrix of coefficients
- // B: matrix of solutions (stored column-wise)
- // workspace: either optimal, minimal, or user supplied
- //
- template <typename MatrA, typename MatrB, typename Work>
- int gelss(MatrA& A, MatrB& B, Work workspace)
- {
- typedef typename MatrA::value_type val_t;
- typedef typename traits::type_traits<val_t>::real_type real_t;
-
- const int m = traits::matrix_size1(A);
- const int n = traits::matrix_size2(A);
+ {
+ LAPACK_DGELSS(&m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, rank, work, &lwork, info);
+ }
+
+ inline void gelss(const int m, const int n, const int nrhs,
+ traits::complex_f *a, const int lda, traits::complex_f *b,
+ const int ldb, float *s, const float rcond, int *rank,
+ traits::complex_f *work, const int lwork, float *rwork, int *info)
+ {
+ LAPACK_CGELSS(&m, &n, &nrhs, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, s,
+ &rcond, rank, traits::complex_ptr(work),
+ &lwork, rwork, info);
+ }
+
+ inline void gelss(const int m, const int n, const int nrhs,
+ traits::complex_d *a, const int lda, traits::complex_d *b,
+ const int ldb, double *s, const double rcond, int *rank,
+ traits::complex_d *work, const int lwork, double *rwork, int *info)
+ {
+ LAPACK_ZGELSS(&m, &n, &nrhs, traits::complex_ptr(a),
+ &lda, traits::complex_ptr(b), &ldb, s,
+ &rcond, rank, traits::complex_ptr(work),
+ &lwork, rwork, info);
+ }
+
+ // gelss for real type
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int gelss(MatrA& A, MatrB& B, VecS& s, Work& work)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+ const int maxmn = std::max(m, n);
+ const int minmn = std::min(m, n);
+
+ // sanity checks
+ assert(m >= 0 && n >= 0);
+ assert(nrhs >= 0);
+ assert(traits::leading_dimension(A) >= std::max(1, m));
+ assert(traits::leading_dimension(B) >= std::max(1, maxmn));
+ assert(traits::vector_size(work) >= 1);
+ assert(traits::vector_size(s) >= std::max(1, minmn));
+
+ int info;
+ const real_t rcond = -1; // use machine precision
+ int rank;
+
+ detail::gelss(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ traits::vector_storage(work),
+ traits::vector_size(work),
+ &info);
+
+ return info;
+ }
+
+ // gelss for complex type
+ template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
+ int gelss(MatrA& A, MatrB& B, VecS& s, Work& work, RWork& rwork)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int nrhs = traits::matrix_size2(B);
+ const int maxmn = std::max(m, n);
+ const int minmn = std::min(m, n);
+
+ // sanity checks
+ assert(m >= 0 && n >= 0);
+ assert(nrhs >= 0);
+ assert(traits::leading_dimension(A) >= std::max(1, m));
+ assert(traits::leading_dimension(B) >= std::max(1, maxmn));
+ assert(traits::vector_size(work) >= 1);
+ assert(traits::vector_size(s) >= std::max(1, minmn));
+
+ int info;
+ const real_t rcond = -1; // use machine precision
+ int rank;
+
+ detail::gelss(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ traits::vector_storage(work),
+ traits::vector_size(work),
+ traits::vector_storage(rwork),
+ &info);
+
+ return info;
+ }
+
+ // default minimal workspace functor
+ template <int N>
+ struct Gelss { };
+
+ // specialization for gelss (sgelss, dgelss)
+ template <>
+ struct Gelss<1>
+ {
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int rhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
+
+ traits::detail::array<val_t> work(3*minmn + std::max(2*minmn, maxmnr));
+
+ return gelss(A, B, s, work);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int rhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
+
+ val_t temp_work;
+
+ const real_t rcond = -1;
+ int rank;
+ int info;
+
+ // query for optimal workspace size
+ detail::gelss(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ &temp_work, //traits::vector_storage(work),
+ -1, //traits::vector_size(work),
+ &info);
+
+ assert(info == 0);
+
+ const int lwork = traits::detail::to_int(temp_work);
+
+ traits::detail::array<val_t> work(lwork);
+
+ return gelss(A, B, s, work);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace1<Work> workspace) const
+ {
+ return gelss(A, B, s, workspace.w_);
+ }
+ };
+
+ // specialization for gelss (cgelss, zgelss)
+ template <>
+ struct Gelss<2>
+ {
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, minimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int rhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
+
+ traits::detail::array<val_t> work(2*minmn + maxmnr);
+ traits::detail::array<real_t> rwork(std::max(1, (5*minmn)));
+
+ return gelss(A, B, s, work, rwork);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS>
+ int operator() (MatrA& A, MatrB& B, VecS& s, optimal_workspace) const
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
+ const int rhs = traits::matrix_size2(B);
+
+ const int minmn = std::min(m, n); // minmn = m < n ? m : n
+ const int maxmn = std::max(m, n); // maxmn = m > n ? m : n
+ const int maxmnr = std::max(maxmn, rhs); // maxmnr = maxmn > rhs ? maxmn : rhs
+
+ val_t temp_work;
+ real_t temp_rwork;
+
+ const real_t rcond = -1;
+ int rank;
+ int info;
+
+ // query for optimal workspace size
+ detail::gelss(traits::matrix_size1(A),
+ traits::matrix_size2(A),
+ traits::matrix_size2(B),
+ traits::matrix_storage(A),
+ traits::leading_dimension(A),
+ traits::matrix_storage(B),
+ traits::leading_dimension(B),
+ traits::vector_storage(s),
+ rcond,
+ &rank,
+ &temp_work, //traits::vector_storage(work),
+ -1, //traits::vector_size(work),
+ &temp_rwork,
+ &info);
+
+ assert(info == 0);
+
+ const int lwork = traits::detail::to_int(temp_work);
+
+ traits::detail::array<val_t> work(lwork);
+ traits::detail::array<real_t> rwork(std::max(1, (5*minmn)));
+
+ return gelss(A, B, s, work, rwork);
+ }
+
+ template <typename MatrA, typename MatrB, typename VecS, typename Work, typename RWork>
+ int operator() (MatrA& A, MatrB& B, VecS& s, detail::workspace2<Work, RWork> workspace) const
+ {
+ return gelss(A, B, s, workspace.w_, workspace.wr);
+ }
+ };
+
+ } // detail
+
+ // gelss
+ // Parameters:
+ // A: matrix of coefficients
+ // B: matrix of solutions (stored column-wise)
+ // s: vector to store singular values on output, length >= max(1, min(m,n))
+ // workspace: either optimal, minimal, or user supplied
+ //
+ template <typename MatrA, typename MatrB, typename VecS, typename Work>
+ int gelss(MatrA& A, MatrB& B, VecS& s, Work workspace)
+ {
+ typedef typename MatrA::value_type val_t;
+
+ return detail::Gelss<n_workspace_args<val_t>::value>() (A, B, s, workspace);
+ }
+
+ // gelss, no singular values are returned
+ // Parameters:
+ // A: matrix of coefficients
+ // B: matrix of solutions (stored column-wise)
+ // workspace: either optimal, minimal, or user supplied
+ //
+ template <typename MatrA, typename MatrB, typename Work>
+ int gelss(MatrA& A, MatrB& B, Work workspace)
+ {
+ typedef typename MatrA::value_type val_t;
+ typedef typename traits::type_traits<val_t>::real_type real_t;
+
+ const int m = traits::matrix_size1(A);
+ const int n = traits::matrix_size2(A);
 
- const int s_size = std::max(1, std::min(m,n));
- traits::detail::array<real_t> s(s_size);
+ const int s_size = std::max(1, std::min(m,n));
+ traits::detail::array<real_t> s(s_size);
 
- return detail::Gelss<n_workspace_args<val_t>::value>() (A, B, s, workspace);
- }
+ return detail::Gelss<n_workspace_args<val_t>::value>() (A, B, s, workspace);
+ }
 
- } // namespace lapack
+ } // namespace lapack
 
 }}}
 

Modified: sandbox/boost/numeric/bindings/lapack/geqrf.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/geqrf.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/geqrf.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,24 +21,24 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 #include <cassert>
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // QR factorization of a general m x n matrix A = Q * R
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * geqrf() computes the QR factorization of a rectangular matrix
      * A = Q * R, where Q is a M x min(M,N) matrix with orthogonal
      * and normalized column (i.e. herm(Q) $ Q = I) and R is a
@@ -49,77 +49,77 @@
      * upper triangular if m >= n); the elements below the diagonal,
      * with the array TAU, represent the orthogonal matrix Q as a product
      * of min(M,N) elementary reflectors.
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void geqrf (int const m, int const n,
                  float* a, int const lda,
- float* tau, float* work, int const lwork, int& info)
+ float* tau, float* work, int const lwork, int& info)
       {
         LAPACK_SGEQRF (&m, &n, a, &lda, tau, work, &lwork, &info);
       }
 
- inline
+ inline
       void geqrf (int const m, int const n,
                  double* a, int const lda,
- double* tau, double* work, int const lwork, int& info)
+ double* tau, double* work, int const lwork, int& info)
       {
         LAPACK_DGEQRF (&m, &n, a, &lda, tau, work, &lwork, &info);
       }
 
- inline
+ inline
       void geqrf (int const m, int const n,
                   traits::complex_f* a, int const lda,
                   traits::complex_f* tau, traits::complex_f* work,
- int const lwork, int& info)
+ int const lwork, int& info)
       {
         LAPACK_CGEQRF (&m, &n,
                       traits::complex_ptr (a), &lda,
                       traits::complex_ptr (tau),
                       traits::complex_ptr (work), &lwork, &info );
       }
-
 
- inline
+
+ inline
       void geqrf (int const m, int const n,
                   traits::complex_d* a, int const lda,
                   traits::complex_d* tau, traits::complex_d* work,
- int const lwork, int& info)
+ int const lwork, int& info)
       {
         LAPACK_ZGEQRF (&m, &n,
                       traits::complex_ptr (a), &lda,
                       traits::complex_ptr (tau),
                       traits::complex_ptr (work), &lwork, &info );
       }
-
- }
+
+ }
 
     template <typename A, typename Tau, typename Work>
     int geqrf (A& a, Tau& tau, Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- assert (std::min<int>(m,n) <= traits::vector_size (tau));
- assert (n <= traits::vector_size (work));
+ assert (std::min<int>(m,n) <= traits::vector_size (tau));
+ assert (n <= traits::vector_size (work));
 
- int info;
+ int info;
       detail::geqrf (m, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (tau),
+ traits::vector_storage (tau),
                      traits::vector_storage (work),
                      traits::vector_size (work),
                      info);
- return info;
+ return info;
     }
 
     // Computation of the QR factorization.
@@ -168,4 +168,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/gesdd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gesdd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gesdd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,368 +20,368 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 #include <boost/numeric/bindings/traits/detail/utils.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // singular value decomposition
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
- * (divide and conquer driver)
- * gesdd() computes the singular value decomposition (SVD) of
- * M-by-N matrix A, optionally computing the left and/or right
- * singular vectors, by using divide-and-conquer method.
+ /*
+ * (divide and conquer driver)
+ * gesdd() computes the singular value decomposition (SVD) of
+ * M-by-N matrix A, optionally computing the left and/or right
+ * singular vectors, by using divide-and-conquer method.
      * The SVD is written
      *
      * A = U * S * V^T or A = U * S * V^H
      *
      * where S is an M-by-N matrix which is zero except for its min(m,n)
- * diagonal elements, U is an M-by-M orthogonal/unitary matrix, and V
+ * diagonal elements, U is an M-by-M orthogonal/unitary matrix, and V
      * is an N-by-N orthogonal/unitary matrix. The diagonal elements of S
- * are the singular values of A; they are real and non-negative, and
- * are returnede in descending order. The first min(m,n) columns of
- * U and V are the left and right singular vectors of A. (Note that
+ * are the singular values of A; they are real and non-negative, and
+ * are returnede in descending order. The first min(m,n) columns of
+ * U and V are the left and right singular vectors of A. (Note that
      * the routine returns V^T or V^H, not V.
- */
+ */
 
     namespace detail {
 
- inline
- void gesdd (char const jobz, int const m, int const n,
- float* a, int const lda,
- float* s, float* u, int const ldu,
+ inline
+ void gesdd (char const jobz, int const m, int const n,
+ float* a, int const lda,
+ float* s, float* u, int const ldu,
                   float* vt, int const ldvt,
- float* work, int const lwork, float* /* dummy */,
+ float* work, int const lwork, float* /* dummy */,
                   int* iwork, int* info)
       {
- LAPACK_SGESDD (&jobz, &m, &n, a, &lda, s,
- u, &ldu, vt, &ldvt, work, &lwork, iwork, info);
+ LAPACK_SGESDD (&jobz, &m, &n, a, &lda, s,
+ u, &ldu, vt, &ldvt, work, &lwork, iwork, info);
       }
 
- inline
- void gesdd (char const jobz, int const m, int const n,
- double* a, int const lda,
- double* s, double* u, int const ldu,
+ inline
+ void gesdd (char const jobz, int const m, int const n,
+ double* a, int const lda,
+ double* s, double* u, int const ldu,
                   double* vt, int const ldvt,
- double* work, int const lwork, double* /* dummy */,
+ double* work, int const lwork, double* /* dummy */,
                   int* iwork, int* info)
       {
- LAPACK_DGESDD (&jobz, &m, &n, a, &lda, s,
- u, &ldu, vt, &ldvt, work, &lwork, iwork, info);
+ LAPACK_DGESDD (&jobz, &m, &n, a, &lda, s,
+ u, &ldu, vt, &ldvt, work, &lwork, iwork, info);
       }
 
- inline
- void gesdd (char const jobz, int const m, int const n,
- traits::complex_f* a, int const lda,
- float* s, traits::complex_f* u, int const ldu,
+ inline
+ void gesdd (char const jobz, int const m, int const n,
+ traits::complex_f* a, int const lda,
+ float* s, traits::complex_f* u, int const ldu,
                   traits::complex_f* vt, int const ldvt,
- traits::complex_f* work, int const lwork,
+ traits::complex_f* work, int const lwork,
                   float* rwork, int* iwork, int* info)
       {
- LAPACK_CGESDD (&jobz, &m, &n,
- traits::complex_ptr (a), &lda, s,
- traits::complex_ptr (u), &ldu,
- traits::complex_ptr (vt), &ldvt,
- traits::complex_ptr (work), &lwork,
- rwork, iwork, info);
+ LAPACK_CGESDD (&jobz, &m, &n,
+ traits::complex_ptr (a), &lda, s,
+ traits::complex_ptr (u), &ldu,
+ traits::complex_ptr (vt), &ldvt,
+ traits::complex_ptr (work), &lwork,
+ rwork, iwork, info);
       }
 
- inline
- void gesdd (char const jobz, int const m, int const n,
- traits::complex_d* a, int const lda,
- double* s, traits::complex_d* u, int const ldu,
+ inline
+ void gesdd (char const jobz, int const m, int const n,
+ traits::complex_d* a, int const lda,
+ double* s, traits::complex_d* u, int const ldu,
                   traits::complex_d* vt, int const ldvt,
- traits::complex_d* work, int const lwork,
+ traits::complex_d* work, int const lwork,
                   double* rwork, int* iwork, int* info)
       {
- LAPACK_ZGESDD (&jobz, &m, &n,
- traits::complex_ptr (a), &lda, s,
- traits::complex_ptr (u), &ldu,
- traits::complex_ptr (vt), &ldvt,
- traits::complex_ptr (work), &lwork,
- rwork, iwork, info);
+ LAPACK_ZGESDD (&jobz, &m, &n,
+ traits::complex_ptr (a), &lda, s,
+ traits::complex_ptr (u), &ldu,
+ traits::complex_ptr (vt), &ldvt,
+ traits::complex_ptr (work), &lwork,
+ rwork, iwork, info);
       }
 
 
- inline
+ inline
       int gesdd_min_work (float, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- int m3 = 3 * minmn;
- int m4 = 4 * minmn;
- int minw;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ int m3 = 3 * minmn;
+ int m4 = 4 * minmn;
+ int minw;
         if (jobz == 'N') {
           // leading comments:
           // LWORK >= 3*min(M,N) + max(max(M,N), 6*min(M,N))
           // code:
           // LWORK >= 3*min(M,N) + max(max(M,N), 7*min(M,N))
- int m7 = 7 * minmn;
+ int m7 = 7 * minmn;
           minw = maxmn < m7 ? m7 : maxmn;
- minw += m3;
+ minw += m3;
         }
         if (jobz == 'O') {
- // LWORK >= 3*min(M,N)*min(M,N)
+ // LWORK >= 3*min(M,N)*min(M,N)
           // + max(max(M,N), 5*min(M,N)*min(M,N)+4*min(M,N))
- int m5 = 5 * minmn * minmn + m4;
+ int m5 = 5 * minmn * minmn + m4;
           minw = maxmn < m5 ? m5 : maxmn;
- minw += m3 * minmn;
+ minw += m3 * minmn;
         }
         if (jobz == 'S' || jobz == 'A') {
- // LWORK >= 3*min(M,N)*min(M,N)
+ // LWORK >= 3*min(M,N)*min(M,N)
           // + max(max(M,N), 4*min(M,N)*min(M,N)+4*min(M,N)).
- int m44 = m4 * minmn + m4;
+ int m44 = m4 * minmn + m4;
           minw = maxmn < m44 ? m44 : maxmn;
- minw += m3 * minmn;
+ minw += m3 * minmn;
         }
         return minw;
       }
- inline
+ inline
       int gesdd_min_work (double, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- int m3 = 3 * minmn;
- int m4 = 4 * minmn;
- int minw;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ int m3 = 3 * minmn;
+ int m4 = 4 * minmn;
+ int minw;
         if (jobz == 'N') {
           // leading comments:
           // LWORK >= 3*min(M,N) + max(max(M,N), 6*min(M,N))
           // code:
           // LWORK >= 3*min(M,N) + max(max(M,N), 7*min(M,N))
- int m7 = 7 * minmn;
+ int m7 = 7 * minmn;
           minw = maxmn < m7 ? m7 : maxmn;
- minw += m3;
+ minw += m3;
         }
         else if (jobz == 'O') {
- // LWORK >= 3*min(M,N)*min(M,N)
+ // LWORK >= 3*min(M,N)*min(M,N)
           // + max(max(M,N), 5*min(M,N)*min(M,N)+4*min(M,N))
- int m5 = 5 * minmn * minmn + m4;
+ int m5 = 5 * minmn * minmn + m4;
           minw = maxmn < m5 ? m5 : maxmn;
- minw += m3 * minmn;
+ minw += m3 * minmn;
         }
         else if (jobz == 'S' || jobz == 'A') {
- // LWORK >= 3*min(M,N)*min(M,N)
+ // LWORK >= 3*min(M,N)*min(M,N)
           // + max(max(M,N), 4*min(M,N)*min(M,N)+4*min(M,N)).
- int m44 = m4 * minmn + m4;
+ int m44 = m4 * minmn + m4;
           minw = maxmn < m44 ? m44 : maxmn;
- minw += m3 * minmn;
+ minw += m3 * minmn;
         }
         else {
- std::cerr << "Invalid option passed to gesdd" << std::endl ;
+ std::cerr << "Invalid option passed to gesdd" << std::endl ;
           return 0 ;
         }
- return minw;
+ return minw;
       }
- inline
+ inline
       int gesdd_min_work (traits::complex_f, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
         int m2 = 2 * minmn;
- int minw = m2 + maxmn;
- if (jobz == 'N')
+ int minw = m2 + maxmn;
+ if (jobz == 'N')
           // LWORK >= 2*min(M,N)+max(M,N)
- ;
- if (jobz == 'O')
+ ;
+ if (jobz == 'O')
           // LWORK >= 2*min(M,N)*min(M,N) + 2*min(M,N) + max(M,N)
- minw += m2 * minmn;
- if (jobz == 'S' || jobz == 'A')
+ minw += m2 * minmn;
+ if (jobz == 'S' || jobz == 'A')
           // LWORK >= min(M,N)*min(M,N) + 2*min(M,N) + max(M,N)
- minw += minmn * minmn;
- return minw;
+ minw += minmn * minmn;
+ return minw;
       }
- inline
+ inline
       int gesdd_min_work (traits::complex_d, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
         int m2 = 2 * minmn;
- int minw = m2 + maxmn;
- if (jobz == 'N')
+ int minw = m2 + maxmn;
+ if (jobz == 'N')
           // LWORK >= 2*min(M,N)+max(M,N)
- ;
- if (jobz == 'O')
+ ;
+ if (jobz == 'O')
           // LWORK >= 2*min(M,N)*min(M,N) + 2*min(M,N) + max(M,N)
- minw += m2 * minmn;
- if (jobz == 'S' || jobz == 'A')
+ minw += m2 * minmn;
+ if (jobz == 'S' || jobz == 'A')
           // LWORK >= min(M,N)*min(M,N) + 2*min(M,N) + max(M,N)
- minw += minmn * minmn;
- return minw;
+ minw += minmn * minmn;
+ return minw;
       }
 
- inline
+ inline
       int gesdd_rwork (float, char, int, int) { return 1; }
- inline
+ inline
       int gesdd_rwork (double, char, int, int) { return 1; }
- inline
+ inline
       int gesdd_rwork (traits::complex_f, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int minw;
- if (jobz == 'N')
+ int minmn = m < n ? m : n;
+ int minw;
+ if (jobz == 'N')
           // LWORK >= 7*min(M,N)
- minw = 7 * minmn;
- else
+ minw = 7 * minmn;
+ else
           // LRWORK >= 5*min(M,N)*min(M,N) + 5*min(M,N)
           minw = 5 * (minmn * minmn + minmn);
- return minw;
+ return minw;
       }
- inline
+ inline
       int gesdd_rwork (traits::complex_d, char jobz, int m, int n) {
- int minmn = m < n ? m : n;
- int minw;
- if (jobz == 'N')
+ int minmn = m < n ? m : n;
+ int minw;
+ if (jobz == 'N')
           // LWORK >= 7*min(M,N)
- minw = 7 * minmn;
- else
+ minw = 7 * minmn;
+ else
           // LRWORK >= 5*min(M,N)*min(M,N) + 5*min(M,N)
           minw = 5 * (minmn * minmn + minmn);
- return minw;
+ return minw;
       }
 
       inline
       int gesdd_iwork (int m, int n) {
- int minmn = m < n ? m : n;
- return 8 * minmn;
+ int minmn = m < n ? m : n;
+ return 8 * minmn;
       }
 
- } // detail
+ } // detail
 
 
- template <typename MatrA>
- int gesdd_work (char const q, char const jobz, MatrA const& a)
+ template <typename MatrA>
+ int gesdd_work (char const q, char const jobz, MatrA const& a)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
 #ifdef BOOST_NUMERIC_BINDINGS_LAPACK_2
- assert (q == 'M');
+ assert (q == 'M');
 #else
- assert (q == 'M' || q == 'O');
+ assert (q == 'M' || q == 'O');
 #endif
- assert (jobz == 'N' || jobz == 'O' || jobz == 'A' || jobz == 'S');
+ assert (jobz == 'N' || jobz == 'O' || jobz == 'A' || jobz == 'S');
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- int lw = -13;
+ int lw = -13;
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
 
- if (q == 'M')
+ if (q == 'M')
         lw = detail::gesdd_min_work (val_t(), jobz, m, n);
 
 #ifndef BOOST_NUMERIC_BINDINGS_LAPACK_2
- MatrA& a2 = const_cast<MatrA&> (a);
+ MatrA& a2 = const_cast<MatrA&> (a);
       if (q == 'O') {
- // traits::detail::array<val_t> w (1);
- val_t w;
- int info;
- detail::gesdd (jobz, m, n,
- traits::matrix_storage (a2),
+ // traits::detail::array<val_t> w (1);
+ val_t w;
+ int info;
+ detail::gesdd (jobz, m, n,
+ traits::matrix_storage (a2),
                        traits::leading_dimension (a2),
- 0, // traits::vector_storage (s),
+ 0, // traits::vector_storage (s),
                        0, // traits::matrix_storage (u),
                        m, // traits::leading_dimension (u),
                        0, // traits::matrix_storage (vt),
                        n, // traits::leading_dimension (vt),
- &w, // traits::vector_storage (w),
- -1, // traits::vector_size (w),
- 0, // traits::vector_storage (rw),
- 0, // traits::vector_storage (iw),
+ &w, // traits::vector_storage (w),
+ -1, // traits::vector_size (w),
+ 0, // traits::vector_storage (rw),
+ 0, // traits::vector_storage (iw),
                        &info);
- assert (info == 0);
+ assert (info == 0);
 
- lw = traits::detail::to_int (w);
- // // lw = traits::detail::to_int (w[0]);
+ lw = traits::detail::to_int (w);
+ // // lw = traits::detail::to_int (w[0]);
         /*
          * is there a bug in LAPACK? or in Mandrake's .rpm?
- * if m == 3, n == 4 and jobz == 'N' (real A),
+ * if m == 3, n == 4 and jobz == 'N' (real A),
          * gesdd() returns optimal size == 1 while minimum size == 27
          */
- // int lwo = traits::detail::to_int (w);
+ // int lwo = traits::detail::to_int (w);
         // int lwmin = detail::gesdd_min_work (val_t(), jobz, m, n);
- // lw = lwo < lwmin ? lwmin : lwo;
+ // lw = lwo < lwmin ? lwmin : lwo;
       }
-#endif
-
- return lw;
+#endif
+
+ return lw;
     }
 
 
- template <typename MatrA>
+ template <typename MatrA>
     int gesdd_rwork (char jobz, MatrA const& a) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
- assert (jobz == 'N' || jobz == 'O' || jobz == 'A' || jobz == 'S');
+ assert (jobz == 'N' || jobz == 'O' || jobz == 'A' || jobz == 'S');
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
 
- return detail::gesdd_rwork (val_t(), jobz,
+ return detail::gesdd_rwork (val_t(), jobz,
                                   traits::matrix_size1 (a),
                                   traits::matrix_size2 (a));
     }
 
 
- template <typename MatrA>
+ template <typename MatrA>
     int gesdd_iwork (MatrA const& a) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       return detail::gesdd_iwork (traits::matrix_size1 (a),
                                   traits::matrix_size2 (a));
     }
 
 
- template <typename MatrA, typename VecS,
+ template <typename MatrA, typename VecS,
               typename MatrU, typename MatrV, typename VecW, typename VecIW>
- int gesdd (char const jobz, MatrA& a,
- VecS& s, MatrU& u, MatrV& vt, VecW& w, VecIW& iw)
+ int gesdd (char const jobz, MatrA& a,
+ VecS& s, MatrU& u, MatrV& vt, VecW& w, VecIW& iw)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
 
       BOOST_STATIC_ASSERT(
         (boost::is_same<
@@ -391,238 +391,238 @@
         boost::is_same<
           typename traits::matrix_traits<MatrA>::value_type, double
>::value));
-#endif
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 
- assert (minmn == traits::vector_size (s));
+ assert (minmn == traits::vector_size (s));
       assert ((jobz == 'N')
               || ((jobz == 'O' || jobz == 'A') && m >= n)
- || ((jobz == 'O' || jobz == 'A')
- && m < n
+ || ((jobz == 'O' || jobz == 'A')
+ && m < n
                   && m == traits::matrix_size2 (u))
- || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobz == 'N' && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (u) >= m)
               || (jobz == 'A' && traits::leading_dimension (u) >= m)
               || (jobz == 'S' && traits::leading_dimension (u) >= m));
- assert (n == traits::matrix_size2 (vt));
+ assert (n == traits::matrix_size2 (vt));
       assert ((jobz == 'N' && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (vt) >= n)
               || (jobz == 'A' && traits::leading_dimension (vt) >= n)
               || (jobz == 'S' && traits::leading_dimension (vt) >= minmn));
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
- assert (traits::vector_size (w)
- >= detail::gesdd_min_work (val_t(), jobz, m, n));
- assert (traits::vector_size (iw) >= detail::gesdd_iwork (m, n));
-
- int info;
- detail::gesdd (jobz, m, n,
- traits::matrix_storage (a),
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
+ assert (traits::vector_size (w)
+ >= detail::gesdd_min_work (val_t(), jobz, m, n));
+ assert (traits::vector_size (iw) >= detail::gesdd_iwork (m, n));
+
+ int info;
+ detail::gesdd (jobz, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- 0, // dummy argument
- traits::vector_storage (iw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ 0, // dummy argument
+ traits::vector_storage (iw),
                      &info);
- return info;
+ return info;
     }
 
 
- template <typename MatrA, typename VecS, typename MatrU,
+ template <typename MatrA, typename VecS, typename MatrU,
               typename MatrV, typename VecW, typename VecRW, typename VecIW>
- int gesdd (char const jobz, MatrA& a,
- VecS& s, MatrU& u, MatrV& vt, VecW& w, VecRW& rw, VecIW& iw)
+ int gesdd (char const jobz, MatrA& a,
+ VecS& s, MatrU& u, MatrV& vt, VecW& w, VecRW& rw, VecIW& iw)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 
- assert (minmn == traits::vector_size (s));
+ assert (minmn == traits::vector_size (s));
       assert ((jobz == 'N')
               || ((jobz == 'O' || jobz == 'A') && m >= n)
- || ((jobz == 'O' || jobz == 'A')
- && m < n
+ || ((jobz == 'O' || jobz == 'A')
+ && m < n
                   && m == traits::matrix_size2 (u))
- || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobz == 'N' && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (u) >= m)
               || (jobz == 'A' && traits::leading_dimension (u) >= m)
               || (jobz == 'S' && traits::leading_dimension (u) >= m));
- assert (n == traits::matrix_size2 (vt));
+ assert (n == traits::matrix_size2 (vt));
       assert ((jobz == 'N' && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (vt) >= n)
               || (jobz == 'A' && traits::leading_dimension (vt) >= n)
               || (jobz == 'S' && traits::leading_dimension (vt) >= minmn));
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
- assert (traits::vector_size (w)
- >= detail::gesdd_min_work (val_t(), jobz, m, n));
- assert (traits::vector_size (rw)
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
+ assert (traits::vector_size (w)
+ >= detail::gesdd_min_work (val_t(), jobz, m, n));
+ assert (traits::vector_size (rw)
>= detail::gesdd_rwork (val_t(), jobz, m, n));
- assert (traits::vector_size (iw) >= detail::gesdd_iwork (m, n));
+ assert (traits::vector_size (iw) >= detail::gesdd_iwork (m, n));
 
- int info;
- detail::gesdd (jobz, m, n,
- traits::matrix_storage (a),
+ int info;
+ detail::gesdd (jobz, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- traits::vector_storage (rw),
- traits::vector_storage (iw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ traits::vector_storage (rw),
+ traits::vector_storage (iw),
                      &info);
- return info;
+ return info;
     }
 
 
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
- int gesdd (char const opt, char const jobz,
- MatrA& a, VecS& s, MatrU& u, MatrV& vt)
+ int gesdd (char const opt, char const jobz,
+ MatrA& a, VecS& s, MatrU& u, MatrV& vt)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
 #ifndef NDEBUG
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 #endif // NDEBUG
 
- assert (minmn == traits::vector_size (s));
+ assert (minmn == traits::vector_size (s));
       assert ((jobz == 'N')
               || ((jobz == 'O' || jobz == 'A') && m >= n)
- || ((jobz == 'O' || jobz == 'A')
- && m < n
+ || ((jobz == 'O' || jobz == 'A')
+ && m < n
                   && m == traits::matrix_size2 (u))
- || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobz == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobz == 'N' && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (u) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (u) >= m)
               || (jobz == 'A' && traits::leading_dimension (u) >= m)
               || (jobz == 'S' && traits::leading_dimension (u) >= m));
- assert (n == traits::matrix_size2 (vt));
+ assert (n == traits::matrix_size2 (vt));
       assert ((jobz == 'N' && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m < n
                   && traits::leading_dimension (vt) >= 1)
- || (jobz == 'O'
+ || (jobz == 'O'
                   && m >= n
                   && traits::leading_dimension (vt) >= n)
               || (jobz == 'A' && traits::leading_dimension (vt) >= n)
               || (jobz == 'S' && traits::leading_dimension (vt) >= minmn));
 
 #ifdef BOOST_NUMERIC_BINDINGS_LAPACK_2
- assert (opt == 'M');
+ assert (opt == 'M');
 #else
- assert (opt == 'M' || opt == 'O');
-#endif
+ assert (opt == 'M' || opt == 'O');
+#endif
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
 #else
- typedef typename MatrA::value_type val_t;
+ typedef typename MatrA::value_type val_t;
 #endif
       typedef typename traits::type_traits<val_t>::real_type real_t;
 
- int const lw = gesdd_work (opt, jobz, a);
- traits::detail::array<val_t> w (lw);
- if (!w.valid()) return -101;
-
- int const lrw = gesdd_rwork (jobz, a);
- traits::detail::array<real_t> rw (lrw);
- if (!rw.valid()) return -102;
-
- int const liw = gesdd_iwork (a);
- traits::detail::array<int> iw (liw);
- if (!iw.valid()) return -103;
-
- int info;
- detail::gesdd (jobz, m, n,
- traits::matrix_storage (a),
+ int const lw = gesdd_work (opt, jobz, a);
+ traits::detail::array<val_t> w (lw);
+ if (!w.valid()) return -101;
+
+ int const lrw = gesdd_rwork (jobz, a);
+ traits::detail::array<real_t> rw (lrw);
+ if (!rw.valid()) return -102;
+
+ int const liw = gesdd_iwork (a);
+ traits::detail::array<int> iw (liw);
+ if (!iw.valid()) return -103;
+
+ int info;
+ detail::gesdd (jobz, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- lw, //traits::vector_size (w),
- traits::vector_storage (rw),
- traits::vector_storage (iw),
+ traits::vector_storage (w),
+ lw, //traits::vector_size (w),
+ traits::vector_storage (rw),
+ traits::vector_storage (iw),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -631,71 +631,71 @@
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
     inline
     int gesdd (char const jobz, MatrA& a, VecS& s, MatrU& u, MatrV& vt) {
- return gesdd ('O', jobz, a, s, u, vt);
+ return gesdd ('O', jobz, a, s, u, vt);
     }
 
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
     inline
     int gesdd (MatrA& a, VecS& s, MatrU& u, MatrV& vt) {
- return gesdd ('O', 'S', a, s, u, vt);
+ return gesdd ('O', 'S', a, s, u, vt);
     }
 
- template <typename MatrA, typename VecS>
+ template <typename MatrA, typename VecS>
     int gesdd (MatrA& a, VecS& s) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
 #endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 
- assert (minmn == traits::vector_size (s));
+ assert (minmn == traits::vector_size (s));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
 #endif
       typedef typename traits::type_traits<val_t>::real_type real_t;
 
- int const lw = gesdd_work ('O', 'N', a);
- traits::detail::array<val_t> w (lw);
- if (!w.valid()) return -101;
-
- int const lrw = gesdd_rwork ('N', a);
- traits::detail::array<real_t> rw (lrw);
- if (!rw.valid()) return -102;
-
- int const liw = gesdd_iwork (a);
- traits::detail::array<int> iw (liw);
- if (!iw.valid()) return -103;
-
- int info;
- detail::gesdd ('N', m, n,
- traits::matrix_storage (a),
+ int const lw = gesdd_work ('O', 'N', a);
+ traits::detail::array<val_t> w (lw);
+ if (!w.valid()) return -101;
+
+ int const lrw = gesdd_rwork ('N', a);
+ traits::detail::array<real_t> rw (lrw);
+ if (!rw.valid()) return -102;
+
+ int const liw = gesdd_iwork (a);
+ traits::detail::array<int> iw (liw);
+ if (!iw.valid()) return -103;
+
+ int info;
+ detail::gesdd ('N', m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      0, // traits::matrix_storage (u),
                      1, // traits::leading_dimension (u),
                      0, // traits::matrix_storage (vt),
                      1, // traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- traits::vector_storage (rw),
- traits::vector_storage (iw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ traits::vector_storage (rw),
+ traits::vector_storage (iw),
                      &info);
- return info;
+ return info;
     }
 
-#endif
+#endif
 
   } // namespace lapack
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/gesv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gesv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gesv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -22,71 +22,71 @@
 #include <boost/numeric/bindings/lapack/ilaenv.hpp>
 
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // general system of linear equations A * X = B
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * gesv() computes the solution to a system of linear equations
      * A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS
      * matrices.
      *
- * The LU decomposition with partial pivoting and row interchanges
- * is used to factor A as A = P * L * U, where P is a permutation
- * matrix, L is unit lower triangular, and U is upper triangular.
- * The factored form of A is then used to solve the system of
+ * The LU decomposition with partial pivoting and row interchanges
+ * is used to factor A as A = P * L * U, where P is a permutation
+ * matrix, L is unit lower triangular, and U is upper triangular.
+ * The factored form of A is then used to solve the system of
      * equations A * X = B.
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void gesv (int const n, int const nrhs,
- float* a, int const lda, int* ipiv,
- float* b, int const ldb, int* info)
+ float* a, int const lda, int* ipiv,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SGESV (&n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void gesv (int const n, int const nrhs,
- double* a, int const lda, int* ipiv,
- double* b, int const ldb, int* info)
+ double* a, int const lda, int* ipiv,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DGESV (&n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void gesv (int const n, int const nrhs,
- traits::complex_f* a, int const lda, int* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* a, int const lda, int* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CGESV (&n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CGESV (&n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
-
- inline
+
+ inline
       void gesv (int const n, int const nrhs,
- traits::complex_d* a, int const lda, int* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d* a, int const lda, int* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZGESV (&n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZGESV (&n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
@@ -95,87 +95,87 @@
     template <typename MatrA, typename MatrB, typename IVec>
     int gesv (MatrA& a, IVec& ipiv, MatrB& b) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (ipiv));
-
- int info;
- detail::gesv (n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (ipiv));
+
+ int info;
+ detail::gesv (n, traits::matrix_size2 (b),
+ traits::matrix_storage (a),
                     traits::leading_dimension (a),
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
                     traits::matrix_storage (b),
                     traits::leading_dimension (b),
                     &info);
- return info;
+ return info;
     }
 
     template <typename MatrA, typename MatrB>
     int gesv (MatrA& a, MatrB& b) {
- // with 'internal' pivot vector
-
- // gesv() errors:
+ // with 'internal' pivot vector
+
+ // gesv() errors:
       // if (info == 0), successful
       // if (info < 0), the -info argument had an illegal value
       // -- we will use -101 if allocation fails
- // if (info > 0), U(i-1,i-1) is exactly zero
- int info = -101;
- traits::detail::array<int> ipiv (traits::matrix_size1 (a));
- if (ipiv.valid())
- info = gesv (a, ipiv, b);
- return info;
+ // if (info > 0), U(i-1,i-1) is exactly zero
+ int info = -101;
+ traits::detail::array<int> ipiv (traits::matrix_size1 (a));
+ if (ipiv.valid())
+ info = gesv (a, ipiv, b);
+ return info;
     }
 
 
- /*
- * getrf() computes an LU factorization of a general M-by-N matrix A
- * using partial pivoting with row interchanges. The factorization
- * has the form A = P * L * U, where P is a permutation matrix,
+ /*
+ * getrf() computes an LU factorization of a general M-by-N matrix A
+ * using partial pivoting with row interchanges. The factorization
+ * has the form A = P * L * U, where P is a permutation matrix,
      * L is lower triangular with unit diagonal elements (lower
- * trapezoidal if M > N), and U is upper triangular (upper
+ * trapezoidal if M > N), and U is upper triangular (upper
      * trapezoidal if M < N).
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void getrf (int const n, int const m,
- float* a, int const lda, int* ipiv, int* info)
+ float* a, int const lda, int* ipiv, int* info)
       {
         LAPACK_SGETRF (&n, &m, a, &lda, ipiv, info);
       }
 
- inline
+ inline
       void getrf (int const n, int const m,
- double* a, int const lda, int* ipiv, int* info)
+ double* a, int const lda, int* ipiv, int* info)
       {
         LAPACK_DGETRF (&n, &m, a, &lda, ipiv, info);
       }
 
- inline
+ inline
       void getrf (int const n, int const m,
- traits::complex_f* a, int const
- lda, int* ipiv, int* info)
+ traits::complex_f* a, int const
+ lda, int* ipiv, int* info)
       {
         LAPACK_CGETRF (&n, &m, traits::complex_ptr (a), &lda, ipiv, info);
       }
 
- inline
+ inline
       void getrf (int const n, int const m,
- traits::complex_d* a, int const lda,
- int* ipiv, int* info)
+ traits::complex_d* a, int const lda,
+ int* ipiv, int* info)
       {
         LAPACK_ZGETRF (&n, &m, traits::complex_ptr (a), &lda, ipiv, info);
       }
@@ -185,196 +185,196 @@
     template <typename MatrA, typename IVec>
     int getrf (MatrA& a, IVec& ipiv) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (a);
- int const m = traits::matrix_size2 (a);
+ int const m = traits::matrix_size2 (a);
       assert (traits::vector_size (ipiv) == (m < n ? m : n));
 
- int info;
- detail::getrf (n, m,
- traits::matrix_storage (a),
+ int info;
+ detail::getrf (n, m,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
                      &info);
- return info;
+ return info;
     }
 
 
     /*
- * getrs() solves a system of linear equations A * X = B
- * or A^T * X = B with a general N-by-N matrix A using
+ * getrs() solves a system of linear equations A * X = B
+ * or A^T * X = B with a general N-by-N matrix A using
      * the LU factorization computed by getrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void getrs (char const trans, int const n, int const nrhs,
- float const* a, int const lda, int const* ipiv,
- float* b, int const ldb, int* info)
+ float const* a, int const lda, int const* ipiv,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SGETRS (&trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void getrs (char const trans, int const n, int const nrhs,
- double const* a, int const lda, int const* ipiv,
- double* b, int const ldb, int* info)
+ double const* a, int const lda, int const* ipiv,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DGETRS (&trans, &n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void getrs (char const trans, int const n, int const nrhs,
- traits::complex_f const* a, int const lda,
- int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* a, int const lda,
+ int const* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CGETRS (&trans, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CGETRS (&trans, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void getrs (char const trans, int const n, int const nrhs,
- traits::complex_d const* a, int const lda,
- int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* a, int const lda,
+ int const* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZGETRS (&trans, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZGETRS (&trans, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
     } // namespace detail
 
     template <typename MatrA, typename MatrB, typename IVec>
- int getrs (char const trans, MatrA const& a, IVec const& ipiv, MatrB& b)
+ int getrs (char const trans, MatrA const& a, IVec const& ipiv, MatrB& b)
     {
- assert (trans == 'N' || trans == 'T' || trans == 'C');
+ assert (trans == 'N' || trans == 'T' || trans == 'C');
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (ipiv));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (ipiv));
 
- int info;
- detail::getrs (trans, n, traits::matrix_size2 (b),
+ int info;
+ detail::getrs (trans, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
-#endif
+ traits::matrix_storage_const (a),
+#endif
                      traits::leading_dimension (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
 #else
- traits::vector_storage_const (ipiv),
+ traits::vector_storage_const (ipiv),
 #endif
                      traits::matrix_storage (b),
                      traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     }
 
     template <typename MatrA, typename MatrB, typename IVec>
     inline
     int getrs (MatrA const& a, IVec const& ipiv, MatrB& b) {
- char const no_transpose = 'N';
- return getrs (no_transpose, a, ipiv, b);
+ char const no_transpose = 'N';
+ return getrs (no_transpose, a, ipiv, b);
     }
 
     /*
- * getri() computes the inverse of a matrix using
+ * getri() computes the inverse of a matrix using
      * the LU factorization computed by getrf().
      */
 
     namespace detail {
 
- inline
- void getri (int const n, float* a, int const lda, int const* ipiv,
- float* work, int const lwork, int* info)
+ inline
+ void getri (int const n, float* a, int const lda, int const* ipiv,
+ float* work, int const lwork, int* info)
       {
         LAPACK_SGETRI (&n, a, &lda, ipiv, work, &lwork, info);
       }
 
- inline
- void getri (int const n, double* a, int const lda, int const* ipiv,
- double* work, int const lwork, int* info)
+ inline
+ void getri (int const n, double* a, int const lda, int const* ipiv,
+ double* work, int const lwork, int* info)
       {
         LAPACK_DGETRI (&n, a, &lda, ipiv, work, &lwork, info);
       }
 
- inline
- void getri (int const n, traits::complex_f* a, int const lda,
- int const* ipiv, traits::complex_f* work, int const lwork,
- int* info)
+ inline
+ void getri (int const n, traits::complex_f* a, int const lda,
+ int const* ipiv, traits::complex_f* work, int const lwork,
+ int* info)
       {
- LAPACK_CGETRI (&n, traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CGETRI (&n, traits::complex_ptr (a), &lda, ipiv,
             traits::complex_ptr (work), &lwork, info);
       }
 
- inline
- void getri (int const n, traits::complex_d* a, int const lda,
- int const* ipiv, traits::complex_d* work, int const lwork,
- int* info)
+ inline
+ void getri (int const n, traits::complex_d* a, int const lda,
+ int const* ipiv, traits::complex_d* work, int const lwork,
+ int* info)
       {
- LAPACK_ZGETRI (&n, traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZGETRI (&n, traits::complex_ptr (a), &lda, ipiv,
             traits::complex_ptr (work), &lwork, info);
       }
 
-
-
+
+
       template <typename MatrA, typename IVec, typename Work>
- int getri (MatrA& a, IVec const& ipiv, Work& work)
+ int getri (MatrA& a, IVec const& ipiv, Work& work)
       {
- #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+ #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
               traits::general_t
- >::value));
- #endif
+ >::value));
+ #endif
 
         int const n = traits::matrix_size1 (a);
         assert (n > 0);
- assert (n <= traits::leading_dimension (a));
+ assert (n <= traits::leading_dimension (a));
         assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (ipiv));
+ assert (n == traits::vector_size (ipiv));
         assert (n <= traits::vector_size (work)); //Minimal workspace size
 
         int info;
         //double* dummy = traits::matrix_storage (a);
- detail::getri (n, traits::matrix_storage (a),
+ detail::getri (n, traits::matrix_storage (a),
             traits::leading_dimension (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
 #else
- traits::vector_storage_const (ipiv),
+ traits::vector_storage_const (ipiv),
 #endif
             traits::vector_storage (work),
             traits::vector_size (work),
             &info);
         return info;
       }
-
-
+
+
       inline
       int getri_block(float)
       {
@@ -401,7 +401,7 @@
 
     } // namespace detail
 
-
+
     template <typename MatrA, typename IVec>
     int getri(MatrA& a, IVec& ipiv, minimal_workspace)
     {
@@ -412,7 +412,7 @@
 
       return detail::getri(a, ipiv, work);
 
- }
+ }
 
 
     // optimal workspace allocation
@@ -442,7 +442,7 @@
     int getri(MatrA& a, IVec& ipiv, Work& work)
     {
       return detail::getri(a, ipiv, work);
- }
+ }
 
   } // namespace lapack
 
@@ -451,4 +451,4 @@
 
 
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/gesvd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/gesvd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/gesvd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,245 +20,245 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 #include <boost/numeric/bindings/traits/detail/utils.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // singular value decomposition
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
- * (simple driver)
- * gesvd() computes the singular value decomposition (SVD) of
- * M-by-N matrix A, optionally computing the left and/or right
+ /*
+ * (simple driver)
+ * gesvd() computes the singular value decomposition (SVD) of
+ * M-by-N matrix A, optionally computing the left and/or right
      * singular vectors. The SVD is written
      *
      * A = U * S * V^T or A = U * S * V^H
      *
      * where S is an M-by-N matrix which is zero except for its min(m,n)
- * diagonal elements, U is an M-by-M orthogonal/unitary matrix, and V
+ * diagonal elements, U is an M-by-M orthogonal/unitary matrix, and V
      * is an N-by-N orthogonal/unitary matrix. The diagonal elements of S
- * are the singular values of A; they are real and non-negative, and
- * are returned in descending order. The first min(m,n) columns of
- * U and V are the left and right singular vectors of A. (Note that
+ * are the singular values of A; they are real and non-negative, and
+ * are returned in descending order. The first min(m,n) columns of
+ * U and V are the left and right singular vectors of A. (Note that
      * the routine returns V^T or V^H, not V.
- */
+ */
 
     namespace detail {
 
- inline
- void gesvd (char const jobu, char const jobvt,
- int const m, int const n, float* a, int const lda,
- float* s, float* u, int const ldu,
+ inline
+ void gesvd (char const jobu, char const jobvt,
+ int const m, int const n, float* a, int const lda,
+ float* s, float* u, int const ldu,
                   float* vt, int const ldvt,
- float* work, int const lwork, float* /* dummy */,
+ float* work, int const lwork, float* /* dummy */,
                   int* info)
       {
- LAPACK_SGESVD (&jobu, &jobvt, &m, &n, a, &lda,
- s, u, &ldu, vt, &ldvt, work, &lwork, info);
+ LAPACK_SGESVD (&jobu, &jobvt, &m, &n, a, &lda,
+ s, u, &ldu, vt, &ldvt, work, &lwork, info);
       }
 
- inline
- void gesvd (char const jobu, char const jobvt,
- int const m, int const n, double* a, int const lda,
- double* s, double* u, int const ldu,
+ inline
+ void gesvd (char const jobu, char const jobvt,
+ int const m, int const n, double* a, int const lda,
+ double* s, double* u, int const ldu,
                   double* vt, int const ldvt,
- double* work, int const lwork, double* /* dummy */,
+ double* work, int const lwork, double* /* dummy */,
                   int* info)
       {
- LAPACK_DGESVD (&jobu, &jobvt, &m, &n, a, &lda,
- s, u, &ldu, vt, &ldvt, work, &lwork, info);
+ LAPACK_DGESVD (&jobu, &jobvt, &m, &n, a, &lda,
+ s, u, &ldu, vt, &ldvt, work, &lwork, info);
       }
 
- inline
- void gesvd (char const jobu, char const jobvt,
- int const m, int const n,
- traits::complex_f* a, int const lda,
- float* s, traits::complex_f* u, int const ldu,
+ inline
+ void gesvd (char const jobu, char const jobvt,
+ int const m, int const n,
+ traits::complex_f* a, int const lda,
+ float* s, traits::complex_f* u, int const ldu,
                   traits::complex_f* vt, int const ldvt,
- traits::complex_f* work, int const lwork,
+ traits::complex_f* work, int const lwork,
                   float* rwork, int* info)
       {
- LAPACK_CGESVD (&jobu, &jobvt, &m, &n,
- traits::complex_ptr (a), &lda, s,
- traits::complex_ptr (u), &ldu,
- traits::complex_ptr (vt), &ldvt,
- traits::complex_ptr (work), &lwork, rwork, info);
+ LAPACK_CGESVD (&jobu, &jobvt, &m, &n,
+ traits::complex_ptr (a), &lda, s,
+ traits::complex_ptr (u), &ldu,
+ traits::complex_ptr (vt), &ldvt,
+ traits::complex_ptr (work), &lwork, rwork, info);
       }
 
- inline
- void gesvd (char const jobu, char const jobvt,
- int const m, int const n,
- traits::complex_d* a, int const lda,
- double* s, traits::complex_d* u, int const ldu,
+ inline
+ void gesvd (char const jobu, char const jobvt,
+ int const m, int const n,
+ traits::complex_d* a, int const lda,
+ double* s, traits::complex_d* u, int const ldu,
                   traits::complex_d* vt, int const ldvt,
- traits::complex_d* work, int const lwork,
+ traits::complex_d* work, int const lwork,
                   double* rwork, int* info)
       {
- LAPACK_ZGESVD (&jobu, &jobvt, &m, &n,
- traits::complex_ptr (a), &lda, s,
- traits::complex_ptr (u), &ldu,
- traits::complex_ptr (vt), &ldvt,
- traits::complex_ptr (work), &lwork, rwork, info);
+ LAPACK_ZGESVD (&jobu, &jobvt, &m, &n,
+ traits::complex_ptr (a), &lda, s,
+ traits::complex_ptr (u), &ldu,
+ traits::complex_ptr (vt), &ldvt,
+ traits::complex_ptr (work), &lwork, rwork, info);
       }
 
- inline
+ inline
       int gesvd_min_work (float, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- int m3x = 3 * minmn + maxmn;
- int m5 = 5 * minmn;
- return m3x < m5 ? m5 : m3x;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ int m3x = 3 * minmn + maxmn;
+ int m5 = 5 * minmn;
+ return m3x < m5 ? m5 : m3x;
       }
- inline
+ inline
       int gesvd_min_work (double, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- int m3x = 3 * minmn + maxmn;
- int m5 = 5 * minmn;
- return m3x < m5 ? m5 : m3x;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ int m3x = 3 * minmn + maxmn;
+ int m5 = 5 * minmn;
+ return m3x < m5 ? m5 : m3x;
       }
- inline
+ inline
       int gesvd_min_work (traits::complex_f, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- return 2 * minmn + maxmn;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ return 2 * minmn + maxmn;
       }
- inline
+ inline
       int gesvd_min_work (traits::complex_d, int m, int n) {
- int minmn = m < n ? m : n;
- int maxmn = m < n ? n : m;
- return 2 * minmn + maxmn;
+ int minmn = m < n ? m : n;
+ int maxmn = m < n ? n : m;
+ return 2 * minmn + maxmn;
       }
 
- inline
+ inline
       int gesvd_rwork (float, int, int) { return 1; }
- inline
+ inline
       int gesvd_rwork (double, int, int) { return 1; }
- inline
+ inline
       int gesvd_rwork (traits::complex_f, int m, int n) {
         return 5 * (m < n ? m : n);
       }
- inline
+ inline
       int gesvd_rwork (traits::complex_d, int m, int n) {
         return 5 * (m < n ? m : n);
       }
 
- } // detail
+ } // detail
 
 
- template <typename MatrA>
- int gesvd_work (char const q,
- char const jobu, char const jobvt, MatrA const& a)
+ template <typename MatrA>
+ int gesvd_work (char const q,
+ char const jobu, char const jobvt, MatrA const& a)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
 #ifdef BOOST_NUMERIC_BINDINGS_LAPACK_2
- assert (q == 'M');
+ assert (q == 'M');
 #else
- assert (q == 'M' || q == 'O');
-#endif
- assert (jobu == 'N' || jobu == 'O' || jobu == 'A' || jobu == 'S');
- assert (jobvt == 'N' || jobvt == 'O' || jobvt == 'A' || jobvt == 'S');
- assert (!(jobu == 'O' && jobvt == 'O'));
+ assert (q == 'M' || q == 'O');
+#endif
+ assert (jobu == 'N' || jobu == 'O' || jobu == 'A' || jobu == 'S');
+ assert (jobvt == 'N' || jobvt == 'O' || jobvt == 'A' || jobvt == 'S');
+ assert (!(jobu == 'O' && jobvt == 'O'));
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
- int lw = -13;
+ int lw = -13;
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
 
- if (q == 'M')
+ if (q == 'M')
         lw = detail::gesvd_min_work (val_t(), m, n);
 
 #ifndef BOOST_NUMERIC_BINDINGS_LAPACK_2
- MatrA& a2 = const_cast<MatrA&> (a);
+ MatrA& a2 = const_cast<MatrA&> (a);
       if (q == 'O') {
- // traits::detail::array<val_t> w (0);
- val_t w;
- int info;
- detail::gesvd (jobu, jobvt, m, n,
- traits::matrix_storage (a2),
+ // traits::detail::array<val_t> w (0);
+ val_t w;
+ int info;
+ detail::gesvd (jobu, jobvt, m, n,
+ traits::matrix_storage (a2),
                        traits::leading_dimension (a2),
- 0, // traits::vector_storage (s),
+ 0, // traits::vector_storage (s),
                        0, // traits::matrix_storage (u),
                        m, // traits::leading_dimension (u),
                        0, // traits::matrix_storage (vt),
                        n, // traits::leading_dimension (vt),
- &w, // traits::vector_storage (w),
- -1, // traits::vector_size (w),
- 0, // traits::vector_storage (rw),
+ &w, // traits::vector_storage (w),
+ -1, // traits::vector_size (w),
+ 0, // traits::vector_storage (rw),
                        &info);
- assert (info == 0);
- lw = traits::detail::to_int (w); // (w[0]);
+ assert (info == 0);
+ lw = traits::detail::to_int (w); // (w[0]);
       }
-#endif
-
- return lw;
+#endif
+
+ return lw;
     }
 
 
- template <typename MatrA>
+ template <typename MatrA>
     int gesvd_rwork (MatrA const& a) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
 #else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename MatrA::value_type val_t;
+#endif
 
- return detail::gesvd_rwork (val_t(),
+ return detail::gesvd_rwork (val_t(),
                                   traits::matrix_size1 (a),
                                   traits::matrix_size2 (a));
     }
 
 
- template <typename MatrA, typename VecS,
+ template <typename MatrA, typename VecS,
               typename MatrU, typename MatrV, typename VecW>
- int gesvd (char const jobu, char const jobvt,
- MatrA& a, VecS& s, MatrU& u, MatrV& vt, VecW& w)
+ int gesvd (char const jobu, char const jobvt,
+ MatrA& a, VecS& s, MatrU& u, MatrV& vt, VecW& w)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
 
       BOOST_STATIC_ASSERT(
         (boost::is_same<
@@ -268,152 +268,152 @@
         boost::is_same<
           typename traits::matrix_traits<MatrA>::value_type, double
>::value));
-#endif
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
 #ifndef NDEBUG /* this variable is only used in assertions below */
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 #endif
 
- assert (minmn == traits::vector_size (s));
- assert (!(jobu == 'O' && jobvt == 'O'));
+ assert (minmn == traits::vector_size (s));
+ assert (!(jobu == 'O' && jobvt == 'O'));
       assert ((jobu == 'N')
               || (jobu == 'O')
               || (jobu == 'A' && m == traits::matrix_size2 (u))
- || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobu == 'N' && traits::leading_dimension (u) >= 1)
               || (jobu == 'O' && traits::leading_dimension (u) >= 1)
               || (jobu == 'A' && traits::leading_dimension (u) >= m)
               || (jobu == 'S' && traits::leading_dimension (u) >= m));
- assert (n == traits::matrix_size2 (vt));
+ assert (n == traits::matrix_size2 (vt));
       assert ((jobvt == 'N' && traits::leading_dimension (vt) >= 1)
               || (jobvt == 'O' && traits::leading_dimension (vt) >= 1)
               || (jobvt == 'A' && traits::leading_dimension (vt) >= n)
               || (jobvt == 'S' && traits::leading_dimension (vt) >= minmn));
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
 #endif
- assert (traits::vector_size(w) >= detail::gesvd_min_work(val_t(),m,n));
+ assert (traits::vector_size(w) >= detail::gesvd_min_work(val_t(),m,n));
 
- int info;
- detail::gesvd (jobu, jobvt, m, n,
- traits::matrix_storage (a),
+ int info;
+ detail::gesvd (jobu, jobvt, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- 0, // dummy argument
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ 0, // dummy argument
                      &info);
- return info;
+ return info;
     }
 
 
- template <typename MatrA, typename VecS,
+ template <typename MatrA, typename VecS,
               typename MatrU, typename MatrV, typename VecW, typename VecRW>
- int gesvd (char const jobu, char const jobvt,
- MatrA& a, VecS& s, MatrU& u, MatrV& vt, VecW& w, VecRW& rw)
+ int gesvd (char const jobu, char const jobvt,
+ MatrA& a, VecS& s, MatrU& u, MatrV& vt, VecW& w, VecRW& rw)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
 #ifndef NDEBUG /* this variable is only used in assertions below */
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 #endif
 
- assert (minmn == traits::vector_size (s));
- assert (!(jobu == 'O' && jobvt == 'O'));
+ assert (minmn == traits::vector_size (s));
+ assert (!(jobu == 'O' && jobvt == 'O'));
       assert ((jobu == 'N')
               || (jobu == 'O')
               || (jobu == 'A' && m == traits::matrix_size2 (u))
- || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobu == 'N' && traits::leading_dimension (u) >= 1)
               || (jobu == 'O' && traits::leading_dimension (u) >= 1)
               || (jobu == 'A' && traits::leading_dimension (u) >= m)
               || (jobu == 'S' && traits::leading_dimension (u) >= m));
- assert (n == traits::matrix_size2 (vt));
+ assert (n == traits::matrix_size2 (vt));
       assert ((jobvt == 'N' && traits::leading_dimension (vt) >= 1)
               || (jobvt == 'O' && traits::leading_dimension (vt) >= 1)
               || (jobvt == 'A' && traits::leading_dimension (vt) >= n)
               || (jobvt == 'S' && traits::leading_dimension (vt) >= minmn));
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
- assert (traits::vector_size(w) >= detail::gesvd_min_work(val_t(),m,n));
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
+ assert (traits::vector_size(w) >= detail::gesvd_min_work(val_t(),m,n));
       assert (traits::vector_size(rw) >= detail::gesvd_rwork(val_t(),m,n));
 
- int info;
- detail::gesvd (jobu, jobvt, m, n,
- traits::matrix_storage (a),
+ int info;
+ detail::gesvd (jobu, jobvt, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- traits::vector_storage (rw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ traits::vector_storage (rw),
                      &info);
- return info;
+ return info;
     }
 
 
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
- int gesvd (char const opt, char const jobu, char const jobvt,
- MatrA& a, VecS& s, MatrU& u, MatrV& vt)
+ int gesvd (char const opt, char const jobu, char const jobvt,
+ MatrA& a, VecS& s, MatrU& u, MatrV& vt)
     {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrU>::matrix_structure,
+ typename traits::matrix_traits<MatrU>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrV>::matrix_structure,
+ typename traits::matrix_traits<MatrV>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
 #ifndef NDEBUG /* this variable is only used in assertions below */
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 #endif
 
- assert (minmn == traits::vector_size (s));
- assert (!(jobu == 'O' && jobvt == 'O'));
+ assert (minmn == traits::vector_size (s));
+ assert (!(jobu == 'O' && jobvt == 'O'));
       assert ((jobu == 'N')
               || (jobu == 'O')
               || (jobu == 'A' && m == traits::matrix_size2 (u))
- || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
+ || (jobu == 'S' && minmn == traits::matrix_size2 (u)));
       assert ((jobu == 'N' && traits::leading_dimension (u) >= 1)
               || (jobu == 'O' && traits::leading_dimension (u) >= 1)
               || (jobu == 'A' && traits::leading_dimension (u) >= m)
@@ -425,40 +425,40 @@
               || (jobvt == 'S' && traits::leading_dimension (vt) >= minmn));
 
 #ifdef BOOST_NUMERIC_BINDINGS_LAPACK_2
- assert (opt == 'M');
+ assert (opt == 'M');
 #else
- assert (opt == 'M' || opt == 'O');
-#endif
+ assert (opt == 'M' || opt == 'O');
+#endif
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
       typedef typename traits::type_traits<val_t>::real_type real_t;
 
- int const lw = gesvd_work (opt, jobu, jobvt, a);
- traits::detail::array<val_t> w (lw);
- if (!w.valid()) return -101;
-
- int const lrw = gesvd_rwork (a);
- traits::detail::array<real_t> rw (lrw);
- if (!rw.valid()) return -102;
-
- int info;
- detail::gesvd (jobu, jobvt, m, n,
- traits::matrix_storage (a),
+ int const lw = gesvd_work (opt, jobu, jobvt, a);
+ traits::detail::array<val_t> w (lw);
+ if (!w.valid()) return -101;
+
+ int const lrw = gesvd_rwork (a);
+ traits::detail::array<real_t> rw (lrw);
+ if (!rw.valid()) return -102;
+
+ int info;
+ detail::gesvd (jobu, jobvt, m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      traits::matrix_storage (u),
                      traits::leading_dimension (u),
                      traits::matrix_storage (vt),
                      traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- traits::vector_storage (rw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ traits::vector_storage (rw),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -466,16 +466,16 @@
 
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
     inline
- int gesvd (char const jobu, char const jobvt,
- MatrA& a, VecS& s, MatrU& u, MatrV& vt)
+ int gesvd (char const jobu, char const jobvt,
+ MatrA& a, VecS& s, MatrU& u, MatrV& vt)
     {
- return gesvd ('O', jobu, jobvt, a, s, u, vt);
+ return gesvd ('O', jobu, jobvt, a, s, u, vt);
     }
 
     template <typename MatrA, typename VecS, typename MatrU, typename MatrV>
     inline
     int gesvd (MatrA& a, VecS& s, MatrU& u, MatrV& vt) {
- return gesvd ('O', 'S', 'S', a, s, u, vt);
+ return gesvd ('O', 'S', 'S', a, s, u, vt);
     }
 
     template <typename MatrA, typename VecS>
@@ -483,54 +483,54 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrA>::matrix_structure,
+ typename traits::matrix_traits<MatrA>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const m = traits::matrix_size1 (a);
       int const n = traits::matrix_size2 (a);
 #ifndef NDEBUG /* this variable is only used in assertions below */
- int const minmn = m < n ? m : n;
+ int const minmn = m < n ? m : n;
 #endif
 
- assert (minmn == traits::vector_size (s));
+ assert (minmn == traits::vector_size (s));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<MatrA>::value_type val_t;
-#else
- typedef typename MatrA::value_type val_t;
-#endif
+ typedef typename traits::matrix_traits<MatrA>::value_type val_t;
+#else
+ typedef typename MatrA::value_type val_t;
+#endif
       typedef typename traits::type_traits<val_t>::real_type real_t;
 
- int const lw = gesvd_work ('O', 'N', 'N', a);
- traits::detail::array<val_t> w (lw);
- if (!w.valid()) return -101;
-
- int const lrw = gesvd_rwork (a);
- traits::detail::array<real_t> rw (lrw);
- if (!rw.valid()) return -102;
-
- int info;
- detail::gesvd ('N', 'N', m, n,
- traits::matrix_storage (a),
+ int const lw = gesvd_work ('O', 'N', 'N', a);
+ traits::detail::array<val_t> w (lw);
+ if (!w.valid()) return -101;
+
+ int const lrw = gesvd_rwork (a);
+ traits::detail::array<real_t> rw (lrw);
+ if (!rw.valid()) return -102;
+
+ int info;
+ detail::gesvd ('N', 'N', m, n,
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (s),
+ traits::vector_storage (s),
                      0, // traits::matrix_storage (u),
                      1, // traits::leading_dimension (u),
                      0, // traits::matrix_storage (vt),
                      1, // traits::leading_dimension (vt),
- traits::vector_storage (w),
- traits::vector_size (w),
- traits::vector_storage (rw),
+ traits::vector_storage (w),
+ traits::vector_size (w),
+ traits::vector_storage (rw),
                      &info);
- return info;
+ return info;
     }
 
-#endif
+#endif
 
   } // namespace lapack
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/hbev.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hbev.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hbev.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,23 +20,23 @@
 #include <boost/numeric/bindings/lapack/workspace.hpp>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Eigendecomposition of a banded Hermitian matrix.
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * hbev() computes the eigenvalues and optionally the associated
      * eigenvectors of a banded Hermitian matrix A. A matrix is Hermitian
      * when herm( A ) == A. When A is real, a Hermitian matrix is also
@@ -70,51 +70,51 @@
      * When uplo=='L', the (i,j) element with j>=i is in position (i-j) + j * (KD+1).
      *
      * The matrix A is thus a rectangular matrix with KD+1 rows and N columns.
- */
+ */
 
     namespace detail {
- inline
+ inline
       void hbev (char const jobz, char const uplo, int const n, int const kd,
                  float* ab, int const ldab, float* w, float* z, int const ldz,
- float* work, int& info)
+ float* work, int& info)
       {
- //for (int i=0; i<n*kd; ++i) std::cout << *(ab+i) << " " ;
- //std::cout << "\n" ;
+ //for (int i=0; i<n*kd; ++i) std::cout << *(ab+i) << " " ;
+ //std::cout << "\n" ;
         LAPACK_SSBEV (&jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz,
                       work, &info);
       }
 
- inline
+ inline
       void hbev (char const jobz, char const uplo, int const n, int const kd,
                  double* ab, int const ldab, double* w, double* z, int const ldz,
- double* work, int& info)
+ double* work, int& info)
       {
         LAPACK_DSBEV (&jobz, &uplo, &n, &kd, ab, &ldab, w, z, &ldz,
                       work, &info);
       }
 
- inline
+ inline
       void hbev (char const jobz, char const uplo, int const n, int const kd,
                  traits::complex_f* ab, int const ldab, float* w,
                  traits::complex_f* z, int const ldz,
- traits::complex_f* work, float* rwork, int& info)
+ traits::complex_f* work, float* rwork, int& info)
       {
         LAPACK_CHBEV (&jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
                       w, traits::complex_ptr(z), &ldz,
                       traits::complex_ptr(work), rwork, &info);
       }
 
- inline
+ inline
       void hbev (char const jobz, char const uplo, int const n, int const kd,
                  traits::complex_d* ab, int const ldab, double* w,
                  traits::complex_d* z, int const ldz,
- traits::complex_d* work, double* rwork, int& info)
+ traits::complex_d* work, double* rwork, int& info)
       {
         LAPACK_ZHBEV (&jobz, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
                       w, traits::complex_ptr(z), &ldz,
                       traits::complex_ptr(work), rwork, &info);
       }
- }
+ }
 
 
     namespace detail {
@@ -203,7 +203,7 @@
                    info );
           }
        }; // Hbev< 2 >
-
+
 
 
        /// Compute eigendecomposition of the banded Hermitian matrix ab.
@@ -222,12 +222,12 @@
        /// vector_size( rwork ) >= 3*matrix_size1( a )-2.
        template <typename AB, typename Z, typename W, typename Work>
        int hbev( char const jobz, AB& ab, W& w, Z& z, Work work ) {
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<AB>::matrix_structure,
+ typename traits::matrix_traits<AB>::matrix_structure,
            traits::hermitian_t
- >::value));
-#endif
+ >::value));
+#endif
 
          typedef typename AB::value_type value_type ;
 
@@ -236,7 +236,7 @@
          assert (n == traits::vector_size (w));
          assert ( jobz=='N' || jobz=='V' );
 
- int info ;
+ int info ;
          detail::Hbev< n_workspace_args<value_type>::value >() (jobz,
                        traits::matrix_uplo_tag( ab ), n,
                        traits::matrix_upper_bandwidth(ab),
@@ -246,7 +246,7 @@
                        traits::matrix_storage (z),
                        traits::leading_dimension (z),
                        work, info);
- return info ;
+ return info ;
        } // hbev()
        
        } // namespace detail
@@ -265,12 +265,12 @@
        inline
        int hbev (AB& ab, W& w, Z& z, Work work) {
          BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<Z>::matrix_structure,
+ typename traits::matrix_traits<Z>::matrix_structure,
            traits::general_t
- >::value));
+ >::value));
          int const n = traits::matrix_size2 (ab);
- assert (n == traits::matrix_size1 (z));
- assert (n == traits::matrix_size2 (z));
+ assert (n == traits::matrix_size1 (z));
+ assert (n == traits::matrix_size2 (z));
           return detail::hbev( 'V', ab, w, z, work );
        } // hbev()
 
@@ -278,4 +278,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/hbevx.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hbevx.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hbevx.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  * Copyright Thomas Klimpel 2008
  *
@@ -7,7 +7,7 @@
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,13 +21,13 @@
 #include <boost/numeric/bindings/lapack/workspace.hpp>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -37,7 +37,7 @@
     //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * hbevx() computes the eigenvalues and optionally the associated
      * eigenvectors of a banded Hermitian matrix A. A matrix is Hermitian
      * when herm( A ) == A. When A is real, a Hermitian matrix is also
@@ -60,17 +60,17 @@
      * When uplo=='L', the (i,j) element with j>=i is in position (i-j) + j * (KD+1).
      *
      * The matrix A is thus a rectangular matrix with KD+1 rows and N columns.
- */
+ */
 
     namespace detail {
- inline
+ inline
       void hbevx (
         char const jobz, char const range, char const uplo, int const n, int const kd,
         float* ab, int const ldab, float* q, int const ldq,
         float const vl, float const vu, int const il, int const iu,
         float const abstol, int& m,
         float* w, float* z, int const ldz,
- float* work, int* iwork, int* ifail, int& info)
+ float* work, int* iwork, int* ifail, int& info)
       {
         LAPACK_SSBEVX (
           &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq,
@@ -79,14 +79,14 @@
           work, iwork, ifail, &info);
       }
 
- inline
+ inline
       void hbevx (
         char const jobz, char const range, char const uplo, int const n, int const kd,
         double* ab, int const ldab, double* q, int const ldq,
         double const vl, double const vu, int const il, int const iu,
         double const abstol, int& m,
         double* w, double* z, int const ldz,
- double* work, int* iwork, int* ifail, int& info)
+ double* work, int* iwork, int* ifail, int& info)
       {
         LAPACK_DSBEVX (
           &jobz, &range, &uplo, &n, &kd, ab, &ldab, q, &ldq,
@@ -95,14 +95,14 @@
           work, iwork, ifail, &info);
       }
 
- inline
+ inline
       void hbevx (
         char const jobz, char const range, char const uplo, int const n, int const kd,
         traits::complex_f* ab, int const ldab, traits::complex_f* q, int const ldq,
         float const vl, float const vu, int const il, int const iu,
         float const abstol, int& m,
         float* w, traits::complex_f* z, int const ldz,
- traits::complex_f* work, float* rwork, int* iwork, int* ifail, int& info)
+ traits::complex_f* work, float* rwork, int* iwork, int* ifail, int& info)
       {
         LAPACK_CHBEVX (
           &jobz, &range, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
@@ -112,14 +112,14 @@
           traits::complex_ptr(work), rwork, iwork, ifail, &info);
       }
 
- inline
+ inline
       void hbevx (
         char const jobz, char const range, char const uplo, int const n, int const kd,
         traits::complex_d* ab, int const ldab, traits::complex_d* q, int const ldq,
         double const vl, double const vu, int const il, int const iu,
         double const abstol, int& m,
         double* w, traits::complex_d* z, int const ldz,
- traits::complex_d* work, double* rwork, int* iwork, int* ifail, int& info)
+ traits::complex_d* work, double* rwork, int* iwork, int* ifail, int& info)
       {
         LAPACK_ZHBEVX (
           &jobz, &range, &uplo, &n, &kd, traits::complex_ptr(ab), &ldab,
@@ -128,7 +128,7 @@
           w, traits::complex_ptr(z), &ldz,
           traits::complex_ptr(work), rwork, iwork, ifail, &info);
       }
- }
+ }
 
 
     namespace detail {
@@ -259,28 +259,28 @@
     template <typename AB, typename Q, typename R, typename Z, typename W, typename IFail, typename Work>
     int hbevx( char const jobz, char const range, AB& ab, Q& q, R vl, R vu, int il, int iu, R abstol, int& m,
       W& w, Z& z, IFail& ifail, Work work ) {
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<AB>::matrix_structure,
+ typename traits::matrix_traits<AB>::matrix_structure,
         traits::hermitian_t
- >::value));
-#endif
+ >::value));
+#endif
 
       typedef typename AB::value_type value_type ;
 
       int const n = traits::matrix_size2 (ab);
- assert (n == traits::matrix_size1 (z));
+ assert (n == traits::matrix_size1 (z));
       assert (n == traits::vector_size (w));
       assert (n == traits::vector_size (ifail));
       assert ( jobz=='N' || jobz=='V' );
 
- int info ;
+ int info ;
       detail::Hbevx< n_workspace_args<value_type>::value >() (jobz, range,
         traits::matrix_uplo_tag( ab ), n,
         traits::matrix_upper_bandwidth(ab),
- traits::matrix_storage (ab),
+ traits::matrix_storage (ab),
         traits::leading_dimension (ab),
- traits::matrix_storage (q),
+ traits::matrix_storage (q),
         traits::leading_dimension (q),
         vl, vu, il, iu, abstol, m,
         traits::vector_storage (w),

Modified: sandbox/boost/numeric/bindings/lapack/heev.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/heev.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/heev.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,23 +21,23 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Eigendecomposition of a complex Hermitian matrix A = Q * D * Q'
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * heev() computes the eigendecomposition of a N x N matrix
      * A = Q * D * Q', where Q is a N x N unitary matrix and
      * D is a diagonal matrix. The diagonal element D(i,i) is an
@@ -52,63 +52,63 @@
      * 'N' : do not compute eigenvectors
      * uplo : 'U' : only the upper triangular part of A is used on input.
      * 'L' : only the lower triangular part of A is used on input.
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void heev (char const jobz, char const uplo, int const n,
- traits::complex_f* a, int const lda,
+ traits::complex_f* a, int const lda,
                  float* w, traits::complex_f* work, int const lwork,
- float* rwork, int& info)
+ float* rwork, int& info)
       {
         LAPACK_CHEEV (&jobz, &uplo, &n,
- traits::complex_ptr(a), &lda, w,
- traits::complex_ptr(work), &lwork,
- rwork, &info);
+ traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork,
+ rwork, &info);
       }
 
- inline
+ inline
       void heev (char const jobz, char const uplo, int const n,
- traits::complex_d* a, int const lda,
+ traits::complex_d* a, int const lda,
                  double* w, traits::complex_d* work, int const lwork,
- double* rwork, int& info)
+ double* rwork, int& info)
       {
         LAPACK_ZHEEV (&jobz, &uplo, &n,
- traits::complex_ptr(a), &lda, w,
- traits::complex_ptr(work), &lwork,
- rwork, &info);
+ traits::complex_ptr(a), &lda, w,
+ traits::complex_ptr(work), &lwork,
+ rwork, &info);
       }
 
 
       template <typename A, typename W, typename Work, typename RWork>
       int heev (char jobz, char uplo, A& a, W& w, Work& work, RWork& rwork) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
           traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
         int const n = traits::matrix_size1 (a);
- assert (traits::matrix_size2 (a)==n);
- assert (traits::vector_size (w)==n);
- assert (2*n-1 <= traits::vector_size (work));
- assert (3*n-2 <= traits::vector_size (rwork));
+ assert (traits::matrix_size2 (a)==n);
+ assert (traits::vector_size (w)==n);
+ assert (2*n-1 <= traits::vector_size (work));
+ assert (3*n-2 <= traits::vector_size (rwork));
         assert ( uplo=='U' || uplo=='L' );
         assert ( jobz=='N' || jobz=='V' );
 
- int info;
+ int info;
         detail::heev (jobz, uplo, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (w),
+ traits::vector_storage (w),
                      traits::vector_storage (work),
                      traits::vector_size (work),
                      traits::vector_storage (rwork),
                      info);
- return info;
+ return info;
       }
     } // namespace detail
 
@@ -156,4 +156,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/heevd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/heevd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/heevd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  * Copyright Thomas Klimpel 2008
  *
@@ -250,7 +250,7 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
         traits::general_t
>::value));
 #endif
@@ -261,7 +261,7 @@
       assert ( uplo=='U' || uplo=='L' );
       assert ( jobz=='N' || jobz=='V' );
 
- int info;
+ int info;
       detail::Heevd< n_workspace_args<typename A::value_type>::value >() (
         jobz, uplo, n,
         traits::matrix_storage (a),

Modified: sandbox/boost/numeric/bindings/lapack/heevx.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/heevx.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/heevx.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  * Copyright Thomas Klimpel 2008
  *
@@ -283,7 +283,7 @@
       typedef typename A::value_type value_type ;
       typedef typename traits::type_traits< value_type >::real_type real_type ;
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
         traits::hermitian_t
>::value || (boost::is_same<
         typename traits::matrix_traits<A>::matrix_structure,
@@ -300,7 +300,7 @@
       assert ( uplo=='U' || uplo=='L' );
       assert ( jobz=='N' || jobz=='V' );
 
- int info;
+ int info;
       detail::Heevx< n_workspace_args<typename A::value_type>::value >() (
         jobz, range, uplo, n,
         traits::matrix_storage (a),

Modified: sandbox/boost/numeric/bindings/lapack/hegv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hegv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hegv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -15,25 +15,25 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 #include <cassert>
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // hegv
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * hegv() computes all the eigenvalues, and optionally, the eigenvectors
      * of a real generalized symmetric-definite eigenproblem, of the form
      * A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
@@ -117,38 +117,38 @@
      * The factorization of B could not be completed and
      * no eigenvalues or eigenvectors were computed.
      *
- */
+ */
 
     namespace detail {
 
- inline
- void hegv (int const itype, char const jobz, char const uplo, int const n,
- float *a, int const lda, float *b, int const ldb,
+ inline
+ void hegv (int const itype, char const jobz, char const uplo, int const n,
+ float *a, int const lda, float *b, int const ldb,
                  float *w, float *work, int const lwork, int& info)
       {
         LAPACK_SSYGV (&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, &info);
       }
 
- inline
- void hegv (int const itype, char const jobz, char const uplo, int const n,
- double *a, int const lda, double *b, int const ldb,
+ inline
+ void hegv (int const itype, char const jobz, char const uplo, int const n,
+ double *a, int const lda, double *b, int const ldb,
                  double *w, double *work, int const lwork, int& info)
       {
         LAPACK_DSYGV (&itype, &jobz, &uplo, &n, a, &lda, b, &ldb, w, work, &lwork, &info);
       }
 
- inline
- void hegv (int const itype, char const jobz, char const uplo, int const n,
- traits::complex_f *a, int const lda, traits::complex_f *b, int const ldb,
+ inline
+ void hegv (int const itype, char const jobz, char const uplo, int const n,
+ traits::complex_f *a, int const lda, traits::complex_f *b, int const ldb,
                  float *w, traits::complex_f *work, int const lwork, float *rwork, int& info)
       {
         LAPACK_CHEGV (&itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
           traits::complex_ptr(b), &ldb, w, traits::complex_ptr(work), &lwork, rwork, &info);
       }
 
- inline
- void hegv (int const itype, char const jobz, char const uplo, int const n,
- traits::complex_d *a, int const lda, traits::complex_d *b, int const ldb,
+ inline
+ void hegv (int const itype, char const jobz, char const uplo, int const n,
+ traits::complex_d *a, int const lda, traits::complex_d *b, int const ldb,
                  double *w, traits::complex_d *work, int const lwork, double *rwork, int& info)
       {
         LAPACK_ZHEGV (&itype, &jobz, &uplo, &n, traits::complex_ptr(a), &lda,
@@ -167,8 +167,8 @@
         // Function that allocates work arrays
         template <typename T, typename R>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, optimal_workspace, int& info ) {
 
            traits::detail::array<T> work( std::max<int>(1,34*n) );
@@ -179,8 +179,8 @@
         // Function that allocates work arrays
         template <typename T, typename R>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, minimal_workspace, int& info ) {
 
            traits::detail::array<T> work( std::max<int>(1,3*n-1) );
@@ -191,8 +191,8 @@
         // Function that uses given workarrays
         template <typename T, typename R, typename W>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, detail::workspace1<W> work, int& info ) {
 
            assert (traits::vector_size (work.w_) >= 3*n-1);
@@ -208,8 +208,8 @@
         // Function that allocates work arrays
         template <typename T, typename R>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, optimal_workspace, int& info ) {
 
            traits::detail::array<T> work( std::max<int>(1,34*n) );
@@ -222,8 +222,8 @@
         // Function that allocates work arrays
         template <typename T, typename R>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, minimal_workspace, int& info ) {
 
            traits::detail::array<T> work( std::max<int>(1,2*n-1) );
@@ -236,8 +236,8 @@
         // Function that uses given workarrays
         template <typename T, typename R, typename WC, typename WR>
         void operator() (
- int const itype, char const jobz, char const uplo, int const n,
- T *a, int const lda, T *b, int const ldb,
+ int const itype, char const jobz, char const uplo, int const n,
+ T *a, int const lda, T *b, int const ldb,
                  R *w, detail::workspace2<WC,WR> work, int& info ) {
 
            assert (traits::vector_size (work.w_) >= 2*n-1);
@@ -252,23 +252,23 @@
     template <typename A, typename B, typename W, typename Work>
     int hegv (int itype, char jobz, char uplo, A& a, B& b, W& w, Work work = optimal_workspace()) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
       assert ( n>0 );
- assert (traits::matrix_size2 (a)==n);
- assert (traits::leading_dimension (a)>=n);
- assert (traits::vector_size (w)==n);
+ assert (traits::matrix_size2 (a)==n);
+ assert (traits::leading_dimension (a)>=n);
+ assert (traits::vector_size (w)==n);
 
       int const nb = traits::matrix_size1 (b);
       assert ( nb>0 );
- assert (traits::matrix_size2 (b)==nb);
- assert (traits::leading_dimension (b)>=nb);
+ assert (traits::matrix_size2 (b)==nb);
+ assert (traits::leading_dimension (b)>=nb);
       assert ( n== nb);
 
       assert ( uplo=='U' || uplo=='L' );
@@ -280,14 +280,14 @@
       int info;
       detail::Hegv< n_workspace_args<typename A::value_type>::value >() (
                    itype, jobz, uplo, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                    traits::leading_dimension (a),
- traits::matrix_storage (b),
+ traits::matrix_storage (b),
                    traits::leading_dimension (b),
- traits::vector_storage (w),
+ traits::vector_storage (w),
                    work,
                    info);
- return info;
+ return info;
     }
   }
 

Modified: sandbox/boost/numeric/bindings/lapack/hesv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hesv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hesv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,15 +20,15 @@
 #include <boost/numeric/bindings/lapack/ilaenv.hpp>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -41,19 +41,19 @@
 
     namespace detail {
 
- inline
- int hetrf_block (traits::complex_f,
- int const ispec, char const ul, int const n)
+ inline
+ int hetrf_block (traits::complex_f,
+ int const ispec, char const ul, int const n)
       {
- char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "CHETRF", ul2, n);
+ char ul2[2] = "x"; ul2[0] = ul;
+ return ilaenv (ispec, "CHETRF", ul2, n);
       }
- inline
- int hetrf_block (traits::complex_d,
- int const ispec, char const ul, int const n)
+ inline
+ int hetrf_block (traits::complex_d,
+ int const ispec, char const ul, int const n)
       {
- char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "ZHETRF", ul2, n);
+ char ul2[2] = "x"; ul2[0] = ul;
+ return ilaenv (ispec, "ZHETRF", ul2, n);
       }
 
     }
@@ -64,23 +64,23 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
- assert (ul == 'U' || ul == 'L');
+ assert (q == 'O' || q == 'M');
+ assert (ul == 'U' || ul == 'L');
 
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- int ispec = (q == 'O' ? 1 : 2);
- return detail::hetrf_block (val_t(), ispec, ul, n);
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ int ispec = (q == 'O' ? 1 : 2);
+ return detail::hetrf_block (val_t(), ispec, ul, n);
     }
 
     template <typename HermA>
@@ -88,23 +88,23 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
+ assert (q == 'O' || q == 'M');
 
       char ul = traits::matrix_uplo_tag (a);
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- int ispec = (q == 'O' ? 1 : 2);
- return detail::hetrf_block (val_t(), ispec, ul, n);
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ int ispec = (q == 'O' ? 1 : 2);
+ return detail::hetrf_block (val_t(), ispec, ul, n);
     }
 
     template <typename HermA>
@@ -112,27 +112,27 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
- assert (ul == 'U' || ul == 'L');
+ assert (q == 'O' || q == 'M');
+ assert (ul == 'U' || ul == 'L');
 
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- int lw = -13;
- if (q == 'M')
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ int lw = -13;
+ if (q == 'M')
         lw = 1;
- if (q == 'O')
- lw = n * detail::hetrf_block (val_t(), 1, ul, n);
- return lw;
+ if (q == 'O')
+ lw = n * detail::hetrf_block (val_t(), 1, ul, n);
+ return lw;
     }
 
     template <typename HermA>
@@ -140,34 +140,34 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
+ assert (q == 'O' || q == 'M');
 
       char ul = traits::matrix_uplo_tag (a);
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- int lw = -13;
- if (q == 'M')
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ int lw = -13;
+ if (q == 'M')
         lw = 1;
- if (q == 'O')
- lw = n * detail::hetrf_block (val_t(), 1, ul, n);
- return lw;
+ if (q == 'O')
+ lw = n * detail::hetrf_block (val_t(), 1, ul, n);
+ return lw;
     }
 
 
     template <typename HermA>
     inline
     int hesv_work (char const q, char const ul, HermA const& a) {
- return hetrf_work (q, ul, a);
+ return hetrf_work (q, ul, a);
     }
 
     template <typename HermA>
@@ -176,42 +176,42 @@
 
 
     /*
- * hesv() computes the solution to a system of linear equations
- * A * X = B, where A is an N-by-N Hermitian matrix and X and B
+ * hesv() computes the solution to a system of linear equations
+ * A * X = B, where A is an N-by-N Hermitian matrix and X and B
      * are N-by-NRHS matrices.
      *
      * The diagonal pivoting method is used to factor A as
- * A = U * D * U^H, if UPLO = 'U',
+ * A = U * D * U^H, if UPLO = 'U',
      * A = L * D * L^H, if UPLO = 'L',
- * where U (or L) is a product of permutation and unit upper
- * (lower) triangular matrices, and D is Hermitian and block
- * diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored
+ * where U (or L) is a product of permutation and unit upper
+ * (lower) triangular matrices, and D is Hermitian and block
+ * diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored
      * form of A is then used to solve the system of equations A * X = B.
      */
 
     namespace detail {
 
- inline
+ inline
       void hesv (char const uplo, int const n, int const nrhs,
- traits::complex_f* a, int const lda, int* ipiv,
- traits::complex_f* b, int const ldb,
- traits::complex_f* w, int const lw, int* info)
+ traits::complex_f* a, int const lda, int* ipiv,
+ traits::complex_f* b, int const ldb,
+ traits::complex_f* w, int const lw, int* info)
       {
- LAPACK_CHESV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
- traits::complex_ptr (b), &ldb,
+ LAPACK_CHESV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
+ traits::complex_ptr (b), &ldb,
                       traits::complex_ptr (w), &lw, info);
       }
 
- inline
+ inline
       void hesv (char const uplo, int const n, int const nrhs,
- traits::complex_d* a, int const lda, int* ipiv,
- traits::complex_d* b, int const ldb,
- traits::complex_d* w, int const lw, int* info)
+ traits::complex_d* a, int const lda, int* ipiv,
+ traits::complex_d* b, int const ldb,
+ traits::complex_d* w, int const lw, int* info)
       {
- LAPACK_ZHESV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
- traits::complex_ptr (b), &ldb,
+ LAPACK_ZHESV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
+ traits::complex_ptr (b), &ldb,
                       traits::complex_ptr (w), &lw, info);
       }
 
@@ -219,21 +219,21 @@
       int hesv (char const ul, HermA& a, IVec& i, MatrB& b, Work& w) {
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
-
- int info;
- hesv (ul, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
+
+ int info;
+ hesv (ul, n, traits::matrix_size2 (b),
+ traits::matrix_storage (a),
               traits::leading_dimension (a),
- traits::vector_storage (i),
+ traits::vector_storage (i),
               traits::matrix_storage (b),
               traits::leading_dimension (b),
- traits::vector_storage (w),
- traits::vector_size (w),
+ traits::vector_storage (w),
+ traits::vector_size (w),
               &info);
- return info;
+ return info;
       }
 
     }
@@ -241,22 +241,22 @@
     template <typename HermA, typename MatrB, typename IVec, typename Work>
     int hesv (char const ul, HermA& a, IVec& i, MatrB& b, Work& w) {
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const lw = traits::vector_size (w);
- assert (lw >= 1);
- return detail::hesv (ul, a, i, b, w);
+ int const lw = traits::vector_size (w);
+ assert (lw >= 1);
+ return detail::hesv (ul, a, i, b, w);
     }
 
     template <typename HermA, typename MatrB, typename IVec, typename Work>
@@ -264,125 +264,125 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const lw = traits::vector_size (w);
- assert (lw >= 1);
+ int const lw = traits::vector_size (w);
+ assert (lw >= 1);
       char uplo = traits::matrix_uplo_tag (a);
- return detail::hesv (uplo, a, i, b, w);
+ return detail::hesv (uplo, a, i, b, w);
     }
 
     template <typename HermA, typename MatrB>
     int hesv (char const ul, HermA& a, MatrB& b) {
- // with 'internal' pivot and work vectors
+ // with 'internal' pivot and work vectors
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const n = traits::matrix_size1 (a);
- int info = -101;
- traits::detail::array<int> i (n);
+ int const n = traits::matrix_size1 (a);
+ int info = -101;
+ traits::detail::array<int> i (n);
 
       if (i.valid()) {
- info = -102;
- int lw = hetrf_work ('O', ul, a);
- assert (lw >= 1); // paranoia ?
+ info = -102;
+ int lw = hetrf_work ('O', ul, a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::hesv (ul, a, i, b, w);
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::hesv (ul, a, i, b, w);
       }
- return info;
+ return info;
     }
 
     template <typename HermA, typename MatrB>
     int hesv (HermA& a, MatrB& b) {
- // with 'internal' pivot and work vectors
+ // with 'internal' pivot and work vectors
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const n = traits::matrix_size1 (a);
+ int const n = traits::matrix_size1 (a);
       char uplo = traits::matrix_uplo_tag (a);
- int info = -101;
- traits::detail::array<int> i (n);
+ int info = -101;
+ traits::detail::array<int> i (n);
 
       if (i.valid()) {
- info = -102;
- int lw = hetrf_work ('O', a);
- assert (lw >= 1); // paranoia ?
+ info = -102;
+ int lw = hetrf_work ('O', a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- w.resize (lw);
- if (w.valid())
- info = detail::hesv (uplo, a, i, b, w);
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ w.resize (lw);
+ if (w.valid())
+ info = detail::hesv (uplo, a, i, b, w);
       }
- return info;
+ return info;
     }
 
 
     /*
      * hetrf() computes the factorization of a Hermitian matrix A using
- * the Bunch-Kaufman diagonal pivoting method. The form of the
+ * the Bunch-Kaufman diagonal pivoting method. The form of the
      * factorization is
      * A = U * D * U^H or A = L * D * L^H
- * where U (or L) is a product of permutation and unit upper (lower)
- * triangular matrices, and D is Hermitian and block diagonal with
+ * where U (or L) is a product of permutation and unit upper (lower)
+ * triangular matrices, and D is Hermitian and block diagonal with
      * 1-by-1 and 2-by-2 diagonal blocks.
      */
 
     namespace detail {
 
- inline
- void hetrf (char const uplo, int const n,
- traits::complex_f* a, int const lda, int* ipiv,
- traits::complex_f* w, int const lw, int* info)
+ inline
+ void hetrf (char const uplo, int const n,
+ traits::complex_f* a, int const lda, int* ipiv,
+ traits::complex_f* w, int const lw, int* info)
       {
- LAPACK_CHETRF (&uplo, &n,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CHETRF (&uplo, &n,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (w), &lw, info);
       }
 
- inline
- void hetrf (char const uplo, int const n,
- traits::complex_d* a, int const lda, int* ipiv,
- traits::complex_d* w, int const lw, int* info)
+ inline
+ void hetrf (char const uplo, int const n,
+ traits::complex_d* a, int const lda, int* ipiv,
+ traits::complex_d* w, int const lw, int* info)
       {
- LAPACK_ZHETRF (&uplo, &n,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZHETRF (&uplo, &n,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (w), &lw, info);
       }
 
@@ -390,17 +390,17 @@
       int hetrf (char const ul, HermA& a, IVec& i, Work& w) {
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::vector_size (i));
 
- int info;
- hetrf (ul, n, traits::matrix_storage (a),
+ int info;
+ hetrf (ul, n, traits::matrix_storage (a),
                traits::leading_dimension (a),
- traits::vector_storage (i),
- traits::vector_storage (w),
- traits::vector_size (w),
+ traits::vector_storage (i),
+ traits::vector_storage (w),
+ traits::vector_size (w),
                &info);
- return info;
+ return info;
       }
 
     }
@@ -408,18 +408,18 @@
     template <typename HermA, typename IVec, typename Work>
     int hetrf (char const ul, HermA& a, IVec& i, Work& w) {
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const lw = traits::vector_size (w);
- assert (lw >= 1);
- return detail::hetrf (ul, a, i, w);
+ int const lw = traits::vector_size (w);
+ assert (lw >= 1);
+ return detail::hetrf (ul, a, i, w);
     }
 
     template <typename HermA, typename IVec, typename Work>
@@ -427,99 +427,99 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
 #endif
 
- int const lw = traits::vector_size (w);
- assert (lw >= 1);
+ int const lw = traits::vector_size (w);
+ assert (lw >= 1);
       char uplo = traits::matrix_uplo_tag (a);
- return detail::hetrf (uplo, a, i, w);
+ return detail::hetrf (uplo, a, i, w);
     }
 
     template <typename HermA, typename Ivec>
     int hetrf (char const ul, HermA& a, Ivec& i) {
       // with 'internal' work vector
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int info = -101;
- int lw = hetrf_work ('O', ul, a);
- assert (lw >= 1); // paranoia ?
+ int info = -101;
+ int lw = hetrf_work ('O', ul, a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::hetrf (ul, a, i, w);
- return info;
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::hetrf (ul, a, i, w);
+ return info;
     }
 
     template <typename HermA, typename Ivec>
     int hetrf (HermA& a, Ivec& i) {
- // with 'internal' work vector
+ // with 'internal' work vector
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- int info = -101;
- int lw = hetrf_work ('O', a);
- assert (lw >= 1); // paranoia ?
+ int info = -101;
+ int lw = hetrf_work ('O', a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<HermA>::value_type val_t;
-#else
- typedef typename HermA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::hetrf (uplo, a, i, w);
- return info;
+ typedef typename traits::matrix_traits<HermA>::value_type val_t;
+#else
+ typedef typename HermA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::hetrf (uplo, a, i, w);
+ return info;
     }
 
 
     /*
- * hetrs() solves a system of linear equations A*X = B with
- * a Hermitian matrix A using the factorization
+ * hetrs() solves a system of linear equations A*X = B with
+ * a Hermitian matrix A using the factorization
      * A = U * D * U^H or A = L * D * L^H
      * computed by hetrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void hetrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* a, int const lda,
- int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* a, int const lda,
+ int const* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CHETRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CHETRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void hetrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* a, int const lda,
- int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* a, int const lda,
+ int const* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZHETRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZHETRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -527,26 +527,26 @@
       int hetrs (char const ul, HermA const& a, IVec const& i, MatrB& b) {
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
 
- int info;
- hetrs (ul, n, traits::matrix_size2 (b),
+ int info;
+ hetrs (ul, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
-#endif
+ traits::matrix_storage_const (a),
+#endif
                traits::leading_dimension (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (i),
+ traits::vector_storage (i),
 #else
- traits::vector_storage_const (i),
+ traits::vector_storage_const (i),
 #endif
                traits::matrix_storage (b),
                traits::leading_dimension (b), &info);
- return info;
+ return info;
       }
 
     }
@@ -555,20 +555,20 @@
     inline
     int hetrs (char const ul, HermA const& a, IVec const& i, MatrB& b) {
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- return detail::hetrs (ul, a, i, b);
+ return detail::hetrs (ul, a, i, b);
     }
 
     template <typename HermA, typename MatrB, typename IVec>
@@ -577,17 +577,17 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- return detail::hetrs (uplo, a, i, b);
+ return detail::hetrs (uplo, a, i, b);
     }
 
 
@@ -597,4 +597,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/hpsv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hpsv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hpsv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -19,57 +19,57 @@
 #include <boost/numeric/bindings/lapack/lapack.h>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     /////////////////////////////////////////////////////////////////////
     //
     // system of linear equations A * X = B
- // with A Hermitian indefinite matrix stored in packed format
+ // with A Hermitian indefinite matrix stored in packed format
     //
     /////////////////////////////////////////////////////////////////////
 
     /*
- * hpsv() computes the solution to a system of linear equations
+ * hpsv() computes the solution to a system of linear equations
      * A * X = B, where A is an N-by-N Hermitian matrix in packed
      * storage and X and B are N-by-NRHS matrices.
      *
      * The diagonal pivoting method is used to factor A as
- * A = U * D * U^H, if UPLO = 'U',
+ * A = U * D * U^H, if UPLO = 'U',
      * A = L * D * L^H, if UPLO = 'L',
- * where U (or L) is a product of permutation and unit upper
- * (lower) triangular matrices, and D is Hermitian and block
- * diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored
+ * where U (or L) is a product of permutation and unit upper
+ * (lower) triangular matrices, and D is Hermitian and block
+ * diagonal with 1-by-1 and 2-by-2 diagonal blocks. The factored
      * form of A is then used to solve the system of equations A * X = B.
      */
 
     namespace detail {
 
- inline
+ inline
       void hpsv (char const uplo, int const n, int const nrhs,
- traits::complex_f* ap, int* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* ap, int* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CHPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_CHPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void hpsv (char const uplo, int const n, int const nrhs,
- traits::complex_d* ap, int* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d* ap, int* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZHPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_ZHPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
@@ -78,74 +78,74 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
           traits::hermitian_packed_t
>::value));
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
           traits::general_t
>::value));
 #endif
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
 
         char uplo = traits::matrix_uplo_tag (a);
         int info;
- hpsv (uplo, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
- traits::vector_storage (i),
+ hpsv (uplo, n, traits::matrix_size2 (b),
+ traits::matrix_storage (a),
+ traits::vector_storage (i),
               traits::matrix_storage (b),
               traits::leading_dimension (b),
               &info);
- return info;
+ return info;
       }
 
     }
 
- template <typename HermA, typename MatrB, typename IVec>
+ template <typename HermA, typename MatrB, typename IVec>
     inline
     int hpsv (HermA& a, IVec& i, MatrB& b) {
- assert (traits::matrix_size1 (a) == traits::vector_size (i));
- return detail::hpsv (a, i, b);
+ assert (traits::matrix_size1 (a) == traits::vector_size (i));
+ return detail::hpsv (a, i, b);
     }
 
     template <typename HermA, typename MatrB>
     int hpsv (HermA& a, MatrB& b) {
       // with 'internal' pivot vector
 
- int info = -101;
- traits::detail::array<int> i (traits::matrix_size1 (a));
+ int info = -101;
+ traits::detail::array<int> i (traits::matrix_size1 (a));
 
- if (i.valid())
- info = detail::hpsv (a, i, b);
- return info;
+ if (i.valid())
+ info = detail::hpsv (a, i, b);
+ return info;
     }
 
 
     /*
- * hptrf() computes the factorization of a Hermitian matrix A
- * in packed storage using the Bunch-Kaufman diagonal pivoting
+ * hptrf() computes the factorization of a Hermitian matrix A
+ * in packed storage using the Bunch-Kaufman diagonal pivoting
      * method. The form of the factorization is
      * A = U * D * U^H or A = L * D * L^H
- * where U (or L) is a product of permutation and unit upper (lower)
- * triangular matrices, and D is Hermitian and block diagonal with
+ * where U (or L) is a product of permutation and unit upper (lower)
+ * triangular matrices, and D is Hermitian and block diagonal with
      * 1-by-1 and 2-by-2 diagonal blocks.
      */
 
     namespace detail {
 
- inline
- void hptrf (char const uplo, int const n,
- traits::complex_f* ap, int* ipiv, int* info)
+ inline
+ void hptrf (char const uplo, int const n,
+ traits::complex_f* ap, int* ipiv, int* info)
       {
         LAPACK_CHPTRF (&uplo, &n, traits::complex_ptr (ap), ipiv, info);
       }
 
- inline
- void hptrf (char const uplo, int const n,
- traits::complex_d* ap, int* ipiv, int* info)
+ inline
+ void hptrf (char const uplo, int const n,
+ traits::complex_d* ap, int* ipiv, int* info)
       {
         LAPACK_ZHPTRF (&uplo, &n, traits::complex_ptr (ap), ipiv, info);
       }
@@ -158,54 +158,54 @@
 
     }
 
- template <typename HermA, typename IVec>
+ template <typename HermA, typename IVec>
     int hptrf (HermA& a, IVec& i) {
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_packed_t
>::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::vector_size (i));
 
       char uplo = traits::matrix_uplo_tag (a);
- int info;
- detail::hptrf (uplo, n, traits::matrix_storage (a),
+ int info;
+ detail::hptrf (uplo, n, traits::matrix_storage (a),
                      traits::vector_storage (i), &info);
- return info;
+ return info;
     }
 
 
     /*
- * hptrs() solves a system of linear equations A*X = B with
- * a Hermitian matrix A in packed storage using the factorization
+ * hptrs() solves a system of linear equations A*X = B with
+ * a Hermitian matrix A in packed storage using the factorization
      * A = U * D * U^H or A = L * D * L^H
      * computed by hptrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void hptrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* ap, int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* ap, int const* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CHPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_CHPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void hptrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* ap, int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* ap, int const* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZHPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_ZHPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -216,34 +216,34 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<HermA>::matrix_structure,
+ typename traits::matrix_traits<HermA>::matrix_structure,
         traits::hermitian_packed_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
 
       char uplo = traits::matrix_uplo_tag (a);
- int info;
- detail::hptrs (uplo, n, traits::matrix_size2 (b),
+ int info;
+ detail::hptrs (uplo, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
- traits::vector_storage (i),
+ traits::matrix_storage (a),
+ traits::vector_storage (i),
 #else
- traits::matrix_storage_const (a),
- traits::vector_storage_const (i),
-#endif
+ traits::matrix_storage_const (a),
+ traits::vector_storage_const (i),
+#endif
                      traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -253,4 +253,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/hseqr.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/hseqr.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/hseqr.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright Jeremy Conlin 2008
  *
  * Distributed under the Boost Software License, Version 1.0.
@@ -20,23 +20,23 @@
 #include <boost/numeric/bindings/lapack/workspace.hpp>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Compute eigenvalues of an Hessenberg matrix, H.
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * hseqr() computes the eigenvalues of a Hessenberg matrix H
      * and, optionally, the matrices T and Z from the Schur decomposition
      * H = Z U Z**T, where U is an upper quasi-triangular matrix (the
@@ -46,7 +46,7 @@
      * matrix Q so that this routine can give the Schur factorization
      * of a matrix A which has been reduced to the Hessenberg form H
      * by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*U*(QZ)**T.
- *
+ *
      * There are two forms of the hseqr function:
      *
      * int hseqr( const char job, A& H, W& w)
@@ -67,18 +67,18 @@
      * of Schur vectors of H is returned;
      * = 'V': Z must contain an orthogonal matrix Q on entry, and
      * the product Q*Z is returned.
- *
- * H is the Hessenberg matrix whose eigenpairs you're interested
- * in. (input/output) On exit, if computation is successful and
+ *
+ * H is the Hessenberg matrix whose eigenpairs you're interested
+ * in. (input/output) On exit, if computation is successful and
      * job = 'S', then H contains the
      * upper quasi-triangular matrix U from the Schur decomposition
      * (the Schur form); 2-by-2 diagonal blocks (corresponding to
      * complex conjugate pairs of eigenvalues) are returned in
      * standard form, with H(i,i) = H(i+1,i+1) and
- * H(i+1,i)*H(i,i+1) < 0. If computation is successful and
- * job = 'E', the contents of H are unspecified on exit.
+ * H(i+1,i)*H(i,i+1) < 0. If computation is successful and
+ * job = 'E', the contents of H are unspecified on exit.
      *
- * w (output) contains the computed eigenvalues of H which is the diagonal
+ * w (output) contains the computed eigenvalues of H which is the diagonal
      * of U. Must be a complex object.
      *
      * Z. (input/output)
@@ -89,67 +89,67 @@
      * N-by-N matrix Q, which is assumed to be equal to the unit
      * matrix . On exit, if computation is successful, Z contains Q*Z.
      *
- */
+ */
 
     namespace detail {
         // float
         inline
- int hseqr_backend(const char* job, const char* compz, const int* n,
- const int ilo, const int ihi, float* H, const int ldH,
+ int hseqr_backend(const char* job, const char* compz, const int* n,
+ const int ilo, const int ihi, float* H, const int ldH,
                 float* wr, float* wi, float* Z, const int ldz, float* work,
                 const int* lwork){
             int info;
-// std::cout << "I'm inside lapack::detail::hseqr_backend for floats"
+// std::cout << "I'm inside lapack::detail::hseqr_backend for floats"
 // << std::endl;
- LAPACK_SHSEQR(job, compz, n, &ilo, &ihi, H, &ldH, wr, wi,
+ LAPACK_SHSEQR(job, compz, n, &ilo, &ihi, H, &ldH, wr, wi,
                     Z, &ldz, work, lwork, &info);
             return info;
         }
 
         // double
         inline
- int hseqr_backend(const char* job, const char* compz, const int* n,
- const int ilo, const int ihi, double* H, const int ldH,
+ int hseqr_backend(const char* job, const char* compz, const int* n,
+ const int ilo, const int ihi, double* H, const int ldH,
                 double* wr, double* wi, double* Z, const int ldz, double* work,
                 const int* lwork){
             int info;
-// std::cout << "I'm inside lapack::detail::hseqr_backend for doubles"
+// std::cout << "I'm inside lapack::detail::hseqr_backend for doubles"
 // << std::endl;
- LAPACK_DHSEQR(job, compz, n, &ilo, &ihi, H, &ldH, wr, wi,
+ LAPACK_DHSEQR(job, compz, n, &ilo, &ihi, H, &ldH, wr, wi,
                     Z, &ldz, work, lwork, &info);
             return info;
         }
 
         // complex<float>
         inline
- int hseqr_backend(const char* job, const char* compz, int* n,
- const int ilo, const int ihi, traits::complex_f* H, const int ldH,
- traits::complex_f* w, traits::complex_f* Z, int ldz,
+ int hseqr_backend(const char* job, const char* compz, int* n,
+ const int ilo, const int ihi, traits::complex_f* H, const int ldH,
+ traits::complex_f* w, traits::complex_f* Z, int ldz,
                 traits::complex_f* work, const int* lwork){
             int info;
-// std::cout << "I'm inside lapack::detail::hseqr_backend for complex<float>"
+// std::cout << "I'm inside lapack::detail::hseqr_backend for complex<float>"
 // << std::endl;
- LAPACK_CHSEQR(job, compz, n, &ilo, &ihi,
- traits::complex_ptr(H), &ldH,
- traits::complex_ptr(w),
- traits::complex_ptr(Z), &ldz,
+ LAPACK_CHSEQR(job, compz, n, &ilo, &ihi,
+ traits::complex_ptr(H), &ldH,
+ traits::complex_ptr(w),
+ traits::complex_ptr(Z), &ldz,
                     traits::complex_ptr(work), lwork, &info);
             return info;
         }
 
         // complex<double>
         inline
- int hseqr_backend(const char* job, const char* compz, int* n,
- const int ilo, const int ihi, traits::complex_d* H, const int ldH,
- traits::complex_d* w, traits::complex_d* Z, int ldz,
+ int hseqr_backend(const char* job, const char* compz, int* n,
+ const int ilo, const int ihi, traits::complex_d* H, const int ldH,
+ traits::complex_d* w, traits::complex_d* Z, int ldz,
                 traits::complex_d* work, const int* lwork){
             int info;
-// std::cout << "I'm inside lapack::detail::hseqr_backend for complex<double>"
+// std::cout << "I'm inside lapack::detail::hseqr_backend for complex<double>"
 // << std::endl;
- LAPACK_ZHSEQR(job, compz, n, &ilo, &ihi,
- traits::complex_ptr(H), &ldH,
- traits::complex_ptr(w),
- traits::complex_ptr(Z), &ldz,
+ LAPACK_ZHSEQR(job, compz, n, &ilo, &ihi,
+ traits::complex_ptr(H), &ldH,
+ traits::complex_ptr(w),
+ traits::complex_ptr(Z), &ldz,
                     traits::complex_ptr(work), lwork, &info);
             return info;
         }
@@ -172,7 +172,7 @@
                 int lwork = -1;
                 value_type work_temp;
                 int result = detail::hseqr_backend(&job, &compz, &n, 1, n,
- traits::matrix_storage(H),
+ traits::matrix_storage(H),
                                             traits::leading_dimension(H),
                                             wr.storage(), wi.storage(),
                                             traits::matrix_storage(Z),
@@ -184,7 +184,7 @@
                 lwork = (int) work_temp;
                 traits::detail::array<value_type> work(lwork);
                 result = detail::hseqr_backend(&job, &compz, &n, 1, n,
- traits::matrix_storage(H),
+ traits::matrix_storage(H),
                                             traits::leading_dimension(H),
                                             wr.storage(), wi.storage(),
                                             traits::matrix_storage(Z),
@@ -212,7 +212,7 @@
                 value_type work_temp;
                 int result = detail::hseqr_backend(&job, &compz, &n, 1, n,
                         traits::matrix_storage(H),
- traits::leading_dimension(H),
+ traits::leading_dimension(H),
                         traits::vector_storage(w),
                         traits::matrix_storage(Z), traits::leading_dimension(Z),
                         &work_temp, &lwork);
@@ -223,7 +223,7 @@
                 traits::detail::array<value_type> work(lwork);
                 result = detail::hseqr_backend(&job, &compz, &n, 1, n,
                         traits::matrix_storage(H),
- traits::leading_dimension(H),
+ traits::leading_dimension(H),
                         traits::vector_storage(w),
                         traits::matrix_storage(Z), traits::leading_dimension(Z),
                         work.storage(), &lwork);
@@ -231,7 +231,7 @@
                 return result;
             }
         };
-
+
         template < typename A, typename W, typename V>
         int hseqr( const char job, const char compz, A& H, W& w, V& Z ){
 // std::cout << "I'm inside lapack::detail::hseqr." << std::endl;
@@ -246,18 +246,18 @@
 
             return result;
         }
- } // namespace detail
+ } // namespace detail
 
     // Compute eigenvalues without the Schur vectors
     template < typename A, typename W>
     int hseqr( const char job, A& H, W& w){
       // input checking
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
- traits::general_t
- >::value));
-#endif
+ typename traits::matrix_traits<A>::matrix_structure,
+ traits::general_t
+ >::value));
+#endif
 
 #ifndef NDEBUG
         int const n = traits::matrix_size1(H);
@@ -267,7 +267,7 @@
         typedef typename W::value_type complex_value_type;
 
         assert(traits::matrix_size2(H) == n); // Square matrix
- assert(traits::vector_size(w) == n);
+ assert(traits::vector_size(w) == n);
 
         ublas::matrix<value_type, ublas::column_major> Z(1,1);
         return detail::hseqr( job, 'N', H, w, Z );
@@ -277,12 +277,12 @@
     template < typename A, typename W, typename Z>
     int hseqr( const char job, const char compz, A& H, W& w, Z& z){
       // input checking
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
- traits::general_t
- >::value));
-#endif
+ typename traits::matrix_traits<A>::matrix_structure,
+ traits::general_t
+ >::value));
+#endif
 
 #ifndef NDEBUG
         int const n = traits::matrix_size1(H);
@@ -290,7 +290,7 @@
 
         typedef typename A::value_type value_type;
         assert(traits::matrix_size2(H) == n); // Square matrix
- assert(traits::vector_size(w) == n);
+ assert(traits::vector_size(w) == n);
         assert(traits::matrix_size2(z) == n);
 
         return detail::hseqr( job, compz, H, w, z );

Modified: sandbox/boost/numeric/bindings/lapack/ilaenv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/ilaenv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/ilaenv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -14,20 +14,20 @@
 #ifndef BOOST_NUMERIC_BINDINGS_LAPACK_ILAENV_HPP
 #define BOOST_NUMERIC_BINDINGS_LAPACK_ILAENV_HPP
 
-#include <cstring>
+#include <cstring>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
 namespace boost { namespace numeric { namespace bindings { namespace lapack {
 
   /*
- * ilaenv() is called from the LAPACK routines to choose
- * problem-dependent parameters such as the block sizes
+ * ilaenv() is called from the LAPACK routines to choose
+ * problem-dependent parameters such as the block sizes
    * for the local environment.
    */
   
   inline
   int ilaenv (int const ispec, const char* name, const char* opts,
- int const n1 = -1, int const n2 = -1,
+ int const n1 = -1, int const n2 = -1,
               int const n3 = -1, int const n4 = -1)
   {
     return ::LAPACK_ILAENV (&ispec, name, opts, &n1, &n2, &n3, &n4,
@@ -38,4 +38,3 @@
 }}}}
 
 #endif
-

Modified: sandbox/boost/numeric/bindings/lapack/lapack.h
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/lapack.h (original)
+++ sandbox/boost/numeric/bindings/lapack/lapack.h 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -17,9 +17,9 @@
 #include <boost/numeric/bindings/traits/type.h>
 #include <boost/numeric/bindings/lapack/lapack_names.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # define BOOST_NUMERIC_BINDINGS_FORTRAN
-#endif
+#endif
 
 extern "C" {
 
@@ -29,22 +29,22 @@
 
   /* general */
 
- void LAPACK_SGESV (int const* n, int const* nrhs,
- float* a, int const* lda, int* ipiv,
+ void LAPACK_SGESV (int const* n, int const* nrhs,
+ float* a, int const* lda, int* ipiv,
                      float* b, int const* ldb, int* info);
- void LAPACK_DGESV (int const* n, int const* nrhs,
- double* a, int const* lda, int* ipiv,
+ void LAPACK_DGESV (int const* n, int const* nrhs,
+ double* a, int const* lda, int* ipiv,
                      double* b, int const* ldb, int* info);
   void LAPACK_CGESV (int const* n, int const* nrhs,
- fcomplex_t* a, int const* lda, int* ipiv,
+ fcomplex_t* a, int const* lda, int* ipiv,
                      fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZGESV (int const* n, int const* nrhs,
- dcomplex_t* a, int const* lda, int* ipiv,
+ dcomplex_t* a, int const* lda, int* ipiv,
                      dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SGETRF (int const* n, int const* nrhs,
+ void LAPACK_SGETRF (int const* n, int const* nrhs,
                       float* a, int const* lda, int* ipiv, int* info);
- void LAPACK_DGETRF (int const* n, int const* nrhs,
+ void LAPACK_DGETRF (int const* n, int const* nrhs,
                       double* a, int const* lda, int* ipiv, int* info);
   void LAPACK_CGETRF (int const* n, int const* nrhs,
                       fcomplex_t* a, int const* lda,
@@ -53,35 +53,35 @@
                       dcomplex_t* a, int const* lda,
                       int* ipiv, int* info);
 
- void LAPACK_SGETRS (char const* trans, int const* n, int const* nrhs,
- float const* a, int const* lda, int const* ipiv,
+ void LAPACK_SGETRS (char const* trans, int const* n, int const* nrhs,
+ float const* a, int const* lda, int const* ipiv,
                       float* b, int const* ldb, int* info);
- void LAPACK_DGETRS (char const* trans, int const* n, int const* nrhs,
- double const* a, int const* lda, int const* ipiv,
+ void LAPACK_DGETRS (char const* trans, int const* n, int const* nrhs,
+ double const* a, int const* lda, int const* ipiv,
                       double* b, int const* ldb, int* info);
   void LAPACK_CGETRS (char const* trans, int const* n, int const* nrhs,
- fcomplex_t const* a, int const* lda, int const* ipiv,
+ fcomplex_t const* a, int const* lda, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZGETRS (char const* trans, int const* n, int const* nrhs,
- dcomplex_t const* a, int const* lda, int const* ipiv,
+ dcomplex_t const* a, int const* lda, int const* ipiv,
                       dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SGETRI (int const* n, float* a, int const* lda, int const* ipiv,
- float* work, int const* lwork, int* info);
- void LAPACK_DGETRI (int const* n, double* a, int const* lda, int const* ipiv,
- double* work, int const* lwork, int* info);
- void LAPACK_CGETRI (int const* n, fcomplex_t* a, int const* lda, int const* ipiv,
- fcomplex_t* work, int const* lwork, int* info);
- void LAPACK_ZGETRI (int const* n, dcomplex_t* a, int const* lda, int const* ipiv,
- dcomplex_t* work, int const* lwork, int* info);
+ void LAPACK_SGETRI (int const* n, float* a, int const* lda, int const* ipiv,
+ float* work, int const* lwork, int* info);
+ void LAPACK_DGETRI (int const* n, double* a, int const* lda, int const* ipiv,
+ double* work, int const* lwork, int* info);
+ void LAPACK_CGETRI (int const* n, fcomplex_t* a, int const* lda, int const* ipiv,
+ fcomplex_t* work, int const* lwork, int* info);
+ void LAPACK_ZGETRI (int const* n, dcomplex_t* a, int const* lda, int const* ipiv,
+ dcomplex_t* work, int const* lwork, int* info);
 
   /* symmetric/Hermitian positive definite */
 
- void LAPACK_SPOSV (char const* uplo, int const* n, int const* nrhs,
- float* a, int const* lda,
+ void LAPACK_SPOSV (char const* uplo, int const* n, int const* nrhs,
+ float* a, int const* lda,
                      float* b, int const* ldb, int* info);
- void LAPACK_DPOSV (char const* uplo, int const* n, int const* nrhs,
- double* a, int const* lda,
+ void LAPACK_DPOSV (char const* uplo, int const* n, int const* nrhs,
+ double* a, int const* lda,
                      double* b, int const* ldb, int* info);
   void LAPACK_CPOSV (char const* uplo, int const* n, int const* nrhs,
                      fcomplex_t* a, int const* lda,
@@ -90,20 +90,20 @@
                      dcomplex_t* a, int const* lda,
                      dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SPOTRF (char const* uplo, int const* n,
+ void LAPACK_SPOTRF (char const* uplo, int const* n,
                       float* a, int const* lda, int* info);
- void LAPACK_DPOTRF (char const* uplo, int const* n,
+ void LAPACK_DPOTRF (char const* uplo, int const* n,
                       double* a, int const* lda, int* info);
- void LAPACK_CPOTRF (char const* uplo, int const* n,
+ void LAPACK_CPOTRF (char const* uplo, int const* n,
                       fcomplex_t* a, int const* lda, int* info);
- void LAPACK_ZPOTRF (char const* uplo, int const* n,
+ void LAPACK_ZPOTRF (char const* uplo, int const* n,
                       dcomplex_t* a, int const* lda, int* info);
 
- void LAPACK_SPOTRS (char const* uplo, int const* n, int const* nrhs,
- float const* a, int const* lda,
+ void LAPACK_SPOTRS (char const* uplo, int const* n, int const* nrhs,
+ float const* a, int const* lda,
                       float* b, int const* ldb, int* info);
- void LAPACK_DPOTRS (char const* uplo, int const* n, int const* nrhs,
- double const* a, int const* lda,
+ void LAPACK_DPOTRS (char const* uplo, int const* n, int const* nrhs,
+ double const* a, int const* lda,
                       double* b, int const* ldb, int* info);
   void LAPACK_CPOTRS (char const* uplo, int const* n, int const* nrhs,
                       fcomplex_t const* a, int const* lda,
@@ -115,9 +115,9 @@
 
   /* symmetric/Hermitian positive definite in packed storage */
 
- void LAPACK_SPPSV (char const* uplo, int const* n, int const* nrhs,
+ void LAPACK_SPPSV (char const* uplo, int const* n, int const* nrhs,
                      float* ap, float* b, int const* ldb, int* info);
- void LAPACK_DPPSV (char const* uplo, int const* n, int const* nrhs,
+ void LAPACK_DPPSV (char const* uplo, int const* n, int const* nrhs,
                      double* ap, double* b, int const* ldb, int* info);
   void LAPACK_CPPSV (char const* uplo, int const* n, int const* nrhs,
                      fcomplex_t* ap, fcomplex_t* b, int const* ldb, int* info);
@@ -126,27 +126,27 @@
 
   void LAPACK_SPPTRF (char const* uplo, int const* n, float* ap, int* info);
   void LAPACK_DPPTRF (char const* uplo, int const* n, double* ap, int* info);
- void LAPACK_CPPTRF (char const* uplo, int const* n,
+ void LAPACK_CPPTRF (char const* uplo, int const* n,
                       fcomplex_t* ap, int* info);
- void LAPACK_ZPPTRF (char const* uplo, int const* n,
+ void LAPACK_ZPPTRF (char const* uplo, int const* n,
                       dcomplex_t* ap, int* info);
 
- void LAPACK_SPPTRS (char const* uplo, int const* n, int const* nrhs,
+ void LAPACK_SPPTRS (char const* uplo, int const* n, int const* nrhs,
                       float const* ap, float* b, int const* ldb, int* info);
- void LAPACK_DPPTRS (char const* uplo, int const* n, int const* nrhs,
+ void LAPACK_DPPTRS (char const* uplo, int const* n, int const* nrhs,
                       double const* ap, double* b, int const* ldb, int* info);
   void LAPACK_CPPTRS (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t const* ap,
+ fcomplex_t const* ap,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZPPTRS (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t const* ap,
+ dcomplex_t const* ap,
                       dcomplex_t* b, int const* ldb, int* info);
 
   void LAPACK_SPPTRI (char const* uplo, int const* n, float* ap, int* info);
   void LAPACK_DPPTRI (char const* uplo, int const* n, double* ap, int* info);
- void LAPACK_CPPTRI (char const* uplo, int const* n,
+ void LAPACK_CPPTRI (char const* uplo, int const* n,
                       fcomplex_t* ap, int* info);
- void LAPACK_ZPPTRI (char const* uplo, int const* n,
+ void LAPACK_ZPPTRI (char const* uplo, int const* n,
                       dcomplex_t* ap, int* info);
 
   /* symmetric/Hermitian positive definite tridiagonal */
@@ -169,10 +169,10 @@
   void LAPACK_CPTTRF ( int const* n, float* d, fcomplex_t* e, int* info);
   void LAPACK_ZPTTRF ( int const* n, double* d, dcomplex_t* e, int* info);
 
- void LAPACK_SPTTRS ( int const* n, int const* nrhs,
+ void LAPACK_SPTTRS ( int const* n, int const* nrhs,
                       float const* d, float const* e,
                       float* b, int const* ldb, int* info);
- void LAPACK_DPTTRS ( int const* n, int const* nrhs,
+ void LAPACK_DPTTRS ( int const* n, int const* nrhs,
                       double const* d, double const* e,
                       double* b, int const* ldb, int* info);
   void LAPACK_CPTTRS (char const* uplo, int const* n, int const* nrhs,
@@ -186,80 +186,80 @@
 
   /* symmetric/Hermitian indefinite and complex symmetric */
 
- void LAPACK_SSYSV (char const* uplo, int const* n, int const* nrhs,
- float* a, int const* lda, int* ipiv,
- float* b, int const* ldb,
+ void LAPACK_SSYSV (char const* uplo, int const* n, int const* nrhs,
+ float* a, int const* lda, int* ipiv,
+ float* b, int const* ldb,
                      float* w, int const* lw, int* info);
- void LAPACK_DSYSV (char const* uplo, int const* n, int const* nrhs,
- double* a, int const* lda, int* ipiv,
- double* b, int const* ldb,
+ void LAPACK_DSYSV (char const* uplo, int const* n, int const* nrhs,
+ double* a, int const* lda, int* ipiv,
+ double* b, int const* ldb,
                      double* w, int const* lw, int* info);
   void LAPACK_CSYSV (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t* a, int const* lda, int* ipiv,
- fcomplex_t* b, int const* ldb,
+ fcomplex_t* a, int const* lda, int* ipiv,
+ fcomplex_t* b, int const* ldb,
                      fcomplex_t* w, int const* lw, int* info);
   void LAPACK_ZSYSV (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t* a, int const* lda, int* ipiv,
- dcomplex_t* b, int const* ldb,
+ dcomplex_t* a, int const* lda, int* ipiv,
+ dcomplex_t* b, int const* ldb,
                      dcomplex_t* w, int const* lw, int* info);
 
   void LAPACK_CHESV (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t* a, int const* lda, int* ipiv,
- fcomplex_t* b, int const* ldb,
+ fcomplex_t* a, int const* lda, int* ipiv,
+ fcomplex_t* b, int const* ldb,
                      fcomplex_t* w, int const* lw, int* info);
   void LAPACK_ZHESV (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t* a, int const* lda, int* ipiv,
- dcomplex_t* b, int const* ldb,
+ dcomplex_t* a, int const* lda, int* ipiv,
+ dcomplex_t* b, int const* ldb,
                      dcomplex_t* w, int const* lw, int* info);
 
- void LAPACK_SSYTRF (char const* uplo, int const* n,
- float* a, int const* lda, int* ipiv,
+ void LAPACK_SSYTRF (char const* uplo, int const* n,
+ float* a, int const* lda, int* ipiv,
                       float* w, int const* lw, int* info);
- void LAPACK_DSYTRF (char const* uplo, int const* n,
- double* a, int const* lda, int* ipiv,
+ void LAPACK_DSYTRF (char const* uplo, int const* n,
+ double* a, int const* lda, int* ipiv,
                       double* w, int const* lw, int* info);
- void LAPACK_CSYTRF (char const* uplo, int const* n,
- fcomplex_t* a, int const* lda, int* ipiv,
+ void LAPACK_CSYTRF (char const* uplo, int const* n,
+ fcomplex_t* a, int const* lda, int* ipiv,
                       fcomplex_t* w, int const* lw, int* info);
- void LAPACK_ZSYTRF (char const* uplo, int const* n,
- dcomplex_t* a, int const* lda, int* ipiv,
+ void LAPACK_ZSYTRF (char const* uplo, int const* n,
+ dcomplex_t* a, int const* lda, int* ipiv,
                       dcomplex_t* w, int const* lw, int* info);
 
- void LAPACK_CHETRF (char const* uplo, int const* n,
- fcomplex_t* a, int const* lda, int* ipiv,
+ void LAPACK_CHETRF (char const* uplo, int const* n,
+ fcomplex_t* a, int const* lda, int* ipiv,
                       fcomplex_t* w, int const* lw, int* info);
- void LAPACK_ZHETRF (char const* uplo, int const* n,
- dcomplex_t* a, int const* lda, int* ipiv,
+ void LAPACK_ZHETRF (char const* uplo, int const* n,
+ dcomplex_t* a, int const* lda, int* ipiv,
                       dcomplex_t* w, int const* lw, int* info);
 
- void LAPACK_SSYTRS (char const* uplo, int const* n, int const* nrhs,
- float const* a, int const* lda, int const* ipiv,
+ void LAPACK_SSYTRS (char const* uplo, int const* n, int const* nrhs,
+ float const* a, int const* lda, int const* ipiv,
                       float* b, int const* ldb, int* info);
- void LAPACK_DSYTRS (char const* uplo, int const* n, int const* nrhs,
- double const* a, int const* lda, int const* ipiv,
+ void LAPACK_DSYTRS (char const* uplo, int const* n, int const* nrhs,
+ double const* a, int const* lda, int const* ipiv,
                       double* b, int const* ldb, int* info);
   void LAPACK_CSYTRS (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t const* a, int const* lda, int const* ipiv,
+ fcomplex_t const* a, int const* lda, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZSYTRS (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t const* a, int const* lda, int const* ipiv,
+ dcomplex_t const* a, int const* lda, int const* ipiv,
                       dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SSYTRI (char const* uplo, int const* n, float* a,
- int const* lda, int const* ipiv, float* work,
- int* info);
- void LAPACK_DSYTRI (char const* uplo, int const* n, double* a,
- int const* lda, int const* ipiv, double* work,
- int* info);
- void LAPACK_CSYTRI (char const* uplo, int const* n, fcomplex_t* a,
- int const* lda, int const* ipiv, fcomplex_t* work,
- int* info);
- void LAPACK_ZSYTRI (char const* uplo, int const* n, dcomplex_t* a,
- int const* lda, int const* ipiv, dcomplex_t* work,
- int* info);
+ void LAPACK_SSYTRI (char const* uplo, int const* n, float* a,
+ int const* lda, int const* ipiv, float* work,
+ int* info);
+ void LAPACK_DSYTRI (char const* uplo, int const* n, double* a,
+ int const* lda, int const* ipiv, double* work,
+ int* info);
+ void LAPACK_CSYTRI (char const* uplo, int const* n, fcomplex_t* a,
+ int const* lda, int const* ipiv, fcomplex_t* work,
+ int* info);
+ void LAPACK_ZSYTRI (char const* uplo, int const* n, dcomplex_t* a,
+ int const* lda, int const* ipiv, dcomplex_t* work,
+ int* info);
  
   void LAPACK_CHETRS (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t const* a, int const* lda, int const* ipiv,
+ fcomplex_t const* a, int const* lda, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZHETRS (char const* uplo, int const* n, int const* nrhs,
                       dcomplex_t const* a, int const* lda, int const* ipiv,
@@ -268,67 +268,67 @@
 
   /* symmetric/Hermitian indefinite and complex symmetric in packed storage */
 
- void LAPACK_SSPSV (char const* uplo, int const* n, int const* nrhs,
- float* ap, int* ipiv,
+ void LAPACK_SSPSV (char const* uplo, int const* n, int const* nrhs,
+ float* ap, int* ipiv,
                      float* b, int const* ldb, int* info);
- void LAPACK_DSPSV (char const* uplo, int const* n, int const* nrhs,
- double* ap, int* ipiv,
+ void LAPACK_DSPSV (char const* uplo, int const* n, int const* nrhs,
+ double* ap, int* ipiv,
                      double* b, int const* ldb, int* info);
   void LAPACK_CSPSV (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t* ap, int* ipiv,
+ fcomplex_t* ap, int* ipiv,
                      fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZSPSV (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t* ap, int* ipiv,
+ dcomplex_t* ap, int* ipiv,
                      dcomplex_t* b, int const* ldb, int* info);
 
   void LAPACK_CHPSV (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t* ap, int* ipiv,
+ fcomplex_t* ap, int* ipiv,
                      fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZHPSV (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t* ap, int* ipiv,
+ dcomplex_t* ap, int* ipiv,
                      dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SSPTRF (char const* uplo, int const* n,
+ void LAPACK_SSPTRF (char const* uplo, int const* n,
                       float* ap, int* ipiv, int* info);
- void LAPACK_DSPTRF (char const* uplo, int const* n,
+ void LAPACK_DSPTRF (char const* uplo, int const* n,
                       double* ap, int* ipiv, int* info);
- void LAPACK_CSPTRF (char const* uplo, int const* n,
+ void LAPACK_CSPTRF (char const* uplo, int const* n,
                       fcomplex_t* ap, int* ipiv, int* info);
- void LAPACK_ZSPTRF (char const* uplo, int const* n,
+ void LAPACK_ZSPTRF (char const* uplo, int const* n,
                       dcomplex_t* ap, int* ipiv, int* info);
 
- void LAPACK_CHPTRF (char const* uplo, int const* n,
+ void LAPACK_CHPTRF (char const* uplo, int const* n,
                       fcomplex_t* ap, int* ipiv, int* info);
- void LAPACK_ZHPTRF (char const* uplo, int const* n,
+ void LAPACK_ZHPTRF (char const* uplo, int const* n,
                       dcomplex_t* ap, int* ipiv, int* info);
 
- void LAPACK_SSPTRS (char const* uplo, int const* n, int const* nrhs,
- float const* ap, int const* ipiv,
+ void LAPACK_SSPTRS (char const* uplo, int const* n, int const* nrhs,
+ float const* ap, int const* ipiv,
                       float* b, int const* ldb, int* info);
- void LAPACK_DSPTRS (char const* uplo, int const* n, int const* nrhs,
- double const* ap, int const* ipiv,
+ void LAPACK_DSPTRS (char const* uplo, int const* n, int const* nrhs,
+ double const* ap, int const* ipiv,
                       double* b, int const* ldb, int* info);
   void LAPACK_CSPTRS (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t const* ap, int const* ipiv,
+ fcomplex_t const* ap, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZSPTRS (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t const* ap, int const* ipiv,
+ dcomplex_t const* ap, int const* ipiv,
                       dcomplex_t* b, int const* ldb, int* info);
 
- void LAPACK_SSPTRI (char const* uplo, int const* n, float const* ap,
- int const* ipiv, float* work, int* info);
- void LAPACK_DSPTRI (char const* uplo, int const* n, double const* ap,
- int const* ipiv, double* work, int* info);
- void LAPACK_CSPTRI (char const* uplo, int const* n, fcomplex_t const* ap,
- int const* ipiv, fcomplex_t* work, int* info);
- void LAPACK_ZSPTRI (char const* uplo, int const* n, dcomplex_t const* ap,
- int const* ipiv, dcomplex_t* work, int* info);
+ void LAPACK_SSPTRI (char const* uplo, int const* n, float const* ap,
+ int const* ipiv, float* work, int* info);
+ void LAPACK_DSPTRI (char const* uplo, int const* n, double const* ap,
+ int const* ipiv, double* work, int* info);
+ void LAPACK_CSPTRI (char const* uplo, int const* n, fcomplex_t const* ap,
+ int const* ipiv, fcomplex_t* work, int* info);
+ void LAPACK_ZSPTRI (char const* uplo, int const* n, dcomplex_t const* ap,
+ int const* ipiv, dcomplex_t* work, int* info);
 
   void LAPACK_CHPTRS (char const* uplo, int const* n, int const* nrhs,
- fcomplex_t const* ap, int const* ipiv,
+ fcomplex_t const* ap, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
   void LAPACK_ZHPTRS (char const* uplo, int const* n, int const* nrhs,
- dcomplex_t const* ap, int const* ipiv,
+ dcomplex_t const* ap, int const* ipiv,
                       dcomplex_t* b, int const* ldb, int* info);
 
   /* banded */
@@ -342,17 +342,17 @@
   void LAPACK_ZGBTRF (int const* n, int const* m, int const* kl, int const* ku,
                       dcomplex_t* ab, int const* ldab, int* ipiv, int* info);
 
- void LAPACK_SGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
- float const* ab, int const* ldab, int const* ipiv,
+ void LAPACK_SGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
+ float const* ab, int const* ldab, int const* ipiv,
                       float* b, int const* ldb, int* info);
- void LAPACK_DGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
- double const* ab, int const* ldab, int const* ipiv,
+ void LAPACK_DGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
+ double const* ab, int const* ldab, int const* ipiv,
                       double* b, int const* ldb, int* info);
- void LAPACK_CGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
- fcomplex_t const* ab, int const* ldab, int const* ipiv,
+ void LAPACK_CGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
+ fcomplex_t const* ab, int const* ldab, int const* ipiv,
                       fcomplex_t* b, int const* ldb, int* info);
- void LAPACK_ZGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
- dcomplex_t const* ab, int const* ldab, int const* ipiv,
+ void LAPACK_ZGBTRS (char const* trans, int const* n, int const* kl, int const* ku, int const* nrhs,
+ dcomplex_t const* ab, int const* ldab, int const* ipiv,
                       dcomplex_t* b, int const* ldb, int* info);
 
 
@@ -467,57 +467,57 @@
 
   void LAPACK_CTREVC( const char* side, const char* howmny, const logical_t* select, const int *n,
                      fcomplex_t* t, const int * ldt, fcomplex_t* vl, const int* ldvl,
- fcomplex_t* vr, const int * ldvr, const int * nm, int* m, fcomplex_t* work,
+ fcomplex_t* vr, const int * ldvr, const int * nm, int* m, fcomplex_t* work,
                      float* rwork, int* info );
 
   void LAPACK_ZTREVC( const char* side, const char* howmny, const logical_t* select, const int *n,
                      dcomplex_t* t, const int * ldt, dcomplex_t* vl, const int* ldvl,
- dcomplex_t* vr, const int * ldvr, const int * nm, int* m, dcomplex_t* work,
+ dcomplex_t* vr, const int * ldvr, const int * nm, int* m, dcomplex_t* work,
                      double* rwork, int* info );
 
   void LAPACK_STREVC( const char* side, const char* howmny, const logical_t* select, const int *n,
                      float* t, const int * ldt, float* vl, const int* ldvl,
- float* vr, const int * ldvr, const int * nm, int* m, float* work,
+ float* vr, const int * ldvr, const int * nm, int* m, float* work,
                      int* info );
 
   void LAPACK_DTREVC( const char* side, const char* howmny, const logical_t* select, const int *n,
                      double* t, const int * ldt, double* vl, const int* ldvl,
- double* vr, const int * ldvr, const int * nm, int* m, double* work,
+ double* vr, const int * ldvr, const int * nm, int* m, double* work,
                      int* info );
 
 
   void LAPACK_STREXC( const char* compq, const int *n,
                      float* t, const int * ldt, float* q, const int* ldq,
- int* ifst, const int * ilst, float* work, int* info );
+ int* ifst, const int * ilst, float* work, int* info );
 
   void LAPACK_DTREXC( const char* compq, const int *n,
                      double* t, const int * ldt, double* q, const int* ldq,
- int* ifst, const int * ilst, double* work, int* info );
+ int* ifst, const int * ilst, double* work, int* info );
 
   void LAPACK_CTREXC( const char* compq, const int *n,
                      fcomplex_t* t, const int * ldt, fcomplex_t* q, const int* ldq,
- int* ifst, const int * ilst, int* info );
+ int* ifst, const int * ilst, int* info );
 
   void LAPACK_ZTREXC( const char* compq, const int *n,
                      dcomplex_t* t, const int * ldt, dcomplex_t* q, const int* ldq,
- int* ifst, const int * ilst, int* info );
+ int* ifst, const int * ilst, int* info );
 
 
   /* Hessenberg matrices */
 
- void LAPACK_SHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, float* H,
+ void LAPACK_SHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, float* H,
                       const int* LDH, float* WR, float* WI, float* Z, int const* LDZ,
                       float* WORK, const int* LWORK, int* INFO ) ;
 
- void LAPACK_CHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, fcomplex_t* H,
+ void LAPACK_CHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, fcomplex_t* H,
                       const int* LDH, fcomplex_t* W, fcomplex_t* Z, int const* LDZ,
                       fcomplex_t* WORK, const int* LWORK, int* INFO ) ;
 
- void LAPACK_DHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, double* H,
+ void LAPACK_DHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, double* H,
                       const int* LDH, double* WR, double* WI, double* Z, int const* LDZ,
                       double* WORK, const int* LWORK, int* INFO ) ;
 
- void LAPACK_ZHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, dcomplex_t* H,
+ void LAPACK_ZHSEQR( const char* JOB, const char* COMPZ, const int* N, const int* ILO, const int* IHI, dcomplex_t* H,
                       const int* LDH, dcomplex_t* W, dcomplex_t* Z, int const* LDZ,
                       dcomplex_t* WORK, const int* LWORK, int* INFO ) ;
 
@@ -612,53 +612,53 @@
   /* SVD */
   /*********************************************************************/
 
- void LAPACK_SGESVD (char const* jobu, char const* jobvt,
- int const* m, int const* n, float* a, int const* lda,
- float* s, float* u, int const* ldu,
+ void LAPACK_SGESVD (char const* jobu, char const* jobvt,
+ int const* m, int const* n, float* a, int const* lda,
+ float* s, float* u, int const* ldu,
                       float* vt, int const* ldvt,
- float* work, int const* lwork, int* info);
- void LAPACK_DGESVD (char const* jobu, char const* jobvt,
- int const* m, int const* n, double* a, int const* lda,
- double* s, double* u, int const* ldu,
+ float* work, int const* lwork, int* info);
+ void LAPACK_DGESVD (char const* jobu, char const* jobvt,
+ int const* m, int const* n, double* a, int const* lda,
+ double* s, double* u, int const* ldu,
                       double* vt, int const* ldvt,
- double* work, int const* lwork, int* info);
- void LAPACK_CGESVD (char const* jobu, char const* jobvt,
- int const* m, int const* n,
- fcomplex_t* a, int const* lda,
- float* s, fcomplex_t* u, int const* ldu,
+ double* work, int const* lwork, int* info);
+ void LAPACK_CGESVD (char const* jobu, char const* jobvt,
+ int const* m, int const* n,
+ fcomplex_t* a, int const* lda,
+ float* s, fcomplex_t* u, int const* ldu,
                       fcomplex_t* vt, int const* ldvt,
- fcomplex_t* work, int const* lwork,
- float* rwork, int* info);
- void LAPACK_ZGESVD (char const* jobu, char const* jobvt,
- int const* m, int const* n,
- dcomplex_t* a, int const* lda,
- double* s, dcomplex_t* u, int const* ldu,
+ fcomplex_t* work, int const* lwork,
+ float* rwork, int* info);
+ void LAPACK_ZGESVD (char const* jobu, char const* jobvt,
+ int const* m, int const* n,
+ dcomplex_t* a, int const* lda,
+ double* s, dcomplex_t* u, int const* ldu,
                       dcomplex_t* vt, int const* ldvt,
- dcomplex_t* work, int const* lwork,
- double* rwork, int* info);
+ dcomplex_t* work, int const* lwork,
+ double* rwork, int* info);
 
- void LAPACK_SGESDD (char const* jobz, int const* m, int const* n,
- float* a, int const* lda,
- float* s, float* u, int const* ldu,
+ void LAPACK_SGESDD (char const* jobz, int const* m, int const* n,
+ float* a, int const* lda,
+ float* s, float* u, int const* ldu,
                       float* vt, int const* ldvt,
- float* work, int const* lwork, int* iwork, int* info);
- void LAPACK_DGESDD (char const* jobz, int const* m, int const* n,
- double* a, int const* lda,
- double* s, double* u, int const* ldu,
+ float* work, int const* lwork, int* iwork, int* info);
+ void LAPACK_DGESDD (char const* jobz, int const* m, int const* n,
+ double* a, int const* lda,
+ double* s, double* u, int const* ldu,
                       double* vt, int const* ldvt,
- double* work, int const* lwork, int* iwork, int* info);
- void LAPACK_CGESDD (char const* jobz, int const* m, int const* n,
- fcomplex_t* a, int const* lda,
- float* s, fcomplex_t* u, int const* ldu,
+ double* work, int const* lwork, int* iwork, int* info);
+ void LAPACK_CGESDD (char const* jobz, int const* m, int const* n,
+ fcomplex_t* a, int const* lda,
+ float* s, fcomplex_t* u, int const* ldu,
                       fcomplex_t* vt, int const* ldvt,
- fcomplex_t* work, int const* lwork,
- float* rwork, int* iwork, int* info);
- void LAPACK_ZGESDD (char const* jobz, int const* m, int const* n,
- dcomplex_t* a, int const* lda,
- double* s, dcomplex_t* u, int const* ldu,
+ fcomplex_t* work, int const* lwork,
+ float* rwork, int* iwork, int* info);
+ void LAPACK_ZGESDD (char const* jobz, int const* m, int const* n,
+ dcomplex_t* a, int const* lda,
+ double* s, dcomplex_t* u, int const* ldu,
                       dcomplex_t* vt, int const* ldvt,
- dcomplex_t* work, int const* lwork,
- double* rwork, int* iwork, int* info);
+ dcomplex_t* work, int const* lwork,
+ double* rwork, int* iwork, int* info);
 
 
   /*********************************************************************/
@@ -715,58 +715,58 @@
   /* Least Squares */
   /********************************************************************/
 
- void LAPACK_SGELS(const char* trans, const int* m, const int* n,
- const int *nrhs, float* a, const int* lda,
- float* b, const int* ldb, float* work,
- const int* lwork, int* info);
- void LAPACK_DGELS(const char* trans, const int* m, const int* n,
- const int *nrhs, double* a, const int* lda,
- double* b, const int* ldb, double* work,
- const int* lwork, int* info);
- void LAPACK_CGELS(const char* trans, const int* m, const int* n,
- const int *nrhs, fcomplex_t* a, const int* lda,
- fcomplex_t* b, const int* ldb, fcomplex_t* work,
- const int* lwork, int* info);
- void LAPACK_ZGELS(const char* trans, const int* m, const int* n,
- const int *nrhs, dcomplex_t* a, const int* lda,
- dcomplex_t* b, const int* ldb, dcomplex_t* work,
- const int* lwork, int* info);
+ void LAPACK_SGELS(const char* trans, const int* m, const int* n,
+ const int *nrhs, float* a, const int* lda,
+ float* b, const int* ldb, float* work,
+ const int* lwork, int* info);
+ void LAPACK_DGELS(const char* trans, const int* m, const int* n,
+ const int *nrhs, double* a, const int* lda,
+ double* b, const int* ldb, double* work,
+ const int* lwork, int* info);
+ void LAPACK_CGELS(const char* trans, const int* m, const int* n,
+ const int *nrhs, fcomplex_t* a, const int* lda,
+ fcomplex_t* b, const int* ldb, fcomplex_t* work,
+ const int* lwork, int* info);
+ void LAPACK_ZGELS(const char* trans, const int* m, const int* n,
+ const int *nrhs, dcomplex_t* a, const int* lda,
+ dcomplex_t* b, const int* ldb, dcomplex_t* work,
+ const int* lwork, int* info);
 
 
   void LAPACK_SGELSS(const int *m, const int *n, const int *nrhs,
- float *a, const int *lda, float *b, const int *ldb,
- float *s, const float *rcond, int *rank, float *work,
- const int *lwork, int *info);
+ float *a, const int *lda, float *b, const int *ldb,
+ float *s, const float *rcond, int *rank, float *work,
+ const int *lwork, int *info);
   void LAPACK_DGELSS(const int *m, const int *n, const int *nrhs,
- double *a, const int *lda, double *b, const int *ldb,
- double *s, const double *rcond, int *rank, double *work,
- const int *lwork, int *info);
+ double *a, const int *lda, double *b, const int *ldb,
+ double *s, const double *rcond, int *rank, double *work,
+ const int *lwork, int *info);
   void LAPACK_CGELSS(const int *m, const int *n, const int *nrhs,
- fcomplex_t *a, const int *lda, fcomplex_t *b, const int *ldb,
- float *s, const float *rcond, int *rank, fcomplex_t *work,
- const int *lwork, float *rwork, int *info);
+ fcomplex_t *a, const int *lda, fcomplex_t *b, const int *ldb,
+ float *s, const float *rcond, int *rank, fcomplex_t *work,
+ const int *lwork, float *rwork, int *info);
   void LAPACK_ZGELSS(const int *m, const int *n, const int *nrhs,
- dcomplex_t *a, const int *lda, dcomplex_t *b, const int *ldb,
- double *s, const double *rcond, int *rank, dcomplex_t *work,
- const int *lwork, double *rwork, int *info);
+ dcomplex_t *a, const int *lda, dcomplex_t *b, const int *ldb,
+ double *s, const double *rcond, int *rank, dcomplex_t *work,
+ const int *lwork, double *rwork, int *info);
 
 
   void LAPACK_SGELSD(const int *m, const int *n, const int *nrhs,
- float *a, const int *lda, float *b, const int *ldb,
- float *s, const float *rcond, int *rank, float *work,
- const int *lwork, int *iwork, int *info);
+ float *a, const int *lda, float *b, const int *ldb,
+ float *s, const float *rcond, int *rank, float *work,
+ const int *lwork, int *iwork, int *info);
   void LAPACK_DGELSD(const int *m, const int *n, const int *nrhs,
- double *a, const int *lda, double *b, const int *ldb,
- double *s, const double *rcond, int *rank, double *work,
- const int *lwork, int *iwork, int *info);
+ double *a, const int *lda, double *b, const int *ldb,
+ double *s, const double *rcond, int *rank, double *work,
+ const int *lwork, int *iwork, int *info);
   void LAPACK_CGELSD(const int *m, const int *n, const int *nrhs,
- fcomplex_t *a, const int *lda, fcomplex_t *b, const int *ldb,
- float *s, const float *rcond, int *rank, fcomplex_t *work,
- const int *lwork, float *rwork, int *iwork, int *info);
+ fcomplex_t *a, const int *lda, fcomplex_t *b, const int *ldb,
+ float *s, const float *rcond, int *rank, fcomplex_t *work,
+ const int *lwork, float *rwork, int *iwork, int *info);
   void LAPACK_ZGELSD(const int *m, const int *n, const int *nrhs,
- dcomplex_t *a, const int *lda, dcomplex_t *b, const int *ldb,
- double *s, const double *rcond, int *rank, dcomplex_t *work,
- const int *lwork, double *rwork, int *iwork, int *info);
+ dcomplex_t *a, const int *lda, dcomplex_t *b, const int *ldb,
+ double *s, const double *rcond, int *rank, dcomplex_t *work,
+ const int *lwork, double *rwork, int *iwork, int *info);
 
 
 
@@ -776,8 +776,8 @@
 
   int LAPACK_ILAENV (int const* ispec, const char* name, const char* opt,
                      int const* n1, int const* n2, int const* n3,
- int const* n4, int, int);
+ int const* n4, int, int);
 
 }
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/lapack.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/lapack.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/lapack.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,15 +1,15 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
- * Permission to copy, modify, use and distribute this software
- * for any non-commercial or commercial purpose is granted provided
+ * Permission to copy, modify, use and distribute this software
+ * for any non-commercial or commercial purpose is granted provided
  * that this license appear on all copies of the software source code.
  *
- * Authors assume no responsibility whatsoever for its use and makes
+ * Authors assume no responsibility whatsoever for its use and makes
  * no guarantees about its quality, correctness or reliability.
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -27,7 +27,7 @@
 #include <boost/numeric/bindings/lapack/hesv.hpp>
 #include <boost/numeric/bindings/lapack/hpsv.hpp>
 
-// eigenproblems
+// eigenproblems
 
 #include <boost/numeric/bindings/lapack/gees.hpp>
 #include <boost/numeric/bindings/lapack/trevc.hpp>
@@ -50,4 +50,3 @@
 
 
 #endif // BOOST_NUMERIC_BINDINGS_LAPACK_LAPACK_HPP
-

Modified: sandbox/boost/numeric/bindings/lapack/lapack_names.h
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/lapack_names.h (original)
+++ sandbox/boost/numeric/bindings/lapack/lapack_names.h 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -219,7 +219,7 @@
 #define LAPACK_ZTREXC FORTRAN_ID( ztrexc )
 
 /********************************************/
-/* eigenproblems for Hessenberg matrices */
+/* eigenproblems for Hessenberg matrices */
 
 #define LAPACK_SHSEQR FORTRAN_ID( shseqr )
 #define LAPACK_DHSEQR FORTRAN_ID( dhseqr )
@@ -227,7 +227,7 @@
 #define LAPACK_ZHSEQR FORTRAN_ID( zhseqr )
 
 /********************************************/
-/* eigenproblems for banded matrices */
+/* eigenproblems for banded matrices */
 
 #define LAPACK_SSBEV FORTRAN_ID( ssbev )
 #define LAPACK_DSBEV FORTRAN_ID( dsbev )
@@ -240,7 +240,7 @@
 #define LAPACK_ZHBEVX FORTRAN_ID( zhbevx )
 
 /********************************************/
-/* eigenproblems for tridiagonal matrices */
+/* eigenproblems for tridiagonal matrices */
 
 #define LAPACK_SSTEQR FORTRAN_ID( ssteqr )
 #define LAPACK_DSTEQR FORTRAN_ID( dsteqr )
@@ -248,9 +248,9 @@
 /********************************************/
 /* generalized eigenvalue/eigenvector */
 
-#define LAPACK_SSYGV FORTRAN_ID( ssygv )
+#define LAPACK_SSYGV FORTRAN_ID( ssygv )
 #define LAPACK_DSYGV FORTRAN_ID( dsygv )
-#define LAPACK_CHEGV FORTRAN_ID( chegv )
+#define LAPACK_CHEGV FORTRAN_ID( chegv )
 #define LAPACK_ZHEGV FORTRAN_ID( zhegv )
 
 
@@ -293,7 +293,7 @@
 
 
 /********************************************/
-/* Least Squares */
+/* Least Squares */
 
 #define LAPACK_SGELS FORTRAN_ID( sgels )
 #define LAPACK_DGELS FORTRAN_ID( dgels )
@@ -311,10 +311,9 @@
 #define LAPACK_ZGELSD FORTRAN_ID( zgelsd )
 
 /********************************************/
-/* auxiliary */
+/* auxiliary */
 
 #define LAPACK_ILAENV FORTRAN_ID( ilaenv )
 
 
-#endif
-
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/orgqr.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/orgqr.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/orgqr.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -10,13 +10,13 @@
  *
  * \brief Generates an M-by-N real matrix Q with orthonormal columns,
  * which is defined as the first N columns of a product of K elementary
- * reflectors of order M
+ * reflectors of order M
  * Q = H(1) H(2) . . . H(k)
  *
- * \warning
- * \todo
+ * \warning
+ * \todo
  * \date 2005
- * \author CEA/DRT/DTSI/SARC
+ * \author CEA/DRT/DTSI/SARC
  * \author Q.C. PHAM
  *
  **/
@@ -32,59 +32,59 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
-
+
     ///////////////////////////////////////////////////////////////////
- /*
+ /*
      * Generates an M-by-N real matrix Q with orthonormal columns,
- * which is defined as the first N columns of a product of K elementary
- * reflectors of order M
- * Q = H(1) H(2) . . . H(k)
- * as returned by geqrf().
- * The init value of matrix Q is the matrix A returned by geqrf()
- */
- ///////////////////////////////////////////////////////////////////
+ * which is defined as the first N columns of a product of K elementary
+ * reflectors of order M
+ * Q = H(1) H(2) . . . H(k)
+ * as returned by geqrf().
+ * The init value of matrix Q is the matrix A returned by geqrf()
+ */
+ ///////////////////////////////////////////////////////////////////
     namespace detail {
 
 
- inline
+ inline
       void orgqr(int const m, int const n, int const k,
                  float* a, int const lda,
- float* tau, float* work, int const lwork, int& info)
+ float* tau, float* work, int const lwork, int& info)
       {
         LAPACK_SORGQR (&m, &n, &k, a, &lda, tau, work, &lwork, &info);
       }
 
- inline
+ inline
       void orgqr(int const m, int const n, int const k,
                  double* a, int const lda,
- double* tau, double* work, int const lwork, int& info)
+ double* tau, double* work, int const lwork, int& info)
       {
         LAPACK_DORGQR (&m, &n, &k, a, &lda, tau, work, &lwork, &info);
       }
 
- inline
+ inline
       void orgqr(int const m, int const n, int const k,
                  traits::complex_f* a, int const lda,
- traits::complex_f* tau, traits::complex_f* work, int const lwork, int& info)
+ traits::complex_f* tau, traits::complex_f* work, int const lwork, int& info)
       {
         LAPACK_CUNGQR (&m, &n, &k, traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
                        traits::complex_ptr(work), &lwork, &info);
       }
 
- inline
+ inline
       void orgqr(int const m, int const n, int const k,
                  traits::complex_d* a, int const lda,
- traits::complex_d* tau, traits::complex_d* work, int const lwork, int& info)
+ traits::complex_d* tau, traits::complex_d* work, int const lwork, int& info)
       {
         LAPACK_ZUNGQR (&m, &n, &k, traits::complex_ptr(a), &lda, traits::complex_ptr(tau),
                        traits::complex_ptr(work), &lwork, &info);
@@ -93,30 +93,30 @@
     } // fin namespace detail
 
 
- //--------------------------------------------
+ //--------------------------------------------
 
    template <typename A, typename Tau, typename Work>
    int orgqr(A& a, Tau& tau, Work &work) {
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
+
+ const int m = traits::matrix_size1 (a);
+ const int n = traits::matrix_size2 (a);
+ const int k = n;
 
- const int m = traits::matrix_size1 (a);
- const int n = traits::matrix_size2 (a);
- const int k = n;
-
- assert (std::min<int>(m,n) <= traits::vector_size (tau));
- assert (n <= traits::vector_size (work));
-
- int info;
+ assert (std::min<int>(m,n) <= traits::vector_size (tau));
+ assert (n <= traits::vector_size (work));
+
+ int info;
       detail::orgqr (m, n, k,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (tau),
+ traits::vector_storage (tau),
                      traits::vector_storage (work),
                      traits::vector_size (work),
                      info);
@@ -129,10 +129,10 @@
     template <typename A, typename Tau>
     int orgqr (A& a, Tau& tau, optimal_workspace ) {
        typedef typename A::value_type value_type ;
- const int n = traits::matrix_size2 (a);
+ const int n = traits::matrix_size2 (a);
        traits::detail::array<value_type> work(std::max<int>(1, n*32));
        return orgqr( a, tau, work );
-
+
     }
 
     // Computation of Q
@@ -141,18 +141,18 @@
     template <typename A, typename Tau>
     int orgqr (A& a, Tau& tau, minimal_workspace ) {
        typedef typename A::value_type value_type ;
- const int n = traits::matrix_size2 (a);
+ const int n = traits::matrix_size2 (a);
        traits::detail::array<value_type> work(std::max<int>(1, n));
        return orgqr( a, tau, work );
     }
 
     // Computation of the Q
     // Workspace is taken from the array in workspace.
-
+
     template <typename A, typename Tau, typename Work>
     int orgqr (A& a, Tau& tau, detail::workspace1<Work> workspace ) {
        typedef typename A::value_type value_type ;
- const int n = traits::matrix_size2 (a);
+ const int n = traits::matrix_size2 (a);
        traits::detail::array<value_type> work(std::max<int>(1, n));
        return orgqr( a, tau, workspace.w_ );
     }
@@ -168,4 +168,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/ormqr.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/ormqr.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/ormqr.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,13 +21,13 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -35,10 +35,10 @@
     //
     // Apply the orthogonal transformation abtained by geqrf() to
     // a general matrix.
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * ormqr() overwrites the general M by N matrix C with
      *
      * SIDE = 'L' SIDE = 'R'
@@ -61,72 +61,72 @@
      * as C.
      * We must have that vector_size( work ) >= matrix_size2( c )
      * if SIDE=='L' otherwise vector_size( work ) >= matrix_size1( c )
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void ormqr (char const side, char const trans, int const m, int const n,
- int const k, const float* a, int const lda,
- const float* tau, float* c,
- int const ldc, float* work, int const lwork,
- int& info)
+ int const k, const float* a, int const lda,
+ const float* tau, float* c,
+ int const ldc, float* work, int const lwork,
+ int& info)
       {
         assert ( trans=='N' || trans=='T' );
         LAPACK_SORMQR (&side, &trans, &m, &n, &k,
- a, &lda,
- tau,
- c, &ldc,
- work, &lwork,
- &info);
+ a, &lda,
+ tau,
+ c, &ldc,
+ work, &lwork,
+ &info);
       }
 
- inline
+ inline
       void ormqr (char const side, char const trans, int const m, int const n,
- int const k, const double* a, int const lda,
- const double* tau, double* c,
- int const ldc, double* work, int const lwork,
- int& info)
+ int const k, const double* a, int const lda,
+ const double* tau, double* c,
+ int const ldc, double* work, int const lwork,
+ int& info)
       {
         assert ( trans=='N' || trans=='T' );
         LAPACK_DORMQR (&side, &trans, &m, &n, &k,
- a, &lda,
- tau,
- c, &ldc,
- work, &lwork,
- &info);
+ a, &lda,
+ tau,
+ c, &ldc,
+ work, &lwork,
+ &info);
       }
 
- inline
+ inline
       void ormqr (char const side, char const trans, int const m, int const n,
- int const k, const traits::complex_f* a, int const lda,
- const traits::complex_f* tau, traits::complex_f* c,
- int const ldc, traits::complex_f* work, int const lwork,
- int& info)
+ int const k, const traits::complex_f* a, int const lda,
+ const traits::complex_f* tau, traits::complex_f* c,
+ int const ldc, traits::complex_f* work, int const lwork,
+ int& info)
       {
         assert ( trans=='N' || trans=='C' );
         LAPACK_CUNMQR (&side, &trans, &m, &n, &k,
- traits::complex_ptr(a), &lda,
- traits::complex_ptr(tau),
- traits::complex_ptr(c), &ldc,
- traits::complex_ptr(work), &lwork,
- &info);
+ traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork,
+ &info);
       }
 
- inline
+ inline
       void ormqr (char const side, char const trans, int const m, int const n,
- int const k, const traits::complex_d* a, int const lda,
- const traits::complex_d* tau, traits::complex_d* c,
- int const ldc, traits::complex_d* work, int const lwork,
- int& info)
+ int const k, const traits::complex_d* a, int const lda,
+ const traits::complex_d* tau, traits::complex_d* c,
+ int const ldc, traits::complex_d* work, int const lwork,
+ int& info)
       {
         assert ( trans=='N' || trans=='C' );
         LAPACK_ZUNMQR (&side, &trans, &m, &n, &k,
- traits::complex_ptr(a), &lda,
- traits::complex_ptr(tau),
- traits::complex_ptr(c), &ldc,
- traits::complex_ptr(work), &lwork,
- &info);
+ traits::complex_ptr(a), &lda,
+ traits::complex_ptr(tau),
+ traits::complex_ptr(c), &ldc,
+ traits::complex_ptr(work), &lwork,
+ &info);
       }
 
 
@@ -134,16 +134,16 @@
       int ormqr (char side, char trans, const A& a, const Tau& tau, C& c,
                  Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
           traits::general_t
- >::value));
+ >::value));
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<C>::matrix_structure,
+ typename traits::matrix_traits<C>::matrix_structure,
           traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
         int const m = traits::matrix_size1 (c);
         int const n = traits::matrix_size2 (c);
@@ -156,22 +156,22 @@
         assert ( (side=='L' ?
                   m == traits::matrix_size1 (a) :
                   n == traits::matrix_size1 (a) ) );
- assert (traits::matrix_size2 (a)==k);
+ assert (traits::matrix_size2 (a)==k);
 
         assert ( (side=='L' ?
                   lwork >= n : lwork >= m ) );
 
- int info;
+ int info;
         ormqr (side, trans, m, n, k,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                        traits::leading_dimension (a),
- traits::vector_storage (tau),
- traits::matrix_storage (c),
+ traits::vector_storage (tau),
+ traits::matrix_storage (c),
                        traits::leading_dimension (c),
                        traits::vector_storage (work),
                        lwork,
                        info);
- return info;
+ return info;
       }
     } // namespace detail
 
@@ -218,4 +218,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/posv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/posv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/posv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -18,15 +18,15 @@
 #include <boost/numeric/bindings/traits/traits.hpp>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/numeric/bindings/traits/detail/symm_herm_traits.hpp>
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -38,60 +38,60 @@
     /////////////////////////////////////////////////////////////////////
 
     /*
- * posv() computes the solution to a system of linear equations
- * A * X = B, where A is an N-by-N symmetric or Hermitian positive
+ * posv() computes the solution to a system of linear equations
+ * A * X = B, where A is an N-by-N symmetric or Hermitian positive
      * definite matrix and X and B are N-by-NRHS matrices.
      *
      * The Cholesky decomposition is used to factor A as
- * A = U^T * U or A = U^H * U, if UPLO = 'U',
+ * A = U^T * U or A = U^H * U, if UPLO = 'U',
      * A = L * L^T or A = L * L^H, if UPLO = 'L',
      * where U is an upper triangular matrix and L is a lower triangular
      * matrix. The factored form of A is then used to solve the system of
      * equations A * X = B.
      *
- * If UPLO = 'U', the leading N-by-N upper triangular part of A
- * contains the upper triangular part of the matrix A, and the
- * strictly lower triangular part of A is not referenced.
- * If UPLO = 'L', the leading N-by-N lower triangular part of A
- * contains the lower triangular part of the matrix A, and the
+ * If UPLO = 'U', the leading N-by-N upper triangular part of A
+ * contains the upper triangular part of the matrix A, and the
+ * strictly lower triangular part of A is not referenced.
+ * If UPLO = 'L', the leading N-by-N lower triangular part of A
+ * contains the lower triangular part of the matrix A, and the
      * strictly upper triangular part of A is not referenced.
      */
 
     namespace detail {
 
- inline
+ inline
       void posv (char const uplo, int const n, int const nrhs,
- float* a, int const lda,
- float* b, int const ldb, int* info)
+ float* a, int const lda,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SPOSV (&uplo, &n, &nrhs, a, &lda, b, &ldb, info);
       }
 
- inline
+ inline
       void posv (char const uplo, int const n, int const nrhs,
- double* a, int const lda,
- double* b, int const ldb, int* info)
+ double* a, int const lda,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DPOSV (&uplo, &n, &nrhs, a, &lda, b, &ldb, info);
       }
 
- inline
+ inline
       void posv (char const uplo, int const n, int const nrhs,
- traits::complex_f* a, int const lda,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* a, int const lda,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CPOSV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda,
+ LAPACK_CPOSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda,
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void posv (char const uplo, int const n, int const nrhs,
- traits::complex_d* a, int const lda,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d* a, int const lda,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZPOSV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda,
+ LAPACK_ZPOSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda,
                       traits::complex_ptr (b), &ldb, info);
       }
 
@@ -100,14 +100,14 @@
         int const n = traits::matrix_size1 (a);
         assert (n == traits::matrix_size2 (a));
         assert (n == traits::matrix_size1 (b));
- int info;
+ int info;
         posv (uplo, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
               traits::leading_dimension (a),
- traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::matrix_storage (b),
+ traits::leading_dimension (b),
               &info);
- return info;
+ return info;
       }
 
     }
@@ -116,20 +116,20 @@
     inline
     int posv (char const uplo, SymmMatrA& a, MatrB& b) {
 
- assert (uplo == 'U' || uplo == 'L');
+ assert (uplo == 'U' || uplo == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmMatrA>::matrix_structure,
+ typename traits::matrix_traits<SymmMatrA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- return detail::posv (uplo, a, b);
+ return detail::posv (uplo, a, b);
     }
 
     template <typename SymmMatrA, typename MatrB>
@@ -141,81 +141,81 @@
       typedef typename matraits::value_type val_t;
       BOOST_STATIC_ASSERT( (traits::detail::symm_herm_compatible< val_t, typename matraits::matrix_structure >::value ) ) ;
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- return detail::posv (uplo, a, b);
+ return detail::posv (uplo, a, b);
     }
 
 
     /*
      * potrf() computes the Cholesky factorization of a symmetric
- * or Hermitian positive definite matrix A. The factorization has
+ * or Hermitian positive definite matrix A. The factorization has
      * the form
- * A = U^T * U or A = U^H * U, if UPLO = 'U',
+ * A = U^T * U or A = U^H * U, if UPLO = 'U',
      * A = L * L^T or A = L * L^H, if UPLO = 'L',
      * where U is an upper triangular matrix and L is lower triangular.
      */
 
     namespace detail {
 
- inline
- void potrf (char const uplo, int const n,
- float* a, int const lda, int* info)
+ inline
+ void potrf (char const uplo, int const n,
+ float* a, int const lda, int* info)
       {
         LAPACK_SPOTRF (&uplo, &n, a, &lda, info);
       }
 
- inline
- void potrf (char const uplo, int const n,
- double* a, int const lda, int* info)
+ inline
+ void potrf (char const uplo, int const n,
+ double* a, int const lda, int* info)
       {
         LAPACK_DPOTRF (&uplo, &n, a, &lda, info);
       }
 
- inline
- void potrf (char const uplo, int const n,
- traits::complex_f* a, int const lda, int* info)
+ inline
+ void potrf (char const uplo, int const n,
+ traits::complex_f* a, int const lda, int* info)
       {
         LAPACK_CPOTRF (&uplo, &n, traits::complex_ptr (a), &lda, info);
       }
 
- inline
- void potrf (char const uplo, int const n,
- traits::complex_d* a, int const lda, int* info)
+ inline
+ void potrf (char const uplo, int const n,
+ traits::complex_d* a, int const lda, int* info)
       {
         LAPACK_ZPOTRF (&uplo, &n, traits::complex_ptr (a), &lda, info);
       }
 
- template <typename SymmMatrA>
+ template <typename SymmMatrA>
       int potrf (char const uplo, SymmMatrA& a) {
         int const n = traits::matrix_size1 (a);
         assert (n == traits::matrix_size2 (a));
- int info;
- potrf (uplo, n, traits::matrix_storage (a),
+ int info;
+ potrf (uplo, n, traits::matrix_storage (a),
                traits::leading_dimension (a), &info);
- return info;
+ return info;
       }
 
     }
 
- template <typename SymmMatrA>
+ template <typename SymmMatrA>
     inline
     int potrf (char const uplo, SymmMatrA& a) {
 
- assert (uplo == 'U' || uplo == 'L');
+ assert (uplo == 'U' || uplo == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmMatrA>::matrix_structure,
+ typename traits::matrix_traits<SymmMatrA>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- return detail::potrf (uplo, a);
+ return detail::potrf (uplo, a);
     }
 
     template <typename SymmMatrA>
@@ -230,53 +230,53 @@
         typename traits::detail::symm_herm_t<val_t>::type
>::value));
 #endif
-
+
       char uplo = traits::matrix_uplo_tag (a);
- return detail::potrf (uplo, a);
+ return detail::potrf (uplo, a);
     }
 
 
     /*
- * potrs() solves a system of linear equations A*X = B with
- * a symmetric or Hermitian positive definite matrix A using
+ * potrs() solves a system of linear equations A*X = B with
+ * a symmetric or Hermitian positive definite matrix A using
      * the Cholesky factorization computed by potrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void potrs (char const uplo, int const n, int const nrhs,
- float const* a, int const lda,
- float* b, int const ldb, int* info)
+ float const* a, int const lda,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SPOTRS (&uplo, &n, &nrhs, a, &lda, b, &ldb, info);
       }
 
- inline
+ inline
       void potrs (char const uplo, int const n, int const nrhs,
- double const* a, int const lda,
- double* b, int const ldb, int* info)
+ double const* a, int const lda,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DPOTRS (&uplo, &n, &nrhs, a, &lda, b, &ldb, info);
       }
 
- inline
+ inline
       void potrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* a, int const lda,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* a, int const lda,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CPOTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda,
+ LAPACK_CPOTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda,
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void potrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* a, int const lda,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* a, int const lda,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZPOTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda,
+ LAPACK_ZPOTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda,
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -285,18 +285,18 @@
         int const n = traits::matrix_size1 (a);
         assert (n == traits::matrix_size2 (a));
         assert (n == traits::matrix_size1 (b));
- int info;
+ int info;
         potrs (uplo, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
-#endif
+ traits::matrix_storage_const (a),
+#endif
                traits::leading_dimension (a),
- traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::matrix_storage (b),
+ traits::leading_dimension (b),
                &info);
- return info;
+ return info;
       }
 
     }
@@ -305,20 +305,20 @@
     inline
     int potrs (char const uplo, SymmMatrA const& a, MatrB& b) {
 
- assert (uplo == 'U' || uplo == 'L');
+ assert (uplo == 'U' || uplo == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmMatrA>::matrix_structure,
+ typename traits::matrix_traits<SymmMatrA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- return detail::potrs (uplo, a, b);
+ return detail::potrs (uplo, a, b);
     }
 
     template <typename SymmMatrA, typename MatrB>
@@ -339,13 +339,13 @@
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- return detail::potrs (uplo, a, b);
+ return detail::potrs (uplo, a, b);
     }
 
- // TO DO: potri()
+ // TO DO: potri()
 
   }
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/ppsv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/ppsv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/ppsv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Kresimir Fresl Toon Knapen 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -19,15 +19,15 @@
 #include <boost/numeric/bindings/traits/traits.hpp>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/numeric/bindings/traits/detail/symm_herm_traits.hpp>
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -35,60 +35,60 @@
     //
     // system of linear equations A * X = B
     // with A symmetric or Hermitian positive definite matrix
- // stored in packed format
+ // stored in packed format
     //
     /////////////////////////////////////////////////////////////////////
 
     /*
- * ppsv() computes the solution to a system of linear equations
- * A * X = B, where A is an N-by-N symmetric or Hermitian positive
- * definite matrix stored in packed format and X and B are N-by-NRHS
+ * ppsv() computes the solution to a system of linear equations
+ * A * X = B, where A is an N-by-N symmetric or Hermitian positive
+ * definite matrix stored in packed format and X and B are N-by-NRHS
      * matrices.
      *
      * The Cholesky decomposition is used to factor A as
- * A = U^T * U or A = U^H * U, if UPLO = 'U',
+ * A = U^T * U or A = U^H * U, if UPLO = 'U',
      * A = L * L^T or A = L * L^H, if UPLO = 'L',
      * where U is an upper triangular matrix and L is a lower triangular
      * matrix. The factored form of A is then used to solve the system of
      * equations A * X = B.
- *
- * Only upper or lower triangle of the symmetric matrix A is stored,
- * packed columnwise in a linear array AP.
+ *
+ * Only upper or lower triangle of the symmetric matrix A is stored,
+ * packed columnwise in a linear array AP.
      */
 
     namespace detail {
 
- inline
+ inline
       void ppsv (char const uplo, int const n, int const nrhs,
- float* ap, float* b, int const ldb, int* info)
+ float* ap, float* b, int const ldb, int* info)
       {
         LAPACK_SPPSV (&uplo, &n, &nrhs, ap, b, &ldb, info);
       }
 
- inline
+ inline
       void ppsv (char const uplo, int const n, int const nrhs,
- double* ap, double* b, int const ldb, int* info)
+ double* ap, double* b, int const ldb, int* info)
       {
         LAPACK_DPPSV (&uplo, &n, &nrhs, ap, b, &ldb, info);
       }
 
- inline
+ inline
       void ppsv (char const uplo, int const n, int const nrhs,
- traits::complex_f* ap, traits::complex_f* b, int const ldb,
- int* info)
+ traits::complex_f* ap, traits::complex_f* b, int const ldb,
+ int* info)
       {
- LAPACK_CPPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap),
+ LAPACK_CPPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap),
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void ppsv (char const uplo, int const n, int const nrhs,
- traits::complex_d* ap, traits::complex_d* b, int const ldb,
- int* info)
+ traits::complex_d* ap, traits::complex_d* b, int const ldb,
+ int* info)
       {
- LAPACK_ZPPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap),
+ LAPACK_ZPPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap),
                       traits::complex_ptr (b), &ldb, info);
       }
 
@@ -105,7 +105,7 @@
>::type
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
@@ -115,47 +115,47 @@
       assert (n == traits::matrix_size1 (b));
 
       char uplo = traits::matrix_uplo_tag (a);
- int info;
+ int info;
       detail::ppsv (uplo, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
- traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::matrix_storage (a),
+ traits::matrix_storage (b),
+ traits::leading_dimension (b),
                     &info);
- return info;
+ return info;
     }
 
 
     /*
      * pptrf() computes the Cholesky factorization of a symmetric
- * or Hermitian positive definite matrix A in packed storage.
+ * or Hermitian positive definite matrix A in packed storage.
      * The factorization has the form
- * A = U^T * U or A = U^H * U, if UPLO = 'U',
+ * A = U^T * U or A = U^H * U, if UPLO = 'U',
      * A = L * L^T or A = L * L^H, if UPLO = 'L',
      * where U is an upper triangular matrix and L is lower triangular.
      */
 
     namespace detail {
 
- inline
+ inline
       void pptrf (char const uplo, int const n, float* ap, int* info) {
         LAPACK_SPPTRF (&uplo, &n, ap, info);
       }
 
- inline
+ inline
       void pptrf (char const uplo, int const n, double* ap, int* info) {
         LAPACK_DPPTRF (&uplo, &n, ap, info);
       }
 
- inline
- void pptrf (char const uplo, int const n,
- traits::complex_f* ap, int* info)
+ inline
+ void pptrf (char const uplo, int const n,
+ traits::complex_f* ap, int* info)
       {
         LAPACK_CPPTRF (&uplo, &n, traits::complex_ptr (ap), info);
       }
 
- inline
- void pptrf (char const uplo, int const n,
- traits::complex_d* ap, int* info)
+ inline
+ void pptrf (char const uplo, int const n,
+ traits::complex_d* ap, int* info)
       {
         LAPACK_ZPPTRF (&uplo, &n, traits::complex_ptr (ap), info);
       }
@@ -177,51 +177,51 @@
       int const n = traits::matrix_size1 (a);
       assert (n == traits::matrix_size2 (a));
       char uplo = traits::matrix_uplo_tag (a);
- int info;
+ int info;
       detail::pptrf (uplo, n, traits::matrix_storage (a), &info);
- return info;
+ return info;
     }
 
 
     /*
- * pptrs() solves a system of linear equations A*X = B with
- * a symmetric or Hermitian positive definite matrix A in packed
+ * pptrs() solves a system of linear equations A*X = B with
+ * a symmetric or Hermitian positive definite matrix A in packed
      * storage using the Cholesky factorization computed by pptrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void pptrs (char const uplo, int const n, int const nrhs,
- float const* ap, float* b, int const ldb, int* info)
+ float const* ap, float* b, int const ldb, int* info)
       {
         LAPACK_SPPTRS (&uplo, &n, &nrhs, ap, b, &ldb, info);
       }
 
- inline
+ inline
       void pptrs (char const uplo, int const n, int const nrhs,
- double const* ap, double* b, int const ldb, int* info)
+ double const* ap, double* b, int const ldb, int* info)
       {
         LAPACK_DPPTRS (&uplo, &n, &nrhs, ap, b, &ldb, info);
       }
 
- inline
+ inline
       void pptrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* ap,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* ap,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CPPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (ap),
+ LAPACK_CPPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap),
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void pptrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* ap,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* ap,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZPPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (ap),
+ LAPACK_ZPPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap),
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -238,7 +238,7 @@
>::type
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
@@ -248,17 +248,17 @@
       assert (n == traits::matrix_size1 (b));
       
       char uplo = traits::matrix_uplo_tag (a);
- int info;
+ int info;
       detail::pptrs (uplo, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
+ traits::matrix_storage_const (a),
 #endif
- traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::matrix_storage (b),
+ traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     }
 
 
@@ -270,26 +270,26 @@
     
     namespace detail {
 
- inline
+ inline
       void pptri (char const uplo, int const n, float* ap, int* info) {
         LAPACK_SPPTRI (&uplo, &n, ap, info);
       }
 
- inline
+ inline
       void pptri (char const uplo, int const n, double* ap, int* info) {
         LAPACK_DPPTRI (&uplo, &n, ap, info);
       }
 
- inline
- void pptri (char const uplo, int const n,
- traits::complex_f* ap, int* info)
+ inline
+ void pptri (char const uplo, int const n,
+ traits::complex_f* ap, int* info)
       {
         LAPACK_CPPTRI (&uplo, &n, traits::complex_ptr (ap), info);
       }
 
- inline
- void pptri (char const uplo, int const n,
- traits::complex_d* ap, int* info)
+ inline
+ void pptri (char const uplo, int const n,
+ traits::complex_d* ap, int* info)
       {
         LAPACK_ZPPTRI(&uplo, &n, traits::complex_ptr (ap), info);
       }
@@ -311,9 +311,9 @@
       int const n = traits::matrix_size1 (a);
       assert (n == traits::matrix_size2 (a));
       char uplo = traits::matrix_uplo_tag (a);
- int info;
+ int info;
       detail::pptri (uplo, n, traits::matrix_storage (a), &info);
- return info;
+ return info;
     }
 
 
@@ -321,4 +321,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/ptsv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/ptsv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/ptsv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,5 +1,5 @@
 /*
- *
+ *
  * Copyright (c) Karl Meerbergen 2008
  *
  * Distributed under the Boost Software License, Version 1.0.
@@ -15,13 +15,13 @@
 #include <boost/numeric/bindings/traits/traits.hpp>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -43,32 +43,32 @@
 
     namespace detail {
 
- inline
+ inline
       void ptsv ( int const n, int const nrhs,
- float* d, float* e, float* b, int const ldb, int* info)
+ float* d, float* e, float* b, int const ldb, int* info)
       {
         LAPACK_SPTSV (&n, &nrhs, d, e, b, &ldb, info);
       }
 
- inline
+ inline
       void ptsv ( int const n, int const nrhs,
- double* d, double* e, double* b, int const ldb, int* info)
+ double* d, double* e, double* b, int const ldb, int* info)
       {
         LAPACK_DPTSV (&n, &nrhs, d, e, b, &ldb, info);
       }
 
- inline
+ inline
       void ptsv ( int const n, int const nrhs,
- float* d, traits::complex_f* e, traits::complex_f* b, int const ldb,
- int* info)
+ float* d, traits::complex_f* e, traits::complex_f* b, int const ldb,
+ int* info)
       {
         LAPACK_CPTSV (&n, &nrhs, d, traits::complex_ptr(e), traits::complex_ptr(b), &ldb, info);
       }
 
- inline
+ inline
       void ptsv ( int const n, int const nrhs,
- double* d, traits::complex_d* e, traits::complex_d* b, int const ldb,
- int* info)
+ double* d, traits::complex_d* e, traits::complex_d* b, int const ldb,
+ int* info)
       {
         LAPACK_ZPTSV (&n, &nrhs, d, traits::complex_ptr(e), traits::complex_ptr(b), &ldb, info);
       }
@@ -101,24 +101,24 @@
 
     namespace detail {
 
- inline
+ inline
       void pttrf ( int const n, float* d, float* e, int* info) {
         LAPACK_SPTTRF ( &n, d, e, info) ;
       }
 
- inline
+ inline
       void pttrf ( int const n, double* d, double* e, int* info) {
         LAPACK_DPTTRF ( &n, d, e, info);
       }
 
- inline
- void pttrf ( int const n, float* d, traits::complex_f* e, int* info)
+ inline
+ void pttrf ( int const n, float* d, traits::complex_f* e, int* info)
       {
         LAPACK_CPTTRF ( &n, d, traits::complex_ptr(e), info);
       }
 
- inline
- void pttrf ( int const n, double* d, traits::complex_d* e, int* info)
+ inline
+ void pttrf ( int const n, double* d, traits::complex_d* e, int* info)
       {
         LAPACK_ZPTTRF ( &n, d, traits::complex_ptr(e), info);
       }
@@ -129,9 +129,9 @@
     int pttrf (D& d, E& e) {
       int const n = traits::vector_size (d);
       assert (n == traits::vector_size (e) + 1);
- int info;
+ int info;
       detail::pttrf ( n, traits::vector_storage(d), traits::vector_storage(e), &info);
- return info;
+ return info;
     }
 
 
@@ -146,39 +146,39 @@
 
     namespace detail {
 
- inline
+ inline
       void pttrs (char const uplo, int const n, int const nrhs,
- float const* d, float const* e, float* b, int const ldb, int* info)
+ float const* d, float const* e, float* b, int const ldb, int* info)
       {
         LAPACK_SPTTRS (&n, &nrhs, d, e, b, &ldb, info);
       }
 
- inline
+ inline
       void pttrs (char const uplo, int const n, int const nrhs,
- double const* d, double const* e, double* b, int const ldb, int* info)
+ double const* d, double const* e, double* b, int const ldb, int* info)
       {
         LAPACK_DPTTRS (&n, &nrhs, d, e, b, &ldb, info);
       }
 
- inline
+ inline
       void pttrs (char const uplo, int const n, int const nrhs,
- float const* d,
+ float const* d,
                   traits::complex_f const* e,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CPTTRS (&uplo, &n, &nrhs, d,
- traits::complex_ptr (e),
+ LAPACK_CPTTRS (&uplo, &n, &nrhs, d,
+ traits::complex_ptr (e),
                        traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void pttrs (char const uplo, int const n, int const nrhs,
- double const* d,
- traits::complex_d const* e,
- traits::complex_d* b, int const ldb, int* info)
+ double const* d,
+ traits::complex_d const* e,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZPTTRS (&uplo, &n, &nrhs, d,
- traits::complex_ptr (e),
+ LAPACK_ZPTTRS (&uplo, &n, &nrhs, d,
+ traits::complex_ptr (e),
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -189,19 +189,19 @@
       int const n = traits::vector_size (d);
       assert (n == traits::vector_size (e) + 1);
       assert (n == traits::matrix_num_rows (b));
-
- int info;
+
+ int info;
       detail::pttrs (uplo, n, traits::matrix_num_columns (b),
- traits::vector_storage (d),
- traits::vector_storage (e),
- traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::vector_storage (d),
+ traits::vector_storage (e),
+ traits::matrix_storage (b),
+ traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     } // pttrs()
 
   }
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/spsv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/spsv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/spsv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Kresimir Fresl & Toon Knapen 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -19,14 +19,14 @@
 #include <boost/numeric/bindings/lapack/lapack.h>
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -38,55 +38,55 @@
     /////////////////////////////////////////////////////////////////////
 
     /*
- * spsv() computes the solution to a system of linear equations
- * A * X = B, where A is an N-by-N symmetric matrix stored in packed
+ * spsv() computes the solution to a system of linear equations
+ * A * X = B, where A is an N-by-N symmetric matrix stored in packed
      * format and X and B are N-by-NRHS matrices.
      *
      * The diagonal pivoting method is used to factor A as
- * A = U * D * U^T, if UPLO = 'U',
+ * A = U * D * U^T, if UPLO = 'U',
      * A = L * D * L^T, if UPLO = 'L',
- * where U (or L) is a product of permutation and unit upper
- * (lower) triangular matrices, and D is symmetric and block
- * diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- * The factored form of A is then used to solve the system
+ * where U (or L) is a product of permutation and unit upper
+ * (lower) triangular matrices, and D is symmetric and block
+ * diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+ * The factored form of A is then used to solve the system
      * of equations A * X = B.
      */
 
     namespace detail {
 
- inline
+ inline
       void spsv (char const uplo, int const n, int const nrhs,
- float* ap, int* ipiv,
- float* b, int const ldb, int* info)
+ float* ap, int* ipiv,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SSPSV (&uplo, &n, &nrhs, ap, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void spsv (char const uplo, int const n, int const nrhs,
- double* ap, int* ipiv,
- double* b, int const ldb, int* info)
+ double* ap, int* ipiv,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DSPSV (&uplo, &n, &nrhs, ap, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void spsv (char const uplo, int const n, int const nrhs,
- traits::complex_f* ap, int* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f* ap, int* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CSPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_CSPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void spsv (char const uplo, int const n, int const nrhs,
- traits::complex_d* ap, int* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d* ap, int* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZSPSV (&uplo, &n, &nrhs,
- traits::complex_ptr (ap), ipiv,
+ LAPACK_ZSPSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (ap), ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
@@ -95,28 +95,28 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
           traits::symmetric_packed_t
>::value));
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
           traits::general_t
>::value));
 #endif
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
 
         char uplo = traits::matrix_uplo_tag (a);
- int info;
- spsv (uplo, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
- traits::vector_storage (i),
+ int info;
+ spsv (uplo, n, traits::matrix_size2 (b),
+ traits::matrix_storage (a),
+ traits::vector_storage (i),
               traits::matrix_storage (b),
               traits::leading_dimension (b),
               &info);
- return info;
+ return info;
       }
 
     }
@@ -124,59 +124,59 @@
     template <typename SymmA, typename MatrB, typename IVec>
     inline
     int spsv (SymmA& a, IVec& i, MatrB& b) {
- assert (traits::matrix_size1 (a) == traits::vector_size (i));
- return detail::spsv (a, i, b);
+ assert (traits::matrix_size1 (a) == traits::vector_size (i));
+ return detail::spsv (a, i, b);
     }
 
     template <typename SymmA, typename MatrB>
     int spsv (SymmA& a, MatrB& b) {
       // with 'internal' pivot vector
 
- int info = -101;
- traits::detail::array<int> i (traits::matrix_size1 (a));
+ int info = -101;
+ traits::detail::array<int> i (traits::matrix_size1 (a));
 
- if (i.valid())
- info = detail::spsv (a, i, b);
- return info;
+ if (i.valid())
+ info = detail::spsv (a, i, b);
+ return info;
     }
 
 
     /*
- * sptrf() computes the factorization of a symmetric matrix A
- * in packed storage using the Bunch-Kaufman diagonal pivoting
+ * sptrf() computes the factorization of a symmetric matrix A
+ * in packed storage using the Bunch-Kaufman diagonal pivoting
      * method. The form of the factorization is
      * A = U * D * U^T or A = L * D * L^T
- * where U (or L) is a product of permutation and unit upper (lower)
- * triangular matrices, and D is symmetric and block diagonal with
+ * where U (or L) is a product of permutation and unit upper (lower)
+ * triangular matrices, and D is symmetric and block diagonal with
      * 1-by-1 and 2-by-2 diagonal blocks.
      */
 
     namespace detail {
 
- inline
- void sptrf (char const uplo, int const n,
- float* ap, int* ipiv, int* info)
+ inline
+ void sptrf (char const uplo, int const n,
+ float* ap, int* ipiv, int* info)
       {
         LAPACK_SSPTRF (&uplo, &n, ap, ipiv, info);
       }
 
- inline
- void sptrf (char const uplo, int const n,
- double* ap, int* ipiv, int* info)
+ inline
+ void sptrf (char const uplo, int const n,
+ double* ap, int* ipiv, int* info)
       {
         LAPACK_DSPTRF (&uplo, &n, ap, ipiv, info);
       }
 
- inline
- void sptrf (char const uplo, int const n,
- traits::complex_f* ap, int* ipiv, int* info)
+ inline
+ void sptrf (char const uplo, int const n,
+ traits::complex_f* ap, int* ipiv, int* info)
       {
         LAPACK_CSPTRF (&uplo, &n, traits::complex_ptr (ap), ipiv, info);
       }
 
- inline
- void sptrf (char const uplo, int const n,
- traits::complex_d* ap, int* ipiv, int* info)
+ inline
+ void sptrf (char const uplo, int const n,
+ traits::complex_d* ap, int* ipiv, int* info)
       {
         LAPACK_ZSPTRF (&uplo, &n, traits::complex_ptr (ap), ipiv, info);
       }
@@ -188,65 +188,65 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_packed_t
>::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::vector_size (i));
 
       char uplo = traits::matrix_uplo_tag (a);
- int info;
- detail::sptrf (uplo, n, traits::matrix_storage (a),
+ int info;
+ detail::sptrf (uplo, n, traits::matrix_storage (a),
                      traits::vector_storage (i), &info);
- return info;
+ return info;
     }
 
 
     /*
- * sptrs() solves a system of linear equations A*X = B with
- * a symmetric matrix A in packed storage using the factorization
+ * sptrs() solves a system of linear equations A*X = B with
+ * a symmetric matrix A in packed storage using the factorization
      * A = U * D * U^T or A = L * D * L^T
      * computed by sptrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void sptrs (char const uplo, int const n, int const nrhs,
- float const* a, int const* ipiv,
- float* b, int const ldb, int* info)
+ float const* a, int const* ipiv,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SSPTRS (&uplo, &n, &nrhs, a, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void sptrs (char const uplo, int const n, int const nrhs,
- double const* a, int const* ipiv,
- double* b, int const ldb, int* info)
+ double const* a, int const* ipiv,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DSPTRS (&uplo, &n, &nrhs, a, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void sptrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* a, int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* a, int const* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CSPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), ipiv,
+ LAPACK_CSPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void sptrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* a, int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* a, int const* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZSPTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), ipiv,
+ LAPACK_ZSPTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -257,98 +257,98 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_packed_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
 
       char uplo = traits::matrix_uplo_tag (a);
       int info;
- detail::sptrs (uplo, n, traits::matrix_size2 (b),
+ detail::sptrs (uplo, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
- traits::vector_storage (i),
+ traits::matrix_storage (a),
+ traits::vector_storage (i),
 #else
- traits::matrix_storage_const (a),
- traits::vector_storage_const (i),
+ traits::matrix_storage_const (a),
+ traits::vector_storage_const (i),
 #endif
                      traits::matrix_storage (b),
- traits::leading_dimension (b),
+ traits::leading_dimension (b),
                      &info);
- return info;
+ return info;
     }
 
 
     namespace detail {
- inline
- void sptri (char const uplo, int const n,
- float* ap, int* ipiv, float* work, int* info)
+ inline
+ void sptri (char const uplo, int const n,
+ float* ap, int* ipiv, float* work, int* info)
       {
         LAPACK_SSPTRI (&uplo, &n, ap, ipiv, work, info);
       }
 
- inline
- void sptri (char const uplo, int const n,
- double* ap, int* ipiv, double* work, int* info)
+ inline
+ void sptri (char const uplo, int const n,
+ double* ap, int* ipiv, double* work, int* info)
       {
         LAPACK_DSPTRI (&uplo, &n, ap, ipiv, work, info);
       }
 
- inline
- void sptri (char const uplo, int const n,
- traits::complex_f* ap, int* ipiv, traits::complex_f* work, int* info)
+ inline
+ void sptri (char const uplo, int const n,
+ traits::complex_f* ap, int* ipiv, traits::complex_f* work, int* info)
       {
- LAPACK_CSPTRI (&uplo, &n, traits::complex_ptr (ap),
+ LAPACK_CSPTRI (&uplo, &n, traits::complex_ptr (ap),
             ipiv, traits::complex_ptr (work), info);
       }
 
- inline
- void sptri (char const uplo, int const n,
- traits::complex_d* ap, int* ipiv, traits::complex_d* work, int* info)
+ inline
+ void sptri (char const uplo, int const n,
+ traits::complex_d* ap, int* ipiv, traits::complex_d* work, int* info)
       {
- LAPACK_ZSPTRI (&uplo, &n, traits::complex_ptr (ap),
+ LAPACK_ZSPTRI (&uplo, &n, traits::complex_ptr (ap),
             ipiv, traits::complex_ptr (work), info);
       }
     } // namespace detail
 
     template <typename SymmA, typename IVec>
- int sptri (SymmA& a, IVec& ipiv)
+ int sptri (SymmA& a, IVec& ipiv)
     {
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_packed_t
>::value));
 #endif
 
       int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (ipiv));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::vector_size (ipiv));
 
       char uplo = traits::matrix_uplo_tag (a);
- int info;
+ int info;
 
       typedef typename SymmA::value_type value_type;
       traits::detail::array<value_type> work(traits::matrix_size1(a));
 
- detail::sptri (uplo, n, traits::matrix_storage (a),
+ detail::sptri (uplo, n, traits::matrix_storage (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
 #else
- traits::vector_storage_const (ipiv),
+ traits::vector_storage_const (ipiv),
 #endif
           traits::vector_storage (work),
           &info);
- return info;
+ return info;
     }
 
   } // namespace lapack
@@ -358,4 +358,4 @@
 
 
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/steqr.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/steqr.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/steqr.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,8 +1,8 @@
 //
 // Copyright Karl Meerbergen 2007
 //
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
@@ -17,10 +17,10 @@
 #include <boost/numeric/bindings/traits/traits.hpp>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 
   /********************************************************************/
@@ -34,14 +34,14 @@
 
     namespace detail {
 
- inline
- void steqr ( char compz, int n, float* d, float* e, float* z, int ldz, float* work, int& info )
+ inline
+ void steqr ( char compz, int n, float* d, float* e, float* z, int ldz, float* work, int& info )
       {
         LAPACK_SSTEQR( &compz, &n, d, e, z, &ldz, work, &info ) ;
       }
 
- inline
- void steqr ( char compz, int n, double* d, double* e, double* z, int ldz, double* work, int& info )
+ inline
+ void steqr ( char compz, int n, double* d, double* e, double* z, int ldz, double* work, int& info )
       {
         LAPACK_DSTEQR( &compz, &n, d, e, z, &ldz, work, &info ) ;
       }
@@ -60,15 +60,15 @@
 
       int lwork = traits::vector_size( work ) ;
 
- int info;
+ int info;
       detail::steqr( compz, n,
- traits::vector_storage( d ),
- traits::vector_storage( e ),
- traits::matrix_storage( z ),
- traits::leading_dimension( z ),
- traits::vector_storage( work ),
+ traits::vector_storage( d ),
+ traits::vector_storage( e ),
+ traits::matrix_storage( z ),
+ traits::leading_dimension( z ),
+ traits::vector_storage( work ),
                      info ) ;
- return info;
+ return info;
     } // steqr()
 
 

Modified: sandbox/boost/numeric/bindings/lapack/syev.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/syev.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/syev.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen, Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,25 +20,25 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 #include <cassert>
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Eigendecomposition of a real symmetric matrix A = Q * D * Q'
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * syev() computes the eigendecomposition of a N x N matrix
      * A = Q * D * Q', where Q is a N x N orthogonal matrix and
      * D is a diagonal matrix. The diagonal elements D(i,i) is an
@@ -52,22 +52,22 @@
      * 'N' : do not compute eigenvectors
      * uplo : 'U' : only the upper triangular part of A is used on input.
      * 'L' : only the lower triangular part of A is used on input.
- */
+ */
 
     namespace detail {
 
- inline
+ inline
       void syev (char const jobz, char const uplo, int const n,
                  float* a, int const lda,
- float* w, float* work, int const lwork, int& info)
+ float* w, float* work, int const lwork, int& info)
       {
         LAPACK_SSYEV (&jobz, &uplo, &n, a, &lda, w, work, &lwork, &info);
       }
 
- inline
+ inline
       void syev (char const jobz, char const uplo, int const n,
                  double* a, int const lda,
- double* w, double* work, int const lwork, int& info)
+ double* w, double* work, int const lwork, int& info)
       {
         LAPACK_DSYEV (&jobz, &uplo, &n, a, &lda, w, work, &lwork, &info);
       }
@@ -76,31 +76,31 @@
       template <typename A, typename W, typename Work>
       int syev (char jobz, char uplo, A& a, W& w, Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
         BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<A>::matrix_structure,
+ typename traits::matrix_traits<A>::matrix_structure,
           traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
         int const n = traits::matrix_size1 (a);
         assert ( n>0 );
- assert (traits::matrix_size2 (a)==n);
- assert (traits::leading_dimension (a)>=n);
- assert (traits::vector_size (w)==n);
- assert (3*n-1 <= traits::vector_size (work));
+ assert (traits::matrix_size2 (a)==n);
+ assert (traits::leading_dimension (a)>=n);
+ assert (traits::vector_size (w)==n);
+ assert (3*n-1 <= traits::vector_size (work));
         assert ( uplo=='U' || uplo=='L' );
         assert ( jobz=='N' || jobz=='V' );
 
- int info;
+ int info;
         detail::syev (jobz, uplo, n,
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
                      traits::leading_dimension (a),
- traits::vector_storage (w),
+ traits::vector_storage (w),
                      traits::vector_storage (work),
                      traits::vector_size (work),
                      info);
- return info;
+ return info;
       }
     } // namespace detail
 
@@ -137,8 +137,8 @@
        return detail::syev(jobz, uplo, a, w, workspace.w_);
     } // syev()
 
- // Function without workarray as argument
- template <typename A, typename W>
+ // Function without workarray as argument
+ template <typename A, typename W>
     inline
     int syev (char jobz, char uplo, A& a, W& w) {
        return syev(jobz, uplo, a, w, optimal_workspace());
@@ -153,7 +153,7 @@
 
        int const n = traits::matrix_size1 (a);
        char uplo = traits::matrix_uplo_tag( a ) ;
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
        typedef typename traits::matrix_traits<A>::matrix_structure matrix_structure ;
        BOOST_STATIC_ASSERT( (boost::mpl::or_< boost::is_same< matrix_structure, traits::symmetric_t >
                                             , boost::is_same< matrix_structure, traits::hermitian_t >
@@ -173,7 +173,7 @@
 
        int const n = traits::matrix_size1 (a);
        char uplo = traits::matrix_uplo_tag( a ) ;
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
        typedef typename traits::matrix_traits<A>::matrix_structure matrix_structure ;
        BOOST_STATIC_ASSERT( (boost::mpl::or_< boost::is_same< matrix_structure, traits::symmetric_t >
                                             , boost::is_same< matrix_structure, traits::hermitian_t >
@@ -190,7 +190,7 @@
     int syev (char jobz, A& a, W& w, detail::workspace1<Work> workspace ) {
        typedef typename A::value_type value_type ;
        char uplo = traits::matrix_uplo_tag( a ) ;
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
        typedef typename traits::matrix_traits<A>::matrix_structure matrix_structure ;
        BOOST_STATIC_ASSERT( (boost::mpl::or_< boost::is_same< matrix_structure, traits::symmetric_t >
                                             , boost::is_same< matrix_structure, traits::hermitian_t >
@@ -200,12 +200,12 @@
        return detail::syev(jobz, uplo, a, w, workspace.w_);
     } // syev()
 
- // Function without workarray as argument
- template <typename A, typename W>
+ // Function without workarray as argument
+ template <typename A, typename W>
     inline
     int syev (char jobz, A& a, W& w) {
        char uplo = traits::matrix_uplo_tag( a ) ;
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
        typedef typename traits::matrix_traits<A>::matrix_structure matrix_structure ;
        BOOST_STATIC_ASSERT( (boost::mpl::or_< boost::is_same< matrix_structure, traits::symmetric_t >
                                             , boost::is_same< matrix_structure, traits::hermitian_t >
@@ -221,4 +221,4 @@
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/syevd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/syevd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/syevd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) Thomas Klimpel 2008
 //
 // Distributed under the Boost Software License, Version 1.0.
@@ -11,7 +11,7 @@
 
 #include <boost/numeric/bindings/lapack/heevd.hpp>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
   namespace lapack {
 
     template <typename A, typename W, typename Work>
@@ -20,7 +20,7 @@
       char jobz, char uplo, A& a,
       W& w, Work work = optimal_workspace() ) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       typedef typename A::value_type value_type ;
       typedef typename traits::type_traits< value_type >::real_type real_type ;
       BOOST_STATIC_ASSERT((boost::is_same<value_type, real_type>::value));

Modified: sandbox/boost/numeric/bindings/lapack/syevx.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/syevx.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/syevx.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,4 +1,4 @@
-//
+//
 // Copyright (c) Thomas Klimpel 2008
 //
 // Distributed under the Boost Software License, Version 1.0.
@@ -11,14 +11,14 @@
 
 #include <boost/numeric/bindings/lapack/heevx.hpp>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
   namespace lapack {
     template <typename A, typename T, typename W, typename Z, typename IFail, typename Work>
     int syevx (
       char jobz, char range, A& a, T vl, T vu, int il, int iu, T abstol, int& m,
       W& w, Z& z, IFail& ifail, Work work = optimal_workspace() ) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       typedef typename A::value_type value_type ;
       typedef typename traits::type_traits< value_type >::real_type real_type ;
       BOOST_STATIC_ASSERT((boost::is_same<value_type, real_type>::value));

Modified: sandbox/boost/numeric/bindings/lapack/sygv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/sygv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/sygv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -11,13 +11,13 @@
 
 #include <boost/numeric/bindings/lapack/hegv.hpp>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
   namespace lapack {
 
     template <typename A, typename B, typename W, typename Work>
     int sygv (int itype, char jobz, char uplo, A& a, B& b, W& w, Work work = optimal_workspace()) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       typedef typename A::value_type value_type ;
       typedef typename traits::type_traits< value_type >::real_type real_type ;
       BOOST_STATIC_ASSERT((boost::is_same<value_type, real_type>::value));

Modified: sandbox/boost/numeric/bindings/lapack/sysv.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/sysv.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/sysv.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -23,14 +23,14 @@
 #include <boost/numeric/bindings/lapack/workspace.hpp>
 
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 #include <cassert>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
@@ -42,108 +42,108 @@
 
     namespace detail {
 
- inline
- int sytrf_block (float, int const ispec, char const ul, int const n)
+ inline
+ int sytrf_block (float, int const ispec, char const ul, int const n)
       {
         char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "SSYTRF", ul2, n);
+ return ilaenv (ispec, "SSYTRF", ul2, n);
       }
- inline
+ inline
       int sytrf_block (double, int const ispec, char const ul, int const n) {
- char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "DSYTRF", ul2, n);
+ char ul2[2] = "x"; ul2[0] = ul;
+ return ilaenv (ispec, "DSYTRF", ul2, n);
       }
- inline
- int sytrf_block (traits::complex_f,
- int const ispec, char const ul, int const n)
+ inline
+ int sytrf_block (traits::complex_f,
+ int const ispec, char const ul, int const n)
+ {
+ char ul2[2] = "x"; ul2[0] = ul;
+ return ilaenv (ispec, "CSYTRF", ul2, n);
+ }
+ inline
+ int sytrf_block (traits::complex_d,
+ int const ispec, char const ul, int const n)
       {
- char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "CSYTRF", ul2, n);
- }
- inline
- int sytrf_block (traits::complex_d,
- int const ispec, char const ul, int const n)
- {
- char ul2[2] = "x"; ul2[0] = ul;
- return ilaenv (ispec, "ZSYTRF", ul2, n);
+ char ul2[2] = "x"; ul2[0] = ul;
+ return ilaenv (ispec, "ZSYTRF", ul2, n);
       }
     }
 
 
     template <typename SymmA>
- int sytrf_block (char const q, char const ul, SymmA const& a)
+ int sytrf_block (char const q, char const ul, SymmA const& a)
     {
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
- assert (ul == 'U' || ul == 'L');
+ assert (q == 'O' || q == 'M');
+ assert (ul == 'U' || ul == 'L');
 
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- int ispec = (q == 'O' ? 1 : 2);
- return detail::sytrf_block (val_t(), ispec, ul, n);
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ int ispec = (q == 'O' ? 1 : 2);
+ return detail::sytrf_block (val_t(), ispec, ul, n);
     }
 
     template <typename SymmA>
- int sytrf_block (char const q, SymmA const& a)
+ int sytrf_block (char const q, SymmA const& a)
     {
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
+ assert (q == 'O' || q == 'M');
 
       char ul = traits::matrix_uplo_tag (a);
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- int ispec = (q == 'O' ? 1 : 2);
- return detail::sytrf_block (val_t(), ispec, ul, n);
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ int ispec = (q == 'O' ? 1 : 2);
+ return detail::sytrf_block (val_t(), ispec, ul, n);
     }
 
     template <typename SymmA>
- int sytrf_work (char const q, char const ul, SymmA const& a)
+ int sytrf_work (char const q, char const ul, SymmA const& a)
     {
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
- assert (ul == 'U' || ul == 'L');
+ assert (q == 'O' || q == 'M');
+ assert (ul == 'U' || ul == 'L');
 
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- int lw = -13;
- if (q == 'M')
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ int lw = -13;
+ if (q == 'M')
         lw = 1;
- if (q == 'O')
- lw = n * detail::sytrf_block (val_t(), 1, ul, n);
- return lw;
+ if (q == 'O')
+ lw = n * detail::sytrf_block (val_t(), 1, ul, n);
+ return lw;
     }
 
     template <typename SymmA>
@@ -151,34 +151,34 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
 #endif
- assert (q == 'O' || q == 'M');
+ assert (q == 'O' || q == 'M');
 
       char ul = traits::matrix_uplo_tag (a);
- int n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ int n = traits::matrix_size1 (a);
+ assert (n == traits::matrix_size2 (a));
 
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- int lw = -13;
- if (q == 'M')
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ int lw = -13;
+ if (q == 'M')
         lw = 1;
- if (q == 'O')
- lw = n * detail::sytrf_block (val_t(), 1, ul, n);
- return lw;
+ if (q == 'O')
+ lw = n * detail::sytrf_block (val_t(), 1, ul, n);
+ return lw;
     }
 
 
     template <typename SymmA>
     inline
     int sysv_work (char const q, char const ul, SymmA const& a) {
- return sytrf_work (q, ul, a);
+ return sytrf_work (q, ul, a);
     }
 
     template <typename SymmA>
@@ -187,107 +187,107 @@
 
 
     /*
- * sysv() computes the solution to a system of linear equations
- * A * X = B, where A is an N-by-N symmetric matrix and X and B
+ * sysv() computes the solution to a system of linear equations
+ * A * X = B, where A is an N-by-N symmetric matrix and X and B
      * are N-by-NRHS matrices.
      *
      * The diagonal pivoting method is used to factor A as
- * A = U * D * U^T, if UPLO = 'U',
+ * A = U * D * U^T, if UPLO = 'U',
      * A = L * D * L^T, if UPLO = 'L',
- * where U (or L) is a product of permutation and unit upper
- * (lower) triangular matrices, and D is symmetric and block
- * diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- * The factored form of A is then used to solve the system
+ * where U (or L) is a product of permutation and unit upper
+ * (lower) triangular matrices, and D is symmetric and block
+ * diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+ * The factored form of A is then used to solve the system
      * of equations A * X = B.
      */
 
- namespace detail
+ namespace detail
     {
 
- inline
+ inline
       void sysv (char const uplo, int const n, int const nrhs,
- float* a, int const lda, int* ipiv,
- float* b, int const ldb,
- float* w, int const lw, int* info)
+ float* a, int const lda, int* ipiv,
+ float* b, int const ldb,
+ float* w, int const lw, int* info)
       {
         LAPACK_SSYSV (&uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, w, &lw, info);
       }
 
- inline
+ inline
       void sysv (char const uplo, int const n, int const nrhs,
- double* a, int const lda, int* ipiv,
- double* b, int const ldb,
- double* w, int const lw, int* info)
+ double* a, int const lda, int* ipiv,
+ double* b, int const ldb,
+ double* w, int const lw, int* info)
       {
         LAPACK_DSYSV (&uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, w, &lw, info);
       }
 
- inline
+ inline
       void sysv (char const uplo, int const n, int const nrhs,
- traits::complex_f* a, int const lda, int* ipiv,
- traits::complex_f* b, int const ldb,
- traits::complex_f* w, int const lw, int* info)
- {
- LAPACK_CSYSV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
- traits::complex_ptr (b), &ldb,
+ traits::complex_f* a, int const lda, int* ipiv,
+ traits::complex_f* b, int const ldb,
+ traits::complex_f* w, int const lw, int* info)
+ {
+ LAPACK_CSYSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
+ traits::complex_ptr (b), &ldb,
                       traits::complex_ptr (w), &lw, info);
       }
 
- inline
+ inline
       void sysv (char const uplo, int const n, int const nrhs,
- traits::complex_d* a, int const lda, int* ipiv,
- traits::complex_d* b, int const ldb,
- traits::complex_d* w, int const lw, int* info)
- {
- LAPACK_ZSYSV (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
- traits::complex_ptr (b), &ldb,
+ traits::complex_d* a, int const lda, int* ipiv,
+ traits::complex_d* b, int const ldb,
+ traits::complex_d* w, int const lw, int* info)
+ {
+ LAPACK_ZSYSV (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
+ traits::complex_ptr (b), &ldb,
                       traits::complex_ptr (w), &lw, info);
       }
 
       template <typename SymmA, typename MatrB, typename IVec, typename Work>
- int sysv (char const ul, SymmA& a, IVec& i, MatrB& b, Work& w)
+ int sysv (char const ul, SymmA& a, IVec& i, MatrB& b, Work& w)
       {
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
-
- int info;
- sysv (ul, n, traits::matrix_size2 (b),
- traits::matrix_storage (a),
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
+
+ int info;
+ sysv (ul, n, traits::matrix_size2 (b),
+ traits::matrix_storage (a),
               traits::leading_dimension (a),
- traits::vector_storage (i),
+ traits::vector_storage (i),
               traits::matrix_storage (b),
               traits::leading_dimension (b),
- traits::vector_storage (w),
- traits::vector_size (w),
+ traits::vector_storage (w),
+ traits::vector_size (w),
               &info);
- return info;
+ return info;
       }
 
     }
 
     template <typename SymmA, typename MatrB, typename IVec, typename Work>
     inline
- int sysv (char const ul, SymmA& a, IVec& i, MatrB& b, Work& w)
+ int sysv (char const ul, SymmA& a, IVec& i, MatrB& b, Work& w)
     {
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- assert (traits::vector_size (w) >= 1);
- return detail::sysv (ul, a, i, b, w);
+ assert (traits::vector_size (w) >= 1);
+ return detail::sysv (ul, a, i, b, w);
     }
 
     template <typename SymmA, typename MatrB, typename IVec, typename Work>
@@ -296,141 +296,141 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- assert (traits::vector_size (w) >= 1);
+ assert (traits::vector_size (w) >= 1);
       char uplo = traits::matrix_uplo_tag (a);
- return detail::sysv (uplo, a, i, b, w);
+ return detail::sysv (uplo, a, i, b, w);
     }
 
     template <typename SymmA, typename MatrB>
- int sysv (char const ul, SymmA& a, MatrB& b)
+ int sysv (char const ul, SymmA& a, MatrB& b)
     {
- // with 'internal' pivot and work vectors
+ // with 'internal' pivot and work vectors
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const n = traits::matrix_size1 (a);
- int info = -101;
- traits::detail::array<int> i (n);
+ int const n = traits::matrix_size1 (a);
+ int info = -101;
+ traits::detail::array<int> i (n);
 
       if (i.valid()) {
- info = -102;
- int lw = sytrf_work ('O', ul, a);
- assert (lw >= 1); // paranoia ?
+ info = -102;
+ int lw = sytrf_work ('O', ul, a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::sysv (ul, a, i, b, w);
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::sysv (ul, a, i, b, w);
       }
- return info;
+ return info;
     }
 
     template <typename SymmA, typename MatrB>
- int sysv (SymmA& a, MatrB& b)
+ int sysv (SymmA& a, MatrB& b)
     {
- // with 'internal' pivot and work vectors
+ // with 'internal' pivot and work vectors
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int const n = traits::matrix_size1 (a);
+ int const n = traits::matrix_size1 (a);
       char uplo = traits::matrix_uplo_tag (a);
- int info = -101;
- traits::detail::array<int> i (n);
+ int info = -101;
+ traits::detail::array<int> i (n);
 
       if (i.valid()) {
- info = -102;
- int lw = sytrf_work ('O', a);
- assert (lw >= 1); // paranoia ?
+ info = -102;
+ int lw = sytrf_work ('O', a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::sysv (uplo, a, i, b, w);
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::sysv (uplo, a, i, b, w);
       }
- return info;
+ return info;
     }
 
 
     /*
      * sytrf() computes the factorization of a symmetric matrix A using
- * the Bunch-Kaufman diagonal pivoting method. The form of the
+ * the Bunch-Kaufman diagonal pivoting method. The form of the
      * factorization is
      * A = U * D * U^T or A = L * D * L^T
- * where U (or L) is a product of permutation and unit upper (lower)
- * triangular matrices, and D is symmetric and block diagonal with
+ * where U (or L) is a product of permutation and unit upper (lower)
+ * triangular matrices, and D is symmetric and block diagonal with
      * 1-by-1 and 2-by-2 diagonal blocks.
      */
 
- namespace detail
+ namespace detail
     {
- inline
- void sytrf (char const uplo, int const n,
- float* a, int const lda, int* ipiv,
- float* w, int const lw, int* info)
+ inline
+ void sytrf (char const uplo, int const n,
+ float* a, int const lda, int* ipiv,
+ float* w, int const lw, int* info)
       {
         LAPACK_SSYTRF (&uplo, &n, a, &lda, ipiv, w, &lw, info);
       }
 
- inline
- void sytrf (char const uplo, int const n,
- double* a, int const lda, int* ipiv,
- double* w, int const lw, int* info)
+ inline
+ void sytrf (char const uplo, int const n,
+ double* a, int const lda, int* ipiv,
+ double* w, int const lw, int* info)
       {
         LAPACK_DSYTRF (&uplo, &n, a, &lda, ipiv, w, &lw, info);
       }
 
- inline
- void sytrf (char const uplo, int const n,
- traits::complex_f* a, int const lda, int* ipiv,
- traits::complex_f* w, int const lw, int* info)
+ inline
+ void sytrf (char const uplo, int const n,
+ traits::complex_f* a, int const lda, int* ipiv,
+ traits::complex_f* w, int const lw, int* info)
       {
- LAPACK_CSYTRF (&uplo, &n,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CSYTRF (&uplo, &n,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (w), &lw, info);
       }
 
- inline
- void sytrf (char const uplo, int const n,
- traits::complex_d* a, int const lda, int* ipiv,
- traits::complex_d* w, int const lw, int* info)
+ inline
+ void sytrf (char const uplo, int const n,
+ traits::complex_d* a, int const lda, int* ipiv,
+ traits::complex_d* w, int const lw, int* info)
       {
- LAPACK_ZSYTRF (&uplo, &n,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZSYTRF (&uplo, &n,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (w), &lw, info);
       }
 
@@ -438,154 +438,154 @@
       int sytrf (char const ul, SymmA& a, IVec& i, Work& w) {
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::vector_size (i));
 
- int info;
- sytrf (ul, n, traits::matrix_storage (a),
+ int info;
+ sytrf (ul, n, traits::matrix_storage (a),
                traits::leading_dimension (a),
- traits::vector_storage (i),
- traits::vector_storage (w),
- traits::vector_size (w),
+ traits::vector_storage (i),
+ traits::vector_storage (w),
+ traits::vector_size (w),
                &info);
- return info;
+ return info;
       }
 
     }
 
     template <typename SymmA, typename IVec, typename Work>
     inline
- int sytrf (char const ul, SymmA& a, IVec& i, Work& w)
+ int sytrf (char const ul, SymmA& a, IVec& i, Work& w)
     {
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- assert (traits::vector_size (w) >= 1);
- return detail::sytrf (ul, a, i, w);
+ assert (traits::vector_size (w) >= 1);
+ return detail::sytrf (ul, a, i, w);
     }
 
     template <typename SymmA, typename IVec, typename Work>
     inline
- int sytrf (SymmA& a, IVec& i, Work& w)
+ int sytrf (SymmA& a, IVec& i, Work& w)
     {
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
 #endif
 
- assert (traits::vector_size (w) >= 1);
+ assert (traits::vector_size (w) >= 1);
       char uplo = traits::matrix_uplo_tag (a);
- return detail::sytrf (uplo, a, i, w);
+ return detail::sytrf (uplo, a, i, w);
     }
 
     template <typename SymmA, typename Ivec>
- int sytrf (char const ul, SymmA& a, Ivec& i)
+ int sytrf (char const ul, SymmA& a, Ivec& i)
     {
       // with 'internal' work vector
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- int info = -101;
- int lw = sytrf_work ('O', ul, a);
- assert (lw >= 1); // paranoia ?
+ int info = -101;
+ int lw = sytrf_work ('O', ul, a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::sytrf (ul, a, i, w);
- return info;
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::sytrf (ul, a, i, w);
+ return info;
     }
 
     template <typename SymmA, typename Ivec>
- int sytrf (SymmA& a, Ivec& i)
+ int sytrf (SymmA& a, Ivec& i)
     {
- // with 'internal' work vector
+ // with 'internal' work vector
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- int info = -101;
- int lw = sytrf_work ('O', a);
- assert (lw >= 1); // paranoia ?
+ int info = -101;
+ int lw = sytrf_work ('O', a);
+ assert (lw >= 1); // paranoia ?
 #ifndef BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS
- typedef typename traits::matrix_traits<SymmA>::value_type val_t;
-#else
- typedef typename SymmA::value_type val_t;
-#endif
- traits::detail::array<val_t> w (lw);
- if (w.valid())
- info = detail::sytrf (uplo, a, i, w);
- return info;
+ typedef typename traits::matrix_traits<SymmA>::value_type val_t;
+#else
+ typedef typename SymmA::value_type val_t;
+#endif
+ traits::detail::array<val_t> w (lw);
+ if (w.valid())
+ info = detail::sytrf (uplo, a, i, w);
+ return info;
     }
 
 
     /*
- * sytrs() solves a system of linear equations A*X = B with
- * a symmetric matrix A using the factorization
+ * sytrs() solves a system of linear equations A*X = B with
+ * a symmetric matrix A using the factorization
      * A = U * D * U^T or A = L * D * L^T
      * computed by sytrf().
      */
 
     namespace detail {
 
- inline
+ inline
       void sytrs (char const uplo, int const n, int const nrhs,
- float const* a, int const lda, int const* ipiv,
- float* b, int const ldb, int* info)
+ float const* a, int const lda, int const* ipiv,
+ float* b, int const ldb, int* info)
       {
         LAPACK_SSYTRS (&uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void sytrs (char const uplo, int const n, int const nrhs,
- double const* a, int const lda, int const* ipiv,
- double* b, int const ldb, int* info)
+ double const* a, int const lda, int const* ipiv,
+ double* b, int const ldb, int* info)
       {
         LAPACK_DSYTRS (&uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, info);
       }
 
- inline
+ inline
       void sytrs (char const uplo, int const n, int const nrhs,
- traits::complex_f const* a, int const lda,
- int const* ipiv,
- traits::complex_f* b, int const ldb, int* info)
+ traits::complex_f const* a, int const lda,
+ int const* ipiv,
+ traits::complex_f* b, int const ldb, int* info)
       {
- LAPACK_CSYTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CSYTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                       traits::complex_ptr (b), &ldb, info);
       }
 
- inline
+ inline
       void sytrs (char const uplo, int const n, int const nrhs,
- traits::complex_d const* a, int const lda,
- int const* ipiv,
- traits::complex_d* b, int const ldb, int* info)
+ traits::complex_d const* a, int const lda,
+ int const* ipiv,
+ traits::complex_d* b, int const ldb, int* info)
       {
- LAPACK_ZSYTRS (&uplo, &n, &nrhs,
- traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_ZSYTRS (&uplo, &n, &nrhs,
+ traits::complex_ptr (a), &lda, ipiv,
                        traits::complex_ptr (b), &ldb, info);
       }
 
@@ -593,26 +593,26 @@
       int sytrs (char const ul, SymmA const& a, IVec const& i, MatrB& b) {
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
- assert (n == traits::matrix_size1 (b));
- assert (n == traits::vector_size (i));
+ assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size1 (b));
+ assert (n == traits::vector_size (i));
 
- int info;
- sytrs (ul, n, traits::matrix_size2 (b),
+ int info;
+ sytrs (ul, n, traits::matrix_size2 (b),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::matrix_storage (a),
+ traits::matrix_storage (a),
 #else
- traits::matrix_storage_const (a),
-#endif
+ traits::matrix_storage_const (a),
+#endif
                traits::leading_dimension (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (i),
+ traits::vector_storage (i),
 #else
- traits::vector_storage_const (i),
+ traits::vector_storage_const (i),
 #endif
                traits::matrix_storage (b),
                traits::leading_dimension (b), &info);
- return info;
+ return info;
       }
 
     }
@@ -621,20 +621,20 @@
     inline
     int sytrs (char const ul, SymmA const& a, IVec const& i, MatrB& b) {
 
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::general_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
- return detail::sytrs (ul, a, i, b);
+ return detail::sytrs (ul, a, i, b);
     }
 
     template <typename SymmA, typename MatrB, typename IVec>
@@ -643,71 +643,71 @@
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrB>::matrix_structure,
+ typename traits::matrix_traits<MatrB>::matrix_structure,
         traits::general_t
>::value));
 #endif
 
       char uplo = traits::matrix_uplo_tag (a);
- return detail::sytrs (uplo, a, i, b);
+ return detail::sytrs (uplo, a, i, b);
     }
 
 
 
- namespace detail
+ namespace detail
     {
- inline
- void sytri (char const uplo, int const n, float* a, int const lda,
- int const* ipiv, float* work, int* info)
+ inline
+ void sytri (char const uplo, int const n, float* a, int const lda,
+ int const* ipiv, float* work, int* info)
       {
         LAPACK_SSYTRI (&uplo, &n, a, &lda, ipiv, work, info);
       }
 
- inline
- void sytri (char const uplo, int const n, double* a, int const lda,
- int const* ipiv, double* work, int* info)
+ inline
+ void sytri (char const uplo, int const n, double* a, int const lda,
+ int const* ipiv, double* work, int* info)
       {
         LAPACK_DSYTRI (&uplo, &n, a, &lda, ipiv, work, info);
       }
 
- inline
- void sytri (char const uplo, int const n, traits::complex_f* a,
- int const lda, int const* ipiv, traits::complex_f* work, int* info)
+ inline
+ void sytri (char const uplo, int const n, traits::complex_f* a,
+ int const lda, int const* ipiv, traits::complex_f* work, int* info)
       {
- LAPACK_CSYTRI (&uplo, &n, traits::complex_ptr (a), &lda, ipiv,
+ LAPACK_CSYTRI (&uplo, &n, traits::complex_ptr (a), &lda, ipiv,
             traits::complex_ptr (work), info);
       }
 
- inline
- void sytri (char const uplo, int const n, traits::complex_d* a,
- int const lda, int const* ipiv, traits::complex_d* work, int* info)
+ inline
+ void sytri (char const uplo, int const n, traits::complex_d* a,
+ int const lda, int const* ipiv, traits::complex_d* work, int* info)
       {
         LAPACK_ZSYTRI (&uplo, &n, traits::complex_ptr (a), &lda, ipiv,
             traits::complex_ptr (work), info);
       }
 
       template <typename SymmA, typename IVec, typename Work>
- int sytri (char const ul, SymmA& a, IVec const& ipiv, Work& work)
+ int sytri (char const ul, SymmA& a, IVec const& ipiv, Work& work)
       {
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
         int const n = traits::matrix_size1 (a);
- assert (n == traits::matrix_size2 (a));
+ assert (n == traits::matrix_size2 (a));
         assert (n == traits::vector_size (ipiv));
         assert (n == traits::vector_size (work));
 
         int info;
         //const double* dummy = traits::matrix_storage (a);
- detail::sytri (ul, n, traits::matrix_storage (a),
+ detail::sytri (ul, n, traits::matrix_storage (a),
             traits::leading_dimension (a),
 #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
- traits::vector_storage (ipiv),
+ traits::vector_storage (ipiv),
 #else
- traits::vector_storage_const (ipiv),
+ traits::vector_storage_const (ipiv),
 #endif
             traits::vector_storage (work),
             &info);
@@ -719,13 +719,13 @@
 
     //Internal allocation of workspace, general matrix with up/low tag
     template <typename SymmA, typename IVec>
- int sytri (char const ul, SymmA& a, IVec const& ipiv)
+ int sytri (char const ul, SymmA& a, IVec const& ipiv)
     {
- assert (ul == 'U' || ul == 'L');
+ assert (ul == 'U' || ul == 'L');
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
             traits::general_t
>::value));
 #endif
@@ -734,25 +734,25 @@
       int n = traits::matrix_size1(a);
       traits::detail::array<value_type> work(std::max<int>(1,n));
 
- return detail::sytri (ul, a, ipiv, work);
+ return detail::sytri (ul, a, ipiv, work);
     }
 
     //Internal allocation of workspace, symmetric matrix
 
- /*Warning: the function will work only if SymmA is a
+ /*Warning: the function will work only if SymmA is a
       symmetric_adaptor. With SymmA = symmetric_matrix a
       boost::STATIC_ASSERTION_FAILURE will be thrown at compile
- time, because symmetric_matrix has a symmetric_packed_t
+ time, because symmetric_matrix has a symmetric_packed_t
       structure instead of symmetric_t. Use sptri() for
       symmetric packed matrices.
- */
+ */
     template <typename SymmA, typename IVec>
- int sytri (SymmA& a, IVec const& ipiv)
+ int sytri (SymmA& a, IVec const& ipiv)
     {
 
 #ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<SymmA>::matrix_structure,
+ typename traits::matrix_traits<SymmA>::matrix_structure,
         traits::symmetric_t
>::value));
 #endif
@@ -762,11 +762,11 @@
       traits::detail::array<value_type> work(std::max<int>(1,n));
 
       char uplo = traits::matrix_uplo_tag (a);
- return detail::sytri (uplo, a, ipiv, work);
- }
+ return detail::sytri (uplo, a, ipiv, work);
+ }
 
   } // namespace lapack
 
 }}} // namespace boost::numeric::bindings
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/sytrd.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/sytrd.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/sytrd.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,8 +1,8 @@
 //
 // Copyright Karl Meerbergen 2007
 //
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
@@ -17,10 +17,10 @@
 #include <boost/numeric/bindings/traits/traits.hpp>
 #include <boost/numeric/bindings/lapack/lapack.h>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits/is_same.hpp>
-#endif
+#endif
 
 
   /********************************************************************/
@@ -34,14 +34,14 @@
 
     namespace detail {
 
- inline
- void sytrd ( char uplo, int n, float* a, int lda, float* d, float* e, float* tau, float* work, int lwork, int& info )
+ inline
+ void sytrd ( char uplo, int n, float* a, int lda, float* d, float* e, float* tau, float* work, int lwork, int& info )
       {
         LAPACK_SSYTRD( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info ) ;
       }
 
- inline
- void sytrd ( char uplo, int n, double* a, int lda, double* d, double* e, double* tau, double* work, int lwork, int& info )
+ inline
+ void sytrd ( char uplo, int n, double* a, int lda, double* d, double* e, double* tau, double* work, int lwork, int& info )
       {
         LAPACK_DSYTRD( &uplo, &n, a, &lda, d, e, tau, work, &lwork, &info ) ;
       }
@@ -62,28 +62,28 @@
       int lwork = traits::vector_size( work ) ;
       assert( lwork >= 1 );
 
- int info;
+ int info;
       detail::sytrd( uplo, n,
- traits::matrix_storage( a ),
- traits::leading_dimension( a ),
- traits::vector_storage( d ),
- traits::vector_storage( e ),
- traits::vector_storage( tau ),
+ traits::matrix_storage( a ),
+ traits::leading_dimension( a ),
+ traits::vector_storage( d ),
+ traits::vector_storage( e ),
+ traits::vector_storage( tau ),
                      traits::vector_storage( work ), lwork,
                      info ) ;
- return info;
+ return info;
     } // sytrd()
 
 
     template <typename A, typename D, typename E, typename Tau>
     int sytrd( char uplo, A& a, D& d, E& e, Tau& tau, optimal_workspace=optimal_workspace() ) {
- int info;
+ int info;
       detail::sytrd( uplo, traits::matrix_size1( a ),
- traits::matrix_storage( a ),
- traits::leading_dimension( a ),
- traits::vector_storage( d ),
- traits::vector_storage( e ),
- traits::vector_storage( tau ),
+ traits::matrix_storage( a ),
+ traits::leading_dimension( a ),
+ traits::vector_storage( d ),
+ traits::vector_storage( e ),
+ traits::vector_storage( tau ),
                      traits::vector_storage( tau ), -1,
                      info ) ;
       if (info) return info ;

Modified: sandbox/boost/numeric/bindings/lapack/trevc.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/trevc.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/trevc.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,117 +21,117 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Compute eigenvectors of Schur matrix (computed by gees).
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * trevc() computes the eigenvectors using the Schur factorization
      *
      * Let A = U * S * herm(U), then trecv computes the eigenvectors of
      * S, and may optionally apply them to U.
      *
      * To compute the Schur factorization, see gees.
- */
+ */
 
     namespace detail {
- inline
+ inline
       void trevc (char const side, char const howmny, const logical_t* select, int const n,
                  float* t, int const ldt, float* vl, int const ldvl, float* vr, int const ldvr,
- int const mm, int& m, float* work, int& info)
+ int const mm, int& m, float* work, int& info)
       {
         LAPACK_STREVC (&side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr, &mm, &m, work, &info);
       }
 
- inline
+ inline
       void trevc (char const side, char const howmny, const logical_t* select, int const n,
                  double* t, int const ldt, double* vl, int const ldvl, double* vr, int const ldvr,
- int const mm, int& m, double* work, int& info)
+ int const mm, int& m, double* work, int& info)
       {
         LAPACK_DTREVC (&side, &howmny, select, &n, t, &ldt, vl, &ldvl, vr, &ldvr, &mm, &m, work, &info);
       }
 
- inline
+ inline
       void trevc (char const side, char const howmny, const logical_t* select, int const n,
                  traits::complex_f* t, int const ldt, traits::complex_f* vl, int const ldvl, traits::complex_f* vr, int const ldvr,
- int const mm, int& m, traits::complex_f* work, int& info)
+ int const mm, int& m, traits::complex_f* work, int& info)
       {
         LAPACK_CTREVC (&side, &howmny, select, &n, traits::complex_ptr(t), &ldt, traits::complex_ptr(vl), &ldvl,
- traits::complex_ptr(vr), &ldvr, &mm, &m, traits::complex_ptr(work+n), traits::complex_ptr(work), &info);
+ traits::complex_ptr(vr), &ldvr, &mm, &m, traits::complex_ptr(work+n), traits::complex_ptr(work), &info);
       }
 
- inline
+ inline
       void trevc (char const side, char const howmny, const logical_t* select, int const n,
                   traits::complex_d* t, int const ldt, traits::complex_d* vl, int const ldvl, traits::complex_d* vr, int const ldvr,
- int const mm, int& m, traits::complex_d* work, int& info)
+ int const mm, int& m, traits::complex_d* work, int& info)
       {
         LAPACK_ZTREVC (&side, &howmny, select, &n, traits::complex_ptr(t), &ldt,
- traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr), &ldvr,
- &mm, &m, traits::complex_ptr(work+n), traits::complex_ptr(work), &info);
+ traits::complex_ptr(vl), &ldvl, traits::complex_ptr(vr), &ldvr,
+ &mm, &m, traits::complex_ptr(work+n), traits::complex_ptr(work), &info);
       }
 
- }
+ }
 
     // Compute Schur factorization with Schur vectors
     template <typename MatrT, typename VL, typename VR, typename Work>
     int trevc (char const side, char const howmny, MatrT& t, VL& vl, VR& vr, Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrT>::matrix_structure,
+ typename traits::matrix_traits<MatrT>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<VL>::matrix_structure,
+ typename traits::matrix_traits<VL>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<VR>::matrix_structure,
+ typename traits::matrix_traits<VR>::matrix_structure,
         traits::general_t
- >::value));
-#endif
+ >::value));
+#endif
 
       int const n = traits::matrix_size1 (t);
- assert (n == traits::matrix_size2 (t));
- assert (n == traits::matrix_size1 (vl));
- assert (n == traits::matrix_size2 (vl));
- assert (n == traits::matrix_size1 (vr));
- assert (n == traits::matrix_size2 (vr));
- assert (3*n <= traits::vector_size (work));
+ assert (n == traits::matrix_size2 (t));
+ assert (n == traits::matrix_size1 (vl));
+ assert (n == traits::matrix_size2 (vl));
+ assert (n == traits::matrix_size1 (vr));
+ assert (n == traits::matrix_size2 (vr));
+ assert (3*n <= traits::vector_size (work));
 
       logical_t* select=0;
 
       int mm=n;
       int m;
- int info;
+ int info;
       detail::trevc (side, howmny, select, n,
- traits::matrix_storage (t),
+ traits::matrix_storage (t),
                     traits::leading_dimension (t),
                     traits::matrix_storage (vl),
                     traits::leading_dimension (vl),
                     traits::matrix_storage (vr),
                     traits::leading_dimension (vr),
- mm,
- m,
+ mm,
+ m,
                     traits::vector_storage (work),
                     info);
- return info;
+ return info;
     }
 
   }
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/trexc.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/trexc.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/trexc.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Toon Knapen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -21,39 +21,39 @@
 #include <boost/numeric/bindings/traits/detail/array.hpp>
 // #include <boost/numeric/bindings/traits/std_vector.hpp>
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
 # include <boost/static_assert.hpp>
 # include <boost/type_traits.hpp>
-#endif
+#endif
 
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   namespace lapack {
 
     ///////////////////////////////////////////////////////////////////
     //
     // Reorder the Schur factorization of a matrix.
- //
+ //
     ///////////////////////////////////////////////////////////////////
 
- /*
+ /*
      * trexc() reorders the Schur factorization of a matrix
      * A = Q*T*Q**T, so that the diagonal block of T with row
      * index IFST is moved to row ILST.
- */
+ */
 
     namespace detail {
- inline
+ inline
       int trexc_work_size( int const n, float ) {return n;}
 
- inline
+ inline
       int trexc_work_size( int const n, double ) {return n;}
 
- inline
+ inline
       int trexc_work_size( int const n, traits::complex_f ) {return 0;}
 
- inline
+ inline
       int trexc_work_size( int const n, traits::complex_d ) {return 0;}
     }
 
@@ -64,75 +64,75 @@
     }
 
     namespace detail {
- inline
+ inline
       void trexc (char const compq, int const n,
                  float* t, int const ldt, float* q, int const ldq, int& ifst, int& ilst,
- float* work, int& info)
+ float* work, int& info)
       {
         LAPACK_STREXC (&compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, work, &info);
       }
 
- inline
+ inline
       void trexc (char const compq, int const n,
                  double* t, int const ldt, double* q, int const ldq, int& ifst, int& ilst,
- double* work, int& info)
+ double* work, int& info)
       {
         LAPACK_DTREXC (&compq, &n, t, &ldt, q, &ldq, &ifst, &ilst, work, &info);
       }
 
- inline
+ inline
       void trexc (char const compq, int const n,
                  traits::complex_f* t, int const ldt, traits::complex_f* q, int const ldq, int& ifst, int& ilst,
- float* work, int& info)
+ float* work, int& info)
       {
         LAPACK_CTREXC (&compq, &n, traits::complex_ptr(t), &ldt, traits::complex_ptr(q), &ldq, &ifst, &ilst, &info);
       }
 
- inline
+ inline
       void trexc (char const compq, int const n,
                  traits::complex_d* t, int const ldt, traits::complex_d* q, int const ldq, int& ifst, int& ilst,
- double* work, int& info)
+ double* work, int& info)
       {
         LAPACK_ZTREXC (&compq, &n, traits::complex_ptr(t), &ldt, traits::complex_ptr(q), &ldq, &ifst, &ilst, &info);
       }
 
- }
+ }
 
     // Reorder Schur factorization with Schur vectors
     template <typename MatrT, typename Q, typename Work>
     int trexc (char const compq, MatrT& t, Q& q, int& ifst, int& ilst, Work& work) {
 
-#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
+#ifndef BOOST_NUMERIC_BINDINGS_NO_STRUCTURE_CHECK
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<MatrT>::matrix_structure,
+ typename traits::matrix_traits<MatrT>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
       BOOST_STATIC_ASSERT((boost::is_same<
- typename traits::matrix_traits<Q>::matrix_structure,
+ typename traits::matrix_traits<Q>::matrix_structure,
         traits::general_t
- >::value));
+ >::value));
 #endif
 
       int const n = traits::matrix_size1 (t);
- assert (n == traits::matrix_size2 (t));
- assert (n == traits::matrix_size1 (q));
- assert (n == traits::matrix_size2 (q));
- assert (trexc_work_size(t) <= traits::vector_size (work));
+ assert (n == traits::matrix_size2 (t));
+ assert (n == traits::matrix_size1 (q));
+ assert (n == traits::matrix_size2 (q));
+ assert (trexc_work_size(t) <= traits::vector_size (work));
 
- int info;
+ int info;
       detail::trexc (compq, n,
- traits::matrix_storage (t),
+ traits::matrix_storage (t),
                     traits::leading_dimension (t),
                     traits::matrix_storage (q),
                     traits::leading_dimension (q),
- ifst, ilst,
+ ifst, ilst,
                     traits::vector_storage (work),
                     info);
- return info;
+ return info;
     }
 
   }
 
 }}}
 
-#endif
+#endif

Modified: sandbox/boost/numeric/bindings/lapack/workspace.hpp
==============================================================================
--- sandbox/boost/numeric/bindings/lapack/workspace.hpp (original)
+++ sandbox/boost/numeric/bindings/lapack/workspace.hpp 2008-12-15 16:30:04 EST (Mon, 15 Dec 2008)
@@ -1,12 +1,12 @@
 /*
- *
+ *
  * Copyright (c) Karl Meerbergen & Kresimir Fresl 2003
  *
  * Distributed under the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * KF acknowledges the support of the Faculty of Civil Engineering,
+ * KF acknowledges the support of the Faculty of Civil Engineering,
  * University of Zagreb, Croatia.
  *
  */
@@ -20,7 +20,7 @@
 #include <boost/numeric/bindings/traits/vector_traits.hpp>
 #include <memory>
 
-namespace boost { namespace numeric { namespace bindings {
+namespace boost { namespace numeric { namespace bindings {
 
   /*
    * Organization of workspace in Lapack.


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