Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58961 - sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational
From: rutger_at_[hidden]
Date: 2010-01-13 05:04:50


Author: rutger
Date: 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
New Revision: 58961
URL: http://svn.boost.org/trac/boost/changeset/58961

Log:
misc. updates, mainly fixing trait_of detection / assignments thereof

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp | 19 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp | 63 ++++++++++++++------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp | 35 ++++++++------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp | 80 +++++++++++++++-----------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp | 55 ++++++++++------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp | 96 ++++++++++++++++++++++-----------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp | 47 +++++++++++-------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp | 80 +++++++++++++++-----------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp | 55 ++++++++++------------
   9 files changed, 274 insertions(+), 256 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -131,25 +131,26 @@
     template< typename MatrixAB, typename VectorIPIV, typename MatrixB >
     static std::ptrdiff_t invoke( const MatrixAB& ab, const VectorIPIV& ipiv,
             MatrixB& b ) {
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixAB >::type >::type,
                 typename remove_const< typename value<
                 MatrixB >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixB >::value) );
- BOOST_ASSERT( bandwidth_lower(ab) >= 0 );
- BOOST_ASSERT( bandwidth_upper(ab) >= 0 );
- BOOST_ASSERT( size(ipiv) >= size_column(ab) );
- BOOST_ASSERT( size_column(ab) >= 0 );
+ BOOST_ASSERT( bandwidth_lower_op(ab, trans()) >= 0 );
+ BOOST_ASSERT( bandwidth_upper_op(ab, trans()) >= 0 );
+ BOOST_ASSERT( size(ipiv) >= size_column_op(ab, trans()) );
         BOOST_ASSERT( size_column(b) >= 0 );
+ BOOST_ASSERT( size_column_op(ab, trans()) >= 0 );
         BOOST_ASSERT( size_minor(ab) == 1 || stride_minor(ab) == 1 );
         BOOST_ASSERT( size_minor(b) == 1 || stride_minor(b) == 1 );
         BOOST_ASSERT( stride_major(ab) >= 2 );
         BOOST_ASSERT( stride_major(b) >= std::max< std::ptrdiff_t >(1,
- size_column(ab)) );
- return detail::gbtrs( trans(), size_column(ab), bandwidth_lower(ab),
- bandwidth_upper(ab), size_column(b), begin_value(ab),
- stride_major(ab), begin_value(ipiv), begin_value(b),
- stride_major(b) );
+ size_column_op(ab, trans())) );
+ return detail::gbtrs( trans(), size_column_op(ab, trans()),
+ bandwidth_lower_op(ab, trans()), bandwidth_upper_op(ab,
+ trans()), size_column(b), begin_value(ab), stride_major(ab),
+ begin_value(ipiv), begin_value(b), stride_major(b) );
     }
 
 };

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetri.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -50,11 +50,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<float> value-type.
 //
-inline std::ptrdiff_t hetri( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t hetri( UpLo, const fortran_int_t n,
         std::complex<float>* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, std::complex<float>* work ) {
     fortran_int_t info(0);
- LAPACK_CHETRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_CHETRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -63,11 +65,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<double> value-type.
 //
-inline std::ptrdiff_t hetri( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t hetri( UpLo, const fortran_int_t n,
         std::complex<double>* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, std::complex<double>* work ) {
     fortran_int_t info(0);
- LAPACK_ZHETRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_ZHETRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -90,8 +94,9 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorIPIV, typename WORK >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ detail::workspace1< WORK > work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
         BOOST_ASSERT( size(ipiv) >= size_column(a) );
         BOOST_ASSERT( size(work.select(value_type())) >= min_size_work(
@@ -100,7 +105,7 @@
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
         BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
                 size_column(a)) );
- return detail::hetri( uplo, size_column(a), begin_value(a),
+ return detail::hetri( uplo(), size_column(a), begin_value(a),
                 stride_major(a), begin_value(ipiv),
                 begin_value(work.select(value_type())) );
     }
@@ -113,11 +118,12 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, minimal_workspace work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ minimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         bindings::detail::array< value_type > tmp_work( min_size_work(
                 size_column(a) ) );
- return invoke( uplo, a, ipiv, workspace( tmp_work ) );
+ return invoke( a, ipiv, workspace( tmp_work ) );
     }
 
     //
@@ -128,9 +134,10 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, optimal_workspace work ) {
- return invoke( uplo, a, ipiv, minimal_workspace() );
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ optimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
+ return invoke( a, ipiv, minimal_workspace() );
     }
 
     //
@@ -158,10 +165,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorIPIV, typename Workspace >
-inline std::ptrdiff_t hetri( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, Workspace work ) {
- return hetri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, work );
+inline std::ptrdiff_t hetri( MatrixA& a, const VectorIPIV& ipiv,
+ Workspace work ) {
+ return hetri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, work );
 }
 
 //
@@ -170,10 +177,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorIPIV >
-inline std::ptrdiff_t hetri( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv ) {
- return hetri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, optimal_workspace() );
+inline std::ptrdiff_t hetri( MatrixA& a, const VectorIPIV& ipiv ) {
+ return hetri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, optimal_workspace() );
 }
 
 //
@@ -182,10 +188,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorIPIV, typename Workspace >
-inline std::ptrdiff_t hetri( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, Workspace work ) {
- return hetri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, work );
+inline std::ptrdiff_t hetri( const MatrixA& a, const VectorIPIV& ipiv,
+ Workspace work ) {
+ return hetri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, work );
 }
 
 //
@@ -194,10 +200,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorIPIV >
-inline std::ptrdiff_t hetri( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv ) {
- return hetri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, optimal_workspace() );
+inline std::ptrdiff_t hetri( const MatrixA& a, const VectorIPIV& ipiv ) {
+ return hetri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrs.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -48,12 +48,14 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<float> value-type.
 //
-inline std::ptrdiff_t hetrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t hetrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const std::complex<float>* a,
         const fortran_int_t lda, const fortran_int_t* ipiv,
         std::complex<float>* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_CHETRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_CHETRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -62,12 +64,14 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<double> value-type.
 //
-inline std::ptrdiff_t hetrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t hetrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const std::complex<double>* a,
         const fortran_int_t lda, const fortran_int_t* ipiv,
         std::complex<double>* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_ZHETRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_ZHETRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -90,8 +94,9 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorIPIV, typename MatrixB >
- static std::ptrdiff_t invoke( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, MatrixB& b ) {
+ static std::ptrdiff_t invoke( const MatrixA& a, const VectorIPIV& ipiv,
+ MatrixB& b ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
                 typename remove_const< typename value<
@@ -106,7 +111,7 @@
                 size_column(a)) );
         BOOST_ASSERT( stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 size_column(a)) );
- return detail::hetrs( uplo, size_column(a), size_column(b),
+ return detail::hetrs( uplo(), size_column(a), size_column(b),
                 begin_value(a), stride_major(a), begin_value(ipiv),
                 begin_value(b), stride_major(b) );
     }
@@ -128,10 +133,10 @@
 // * MatrixB&
 //
 template< typename MatrixA, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t hetrs( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, MatrixB& b ) {
- return hetrs_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, b );
+inline std::ptrdiff_t hetrs( const MatrixA& a, const VectorIPIV& ipiv,
+ MatrixB& b ) {
+ return hetrs_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, b );
 }
 
 //
@@ -139,10 +144,10 @@
 // * const MatrixB&
 //
 template< typename MatrixA, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t hetrs( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, const MatrixB& b ) {
- return hetrs_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, b );
+inline std::ptrdiff_t hetrs( const MatrixA& a, const VectorIPIV& ipiv,
+ const MatrixB& b ) {
+ return hetrs_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, b );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgqr.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -90,23 +90,25 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorTAU, typename WORK >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ detail::workspace1< WORK > work ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
                 typename remove_const< typename value<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
- BOOST_ASSERT( k >= k );
- BOOST_ASSERT( m >= 0 );
- BOOST_ASSERT( n >= n );
- BOOST_ASSERT( size(tau) >= k );
- BOOST_ASSERT( size(work.select(real_type())) >= min_size_work( n ));
+ BOOST_ASSERT( size(tau) >= size(tau) );
+ BOOST_ASSERT( size(tau) >= size(tau) );
+ BOOST_ASSERT( size(work.select(real_type())) >= min_size_work(
+ size_column(a) ));
+ BOOST_ASSERT( size_column(a) >= size_column(a) );
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
- BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,m) );
- return detail::orgqr( m, n, k, begin_value(a), stride_major(a),
- begin_value(tau), begin_value(work.select(real_type())),
+ BOOST_ASSERT( size_row(a) >= 0 );
+ BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ size_row(a)) );
+ return detail::orgqr( size_row(a), size_column(a), size(tau),
+ begin_value(a), stride_major(a), begin_value(tau),
+ begin_value(work.select(real_type())),
                 size(work.select(real_type())) );
     }
 
@@ -118,11 +120,11 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorTAU >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, minimal_workspace work ) {
- bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
- return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ minimal_workspace work ) {
+ bindings::detail::array< real_type > tmp_work( min_size_work(
+ size_column(a) ) );
+ return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -133,15 +135,15 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorTAU >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, optimal_workspace work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ optimal_workspace work ) {
         real_type opt_size_work;
- detail::orgqr( m, n, k, begin_value(a), stride_major(a),
- begin_value(tau), &opt_size_work, -1 );
+ detail::orgqr( size_row(a), size_column(a), size(tau),
+ begin_value(a), stride_major(a), begin_value(tau),
+ &opt_size_work, -1 );
         bindings::detail::array< real_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
- return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+ return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -169,11 +171,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorTAU, typename Workspace >
-inline std::ptrdiff_t orgqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, Workspace work ) {
- return orgqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, work );
+inline std::ptrdiff_t orgqr( MatrixA& a, const VectorTAU& tau,
+ Workspace work ) {
+ return orgqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ work );
 }
 
 //
@@ -182,11 +183,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU >
-inline std::ptrdiff_t orgqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau ) {
- return orgqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, optimal_workspace() );
+inline std::ptrdiff_t orgqr( MatrixA& a, const VectorTAU& tau ) {
+ return orgqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ optimal_workspace() );
 }
 
 //
@@ -195,11 +194,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorTAU, typename Workspace >
-inline std::ptrdiff_t orgqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, Workspace work ) {
- return orgqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, work );
+inline std::ptrdiff_t orgqr( const MatrixA& a, const VectorTAU& tau,
+ Workspace work ) {
+ return orgqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ work );
 }
 
 //
@@ -208,11 +206,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU >
-inline std::ptrdiff_t orgqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau ) {
- return orgqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, optimal_workspace() );
+inline std::ptrdiff_t orgqr( const MatrixA& a, const VectorTAU& tau ) {
+ return orgqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ormqr.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -98,9 +98,9 @@
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC,
             typename WORK >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, detail::workspace1<
+ WORK > work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
@@ -112,7 +112,7 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixC >::value) );
         BOOST_ASSERT( side == 'L' || side == 'R' );
- BOOST_ASSERT( size(tau) >= k );
+ BOOST_ASSERT( size(tau) >= size(tau) );
         BOOST_ASSERT( size(work.select(real_type())) >= min_size_work( side,
                 size_row(c), size_column(c) ));
         BOOST_ASSERT( size_column(c) >= 0 );
@@ -121,8 +121,8 @@
         BOOST_ASSERT( size_row(c) >= 0 );
         BOOST_ASSERT( stride_major(c) >= std::max< std::ptrdiff_t >(1,
                 size_row(c)) );
- return detail::ormqr( side, trans(), size_row(c), size_column(c), k,
- begin_value(a), stride_major(a), begin_value(tau),
+ return detail::ormqr( side, trans(), size_row(c), size_column(c),
+ size(tau), begin_value(a), stride_major(a), begin_value(tau),
                 begin_value(c), stride_major(c),
                 begin_value(work.select(real_type())),
                 size(work.select(real_type())) );
@@ -136,13 +136,12 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- minimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, minimal_workspace work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         bindings::detail::array< real_type > tmp_work( min_size_work( side,
                 size_row(c), size_column(c) ) );
- return invoke( side, k, a, tau, c, workspace( tmp_work ) );
+ return invoke( side, a, tau, c, workspace( tmp_work ) );
     }
 
     //
@@ -153,17 +152,16 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- optimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, optimal_workspace work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         real_type opt_size_work;
- detail::ormqr( side, trans(), size_row(c), size_column(c), k,
- begin_value(a), stride_major(a), begin_value(tau),
+ detail::ormqr( side, trans(), size_row(c), size_column(c),
+ size(tau), begin_value(a), stride_major(a), begin_value(tau),
                 begin_value(c), stride_major(c), &opt_size_work, -1 );
         bindings::detail::array< real_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
- return invoke( side, k, a, tau, c, workspace( tmp_work ) );
+ return invoke( side, a, tau, c, workspace( tmp_work ) );
     }
 
     //
@@ -196,10 +194,10 @@
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC,
         typename Workspace >
-inline std::ptrdiff_t ormqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c, Workspace work ) {
+inline std::ptrdiff_t ormqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, Workspace work ) {
     return ormqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, work );
+ a, tau, c, work );
 }
 
 //
@@ -208,10 +206,10 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC >
-inline std::ptrdiff_t ormqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c ) {
+inline std::ptrdiff_t ormqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c ) {
     return ormqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, optimal_workspace() );
+ a, tau, c, optimal_workspace() );
 }
 
 //
@@ -221,11 +219,10 @@
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC,
         typename Workspace >
-inline std::ptrdiff_t ormqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, const MatrixC& c,
- Workspace work ) {
+inline std::ptrdiff_t ormqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, const MatrixC& c, Workspace work ) {
     return ormqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, work );
+ a, tau, c, work );
 }
 
 //
@@ -234,10 +231,10 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC >
-inline std::ptrdiff_t ormqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, const MatrixC& c ) {
+inline std::ptrdiff_t ormqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, const MatrixC& c ) {
     return ormqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, optimal_workspace() );
+ a, tau, c, optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytri.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -53,10 +53,12 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * float value-type.
 //
-inline std::ptrdiff_t sytri( const char uplo, const fortran_int_t n, float* a,
+template< typename UpLo >
+inline std::ptrdiff_t sytri( UpLo, const fortran_int_t n, float* a,
         const fortran_int_t lda, const fortran_int_t* ipiv, float* work ) {
     fortran_int_t info(0);
- LAPACK_SSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_SSYTRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -65,10 +67,12 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * double value-type.
 //
-inline std::ptrdiff_t sytri( const char uplo, const fortran_int_t n, double* a,
+template< typename UpLo >
+inline std::ptrdiff_t sytri( UpLo, const fortran_int_t n, double* a,
         const fortran_int_t lda, const fortran_int_t* ipiv, double* work ) {
     fortran_int_t info(0);
- LAPACK_DSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_DSYTRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -77,11 +81,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<float> value-type.
 //
-inline std::ptrdiff_t sytri( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytri( UpLo, const fortran_int_t n,
         std::complex<float>* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, std::complex<float>* work ) {
     fortran_int_t info(0);
- LAPACK_CSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_CSYTRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -90,11 +96,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<double> value-type.
 //
-inline std::ptrdiff_t sytri( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytri( UpLo, const fortran_int_t n,
         std::complex<double>* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, std::complex<double>* work ) {
     fortran_int_t info(0);
- LAPACK_ZSYTRI( &uplo, &n, a, &lda, ipiv, work, &info );
+ LAPACK_ZSYTRI( &lapack_option< UpLo >::value, &n, a, &lda, ipiv, work,
+ &info );
     return info;
 }
 
@@ -123,8 +131,9 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorIPIV, typename WORK >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ detail::workspace1< WORK > work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
         BOOST_ASSERT( size(ipiv) >= size_column(a) );
         BOOST_ASSERT( size(work.select(real_type())) >= min_size_work(
@@ -133,7 +142,7 @@
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
         BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
                 size_column(a)) );
- return detail::sytri( uplo, size_column(a), begin_value(a),
+ return detail::sytri( uplo(), size_column(a), begin_value(a),
                 stride_major(a), begin_value(ipiv),
                 begin_value(work.select(real_type())) );
     }
@@ -146,11 +155,12 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, minimal_workspace work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ minimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         bindings::detail::array< real_type > tmp_work( min_size_work(
                 size_column(a) ) );
- return invoke( uplo, a, ipiv, workspace( tmp_work ) );
+ return invoke( a, ipiv, workspace( tmp_work ) );
     }
 
     //
@@ -161,9 +171,10 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, optimal_workspace work ) {
- return invoke( uplo, a, ipiv, minimal_workspace() );
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ optimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
+ return invoke( a, ipiv, minimal_workspace() );
     }
 
     //
@@ -191,8 +202,9 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorIPIV, typename WORK >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ detail::workspace1< WORK > work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
         BOOST_ASSERT( size(ipiv) >= size_column(a) );
         BOOST_ASSERT( size(work.select(value_type())) >= min_size_work(
@@ -201,7 +213,7 @@
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
         BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
                 size_column(a)) );
- return detail::sytri( uplo, size_column(a), begin_value(a),
+ return detail::sytri( uplo(), size_column(a), begin_value(a),
                 stride_major(a), begin_value(ipiv),
                 begin_value(work.select(value_type())) );
     }
@@ -214,11 +226,12 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, minimal_workspace work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ minimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         bindings::detail::array< value_type > tmp_work( min_size_work(
                 size_column(a) ) );
- return invoke( uplo, a, ipiv, workspace( tmp_work ) );
+ return invoke( a, ipiv, workspace( tmp_work ) );
     }
 
     //
@@ -229,9 +242,10 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorIPIV >
- static std::ptrdiff_t invoke( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, optimal_workspace work ) {
- return invoke( uplo, a, ipiv, minimal_workspace() );
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorIPIV& ipiv,
+ optimal_workspace work ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
+ return invoke( a, ipiv, minimal_workspace() );
     }
 
     //
@@ -259,10 +273,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorIPIV, typename Workspace >
-inline std::ptrdiff_t sytri( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv, Workspace work ) {
- return sytri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, work );
+inline std::ptrdiff_t sytri( MatrixA& a, const VectorIPIV& ipiv,
+ Workspace work ) {
+ return sytri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, work );
 }
 
 //
@@ -271,10 +285,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorIPIV >
-inline std::ptrdiff_t sytri( const char uplo, MatrixA& a,
- const VectorIPIV& ipiv ) {
- return sytri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, optimal_workspace() );
+inline std::ptrdiff_t sytri( MatrixA& a, const VectorIPIV& ipiv ) {
+ return sytri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, optimal_workspace() );
 }
 
 //
@@ -283,10 +296,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorIPIV, typename Workspace >
-inline std::ptrdiff_t sytri( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, Workspace work ) {
- return sytri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, work );
+inline std::ptrdiff_t sytri( const MatrixA& a, const VectorIPIV& ipiv,
+ Workspace work ) {
+ return sytri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, work );
 }
 
 //
@@ -295,10 +308,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorIPIV >
-inline std::ptrdiff_t sytri( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv ) {
- return sytri_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, optimal_workspace() );
+inline std::ptrdiff_t sytri( const MatrixA& a, const VectorIPIV& ipiv ) {
+ return sytri_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrs.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -48,11 +48,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * float value-type.
 //
-inline std::ptrdiff_t sytrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const float* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, float* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_SSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_SSYTRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -61,11 +63,13 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * double value-type.
 //
-inline std::ptrdiff_t sytrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const double* a, const fortran_int_t lda,
         const fortran_int_t* ipiv, double* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_DSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_DSYTRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -74,12 +78,14 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<float> value-type.
 //
-inline std::ptrdiff_t sytrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const std::complex<float>* a,
         const fortran_int_t lda, const fortran_int_t* ipiv,
         std::complex<float>* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_CSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_CSYTRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -88,12 +94,14 @@
 // * netlib-compatible LAPACK backend (the default), and
 // * complex<double> value-type.
 //
-inline std::ptrdiff_t sytrs( const char uplo, const fortran_int_t n,
+template< typename UpLo >
+inline std::ptrdiff_t sytrs( UpLo, const fortran_int_t n,
         const fortran_int_t nrhs, const std::complex<double>* a,
         const fortran_int_t lda, const fortran_int_t* ipiv,
         std::complex<double>* b, const fortran_int_t ldb ) {
     fortran_int_t info(0);
- LAPACK_ZSYTRS( &uplo, &n, &nrhs, a, &lda, ipiv, b, &ldb, &info );
+ LAPACK_ZSYTRS( &lapack_option< UpLo >::value, &n, &nrhs, a, &lda, ipiv, b,
+ &ldb, &info );
     return info;
 }
 
@@ -116,8 +124,9 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorIPIV, typename MatrixB >
- static std::ptrdiff_t invoke( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, MatrixB& b ) {
+ static std::ptrdiff_t invoke( const MatrixA& a, const VectorIPIV& ipiv,
+ MatrixB& b ) {
+ typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
                 typename remove_const< typename value<
@@ -132,7 +141,7 @@
                 size_column(a)) );
         BOOST_ASSERT( stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 size_column(a)) );
- return detail::sytrs( uplo, size_column(a), size_column(b),
+ return detail::sytrs( uplo(), size_column(a), size_column(b),
                 begin_value(a), stride_major(a), begin_value(ipiv),
                 begin_value(b), stride_major(b) );
     }
@@ -154,10 +163,10 @@
 // * MatrixB&
 //
 template< typename MatrixA, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t sytrs( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, MatrixB& b ) {
- return sytrs_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, b );
+inline std::ptrdiff_t sytrs( const MatrixA& a, const VectorIPIV& ipiv,
+ MatrixB& b ) {
+ return sytrs_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, b );
 }
 
 //
@@ -165,10 +174,10 @@
 // * const MatrixB&
 //
 template< typename MatrixA, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t sytrs( const char uplo, const MatrixA& a,
- const VectorIPIV& ipiv, const MatrixB& b ) {
- return sytrs_impl< typename value< MatrixA >::type >::invoke( uplo,
- a, ipiv, b );
+inline std::ptrdiff_t sytrs( const MatrixA& a, const VectorIPIV& ipiv,
+ const MatrixB& b ) {
+ return sytrs_impl< typename value< MatrixA >::type >::invoke( a,
+ ipiv, b );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungqr.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -92,23 +92,25 @@
     // * Asserts that most arguments make sense.
     //
     template< typename MatrixA, typename VectorTAU, typename WORK >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ detail::workspace1< WORK > work ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
                 typename remove_const< typename value<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
- BOOST_ASSERT( k >= k );
- BOOST_ASSERT( m >= 0 );
- BOOST_ASSERT( n >= n );
- BOOST_ASSERT( size(tau) >= k );
- BOOST_ASSERT( size(work.select(value_type())) >= min_size_work( n ));
+ BOOST_ASSERT( size(tau) >= size(tau) );
+ BOOST_ASSERT( size(tau) >= size(tau) );
+ BOOST_ASSERT( size(work.select(value_type())) >= min_size_work(
+ size_column(a) ));
+ BOOST_ASSERT( size_column(a) >= size_column(a) );
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
- BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,m) );
- return detail::ungqr( m, n, k, begin_value(a), stride_major(a),
- begin_value(tau), begin_value(work.select(value_type())),
+ BOOST_ASSERT( size_row(a) >= 0 );
+ BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ size_row(a)) );
+ return detail::ungqr( size_row(a), size_column(a), size(tau),
+ begin_value(a), stride_major(a), begin_value(tau),
+ begin_value(work.select(value_type())),
                 size(work.select(value_type())) );
     }
 
@@ -120,11 +122,11 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorTAU >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, minimal_workspace work ) {
- bindings::detail::array< value_type > tmp_work( min_size_work( n ) );
- return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ minimal_workspace work ) {
+ bindings::detail::array< value_type > tmp_work( min_size_work(
+ size_column(a) ) );
+ return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -135,15 +137,15 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorTAU >
- static std::ptrdiff_t invoke( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, optimal_workspace work ) {
+ static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+ optimal_workspace work ) {
         value_type opt_size_work;
- detail::ungqr( m, n, k, begin_value(a), stride_major(a),
- begin_value(tau), &opt_size_work, -1 );
+ detail::ungqr( size_row(a), size_column(a), size(tau),
+ begin_value(a), stride_major(a), begin_value(tau),
+ &opt_size_work, -1 );
         bindings::detail::array< value_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
- return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+ return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -171,11 +173,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorTAU, typename Workspace >
-inline std::ptrdiff_t ungqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau, Workspace work ) {
- return ungqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, work );
+inline std::ptrdiff_t ungqr( MatrixA& a, const VectorTAU& tau,
+ Workspace work ) {
+ return ungqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ work );
 }
 
 //
@@ -184,11 +185,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU >
-inline std::ptrdiff_t ungqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k, MatrixA& a,
- const VectorTAU& tau ) {
- return ungqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, optimal_workspace() );
+inline std::ptrdiff_t ungqr( MatrixA& a, const VectorTAU& tau ) {
+ return ungqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ optimal_workspace() );
 }
 
 //
@@ -197,11 +196,10 @@
 // * User-defined workspace
 //
 template< typename MatrixA, typename VectorTAU, typename Workspace >
-inline std::ptrdiff_t ungqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, Workspace work ) {
- return ungqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, work );
+inline std::ptrdiff_t ungqr( const MatrixA& a, const VectorTAU& tau,
+ Workspace work ) {
+ return ungqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ work );
 }
 
 //
@@ -210,11 +208,9 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU >
-inline std::ptrdiff_t ungqr( const fortran_int_t m,
- const fortran_int_t n, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau ) {
- return ungqr_impl< typename value< MatrixA >::type >::invoke( m, n,
- k, a, tau, optimal_workspace() );
+inline std::ptrdiff_t ungqr( const MatrixA& a, const VectorTAU& tau ) {
+ return ungqr_impl< typename value< MatrixA >::type >::invoke( a, tau,
+ optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unmqr.hpp 2010-01-13 05:04:49 EST (Wed, 13 Jan 2010)
@@ -102,9 +102,9 @@
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC,
             typename WORK >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- detail::workspace1< WORK > work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, detail::workspace1<
+ WORK > work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
@@ -116,7 +116,7 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixC >::value) );
         BOOST_ASSERT( side == 'L' || side == 'R' );
- BOOST_ASSERT( size(tau) >= k );
+ BOOST_ASSERT( size(tau) >= size(tau) );
         BOOST_ASSERT( size(work.select(value_type())) >= min_size_work( side,
                 size_row(c), size_column(c) ));
         BOOST_ASSERT( size_column(c) >= 0 );
@@ -125,8 +125,8 @@
         BOOST_ASSERT( size_row(c) >= 0 );
         BOOST_ASSERT( stride_major(c) >= std::max< std::ptrdiff_t >(1,
                 size_row(c)) );
- return detail::unmqr( side, trans(), size_row(c), size_column(c), k,
- begin_value(a), stride_major(a), begin_value(tau),
+ return detail::unmqr( side, trans(), size_row(c), size_column(c),
+ size(tau), begin_value(a), stride_major(a), begin_value(tau),
                 begin_value(c), stride_major(c),
                 begin_value(work.select(value_type())),
                 size(work.select(value_type())) );
@@ -140,13 +140,12 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- minimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, minimal_workspace work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         bindings::detail::array< value_type > tmp_work( min_size_work( side,
                 size_row(c), size_column(c) ) );
- return invoke( side, k, a, tau, c, workspace( tmp_work ) );
+ return invoke( side, a, tau, c, workspace( tmp_work ) );
     }
 
     //
@@ -157,17 +156,16 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename VectorTAU, typename MatrixC >
- static std::ptrdiff_t invoke( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c,
- optimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, optimal_workspace work ) {
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         value_type opt_size_work;
- detail::unmqr( side, trans(), size_row(c), size_column(c), k,
- begin_value(a), stride_major(a), begin_value(tau),
+ detail::unmqr( side, trans(), size_row(c), size_column(c),
+ size(tau), begin_value(a), stride_major(a), begin_value(tau),
                 begin_value(c), stride_major(c), &opt_size_work, -1 );
         bindings::detail::array< value_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
- return invoke( side, k, a, tau, c, workspace( tmp_work ) );
+ return invoke( side, a, tau, c, workspace( tmp_work ) );
     }
 
     //
@@ -200,10 +198,10 @@
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC,
         typename Workspace >
-inline std::ptrdiff_t unmqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c, Workspace work ) {
+inline std::ptrdiff_t unmqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c, Workspace work ) {
     return unmqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, work );
+ a, tau, c, work );
 }
 
 //
@@ -212,10 +210,10 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC >
-inline std::ptrdiff_t unmqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, MatrixC& c ) {
+inline std::ptrdiff_t unmqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, MatrixC& c ) {
     return unmqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, optimal_workspace() );
+ a, tau, c, optimal_workspace() );
 }
 
 //
@@ -225,11 +223,10 @@
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC,
         typename Workspace >
-inline std::ptrdiff_t unmqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, const MatrixC& c,
- Workspace work ) {
+inline std::ptrdiff_t unmqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, const MatrixC& c, Workspace work ) {
     return unmqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, work );
+ a, tau, c, work );
 }
 
 //
@@ -238,10 +235,10 @@
 // * Default workspace-type (optimal)
 //
 template< typename MatrixA, typename VectorTAU, typename MatrixC >
-inline std::ptrdiff_t unmqr( const char side, const fortran_int_t k,
- const MatrixA& a, const VectorTAU& tau, const MatrixC& c ) {
+inline std::ptrdiff_t unmqr( const char side, const MatrixA& a,
+ const VectorTAU& tau, const MatrixC& c ) {
     return unmqr_impl< typename value< MatrixA >::type >::invoke( side,
- k, a, tau, c, optimal_workspace() );
+ a, tau, c, optimal_workspace() );
 }
 
 } // namespace 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