$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r64534 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational libs/numeric/bindings/doc/lapack/computational libs/numeric/bindings/tools/templates/computational
From: rutger_at_[hidden]
Date: 2010-08-02 03:04:03
Author: rutger
Date: 2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
New Revision: 64534
URL: http://svn.boost.org/trac/boost/changeset/64534
Log:
Added a bunch of traits to org/ung{lq,ql,rq} lapack functions
Text files modified: 
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp       |    60 +++++++++++-------------                
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp       |    58 ++++++++++-------------                 
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp       |    60 +++++++++++-------------                
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp       |    98 ++++++++++++++++++--------------------- 
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp       |    94 +++++++++++++++++--------------------   
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp       |    98 ++++++++++++++++++--------------------- 
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orglq.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgql.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgrq.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/unglq.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungql.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungrq.qbk    |     3                                         
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp |    18 +++++++                                 
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp |    18 +++++++                                 
   14 files changed, 258 insertions(+), 264 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orglq.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -90,9 +90,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -100,16 +99,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::orglq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::orglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -123,12 +123,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -139,17 +139,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::orglq( m, n, k, bindings::begin_value(a),
+        detail::orglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -179,11 +179,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orglq( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -194,10 +192,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+orglq( MatrixA& a, const VectorTAU& tau ) {
     return orglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -208,11 +205,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orglq( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -223,10 +218,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+orglq( const MatrixA& a, const VectorTAU& tau ) {
     return orglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgql.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -90,9 +90,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -100,15 +99,16 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( n ));
+                min_size_work( bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        return detail::orgql( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::orgql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -122,12 +122,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_column(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -138,17 +138,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::orgql( m, n, k, bindings::begin_value(a),
+        detail::orgql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -178,11 +178,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orgql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orgql( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orgql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -193,10 +191,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orgql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+orgql( MatrixA& a, const VectorTAU& tau ) {
     return orgql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -207,11 +204,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orgql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orgql( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orgql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -222,10 +217,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orgql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+orgql( const MatrixA& a, const VectorTAU& tau ) {
     return orgql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orgrq.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -90,9 +90,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -100,16 +99,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::orgrq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::orgrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -123,12 +123,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -139,17 +139,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::orgrq( m, n, k, bindings::begin_value(a),
+        detail::orgrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -179,11 +179,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orgrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orgrq( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orgrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -194,10 +192,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orgrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+orgrq( MatrixA& a, const VectorTAU& tau ) {
     return orgrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -208,11 +205,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-orgrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+orgrq( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return orgrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -223,10 +218,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-orgrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+orgrq( const MatrixA& a, const VectorTAU& tau ) {
     return orgrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unglq.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -127,9 +127,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -137,16 +136,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::unglq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::unglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -160,12 +160,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -176,17 +176,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::unglq( m, n, k, bindings::begin_value(a),
+        detail::unglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -213,9 +213,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -223,16 +222,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::unglq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::unglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(value_type())),
                 bindings::size(work.select(value_type())) );
@@ -246,12 +246,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< value_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< value_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -262,17 +262,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         value_type opt_size_work;
-        detail::unglq( m, n, k, bindings::begin_value(a),
+        detail::unglq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -302,11 +302,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-unglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+unglq( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return unglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -317,10 +315,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-unglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+unglq( MatrixA& a, const VectorTAU& tau ) {
     return unglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -331,11 +328,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-unglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+unglq( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return unglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -346,10 +341,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-unglq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+unglq( const MatrixA& a, const VectorTAU& tau ) {
     return unglq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungql.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -127,9 +127,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -137,15 +136,16 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( n ));
+                min_size_work( bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        return detail::ungql( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::ungql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -159,12 +159,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_column(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -175,17 +175,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::ungql( m, n, k, bindings::begin_value(a),
+        detail::ungql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -212,9 +212,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -222,15 +221,16 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
-                min_size_work( n ));
+                min_size_work( bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        return detail::ungql( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::ungql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(value_type())),
                 bindings::size(work.select(value_type())) );
@@ -244,12 +244,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< value_type > tmp_work( min_size_work( n ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< value_type > tmp_work( min_size_work(
+                bindings::size_column(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -260,17 +260,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         value_type opt_size_work;
-        detail::ungql( m, n, k, bindings::begin_value(a),
+        detail::ungql( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -300,11 +300,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-ungql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+ungql( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return ungql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -315,10 +313,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-ungql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+ungql( MatrixA& a, const VectorTAU& tau ) {
     return ungql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -329,11 +326,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-ungql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+ungql( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return ungql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -344,10 +339,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-ungql( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+ungql( const MatrixA& a, const VectorTAU& tau ) {
     return ungql_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ungrq.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -127,9 +127,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -137,16 +136,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::ungrq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::ungrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())) );
@@ -160,12 +160,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< real_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< real_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -176,17 +176,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
-        detail::ungrq( m, n, k, bindings::begin_value(a),
+        detail::ungrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -213,9 +213,8 @@
     // * 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 ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -223,16 +222,17 @@
                 typename remove_const< typename bindings::value_type<
                 VectorTAU >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
-        BOOST_ASSERT( bindings::size(tau) >= k );
+        BOOST_ASSERT( bindings::size(tau) >= bindings::size(tau) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
-                min_size_work( m ));
+                min_size_work( bindings::size_row(a) ));
+        BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
+        BOOST_ASSERT( bindings::size_row(a) >= 0 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
-                m) );
-        BOOST_ASSERT( m >= 0 );
-        BOOST_ASSERT( n >= m );
-        return detail::ungrq( m, n, k, bindings::begin_value(a),
+                bindings::size_row(a)) );
+        return detail::ungrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(tau),
                 bindings::begin_value(work.select(value_type())),
                 bindings::size(work.select(value_type())) );
@@ -246,12 +246,12 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
-        bindings::detail::array< value_type > tmp_work( min_size_work( m ) );
-        return invoke( m, n, k, a, tau, workspace( tmp_work ) );
+        bindings::detail::array< value_type > tmp_work( min_size_work(
+                bindings::size_row(a) ) );
+        return invoke( a, tau, workspace( tmp_work ) );
     }
 
     //
@@ -262,17 +262,17 @@
     // * 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 ) {
+    static std::ptrdiff_t invoke( MatrixA& a, const VectorTAU& tau,
+            optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         value_type opt_size_work;
-        detail::ungrq( m, n, k, bindings::begin_value(a),
+        detail::ungrq( bindings::size_row(a), bindings::size_column(a),
+                bindings::size(tau), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::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 ) );
     }
 
     //
@@ -302,11 +302,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-ungrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+ungrq( MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return ungrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -317,10 +315,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-ungrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, MatrixA& a, const VectorTAU& tau ) {
+ungrq( MatrixA& a, const VectorTAU& tau ) {
     return ungrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 //
@@ -331,11 +328,9 @@
 template< typename MatrixA, typename VectorTAU, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-ungrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau,
-        Workspace work ) {
+ungrq( const MatrixA& a, const VectorTAU& tau, Workspace work ) {
     return ungrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, work );
+            MatrixA >::type >::invoke( a, tau, work );
 }
 
 //
@@ -346,10 +341,9 @@
 template< typename MatrixA, typename VectorTAU >
 inline typename boost::disable_if< detail::is_workspace< VectorTAU >,
         std::ptrdiff_t >::type
-ungrq( const fortran_int_t m, const fortran_int_t n,
-        const fortran_int_t k, const MatrixA& a, const VectorTAU& tau ) {
+ungrq( const MatrixA& a, const VectorTAU& tau ) {
     return ungrq_impl< typename bindings::value_type<
-            MatrixA >::type >::invoke( m, n, k, a, tau, optimal_workspace() );
+            MatrixA >::type >::invoke( a, tau, optimal_workspace() );
 }
 
 } // namespace lapack
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orglq.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orglq.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orglq.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `orglq` available, please see below.
 ``
-orglq( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+orglq( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgql.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgql.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgql.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `orgql` available, please see below.
 ``
-orgql( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+orgql( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgrq.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgrq.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/orgrq.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `orgrq` available, please see below.
 ``
-orgrq( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+orgrq( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/unglq.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/unglq.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/unglq.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `unglq` available, please see below.
 ``
-unglq( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+unglq( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungql.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungql.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungql.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `ungql` available, please see below.
 ``
-ungql( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+ungql( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungrq.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungrq.qbk	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/ungrq.qbk	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -9,8 +9,7 @@
 [heading Prototype]
 There is one prototype of `ungrq` available, please see below.
 ``
-ungrq( const int_t m, const int_t n,
-        const int_t k, MatrixA& a, const VectorTAU& tau );
+ungrq( MatrixA& a, const VectorTAU& tau );
 ``
 
 
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -2,14 +2,32 @@
 M,N
 $TEMPLATE[orgbr.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
+$TEMPLATE[orglq.all.M.trait_of]
+A
+$TEMPLATE[orglq.all.N.trait_of]
+A
+$TEMPLATE[orglq.all.K.trait]
+size,TAU
 $TEMPLATE[orglq.all.min_size_work.args]
 M
 $TEMPLATE[orglq.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, m );
+$TEMPLATE[orgrq.all.M.trait_of]
+A
+$TEMPLATE[orgrq.all.N.trait_of]
+A
+$TEMPLATE[orgrq.all.K.trait]
+size,TAU
 $TEMPLATE[orgrq.all.min_size_work.args]
 M
 $TEMPLATE[orgrq.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, m );
+$TEMPLATE[orgql.all.M.trait_of]
+A
+$TEMPLATE[orgql.all.N.trait_of]
+A
+$TEMPLATE[orgql.all.K.trait]
+size,TAU
 $TEMPLATE[orgql.all.min_size_work.args]
 N
 $TEMPLATE[orgql.all.min_size_work]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp	(original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/ung.hpp	2010-08-02 03:04:00 EDT (Mon, 02 Aug 2010)
@@ -2,6 +2,12 @@
 M,N
 $TEMPLATE[ungbr.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
+$TEMPLATE[ungql.all.M.trait_of]
+A
+$TEMPLATE[ungql.all.N.trait_of]
+A
+$TEMPLATE[ungql.all.K.trait]
+size,TAU
 $TEMPLATE[ungql.all.min_size_work.args]
 N
 $TEMPLATE[ungql.all.min_size_work]
@@ -16,10 +22,22 @@
 N
 $TEMPLATE[ungqr.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, n );
+$TEMPLATE[unglq.all.M.trait_of]
+A
+$TEMPLATE[unglq.all.N.trait_of]
+A
+$TEMPLATE[unglq.all.K.trait]
+size,TAU
 $TEMPLATE[unglq.all.min_size_work.args]
 M
 $TEMPLATE[unglq.all.min_size_work]
 return std::max< $INTEGER_TYPE >( 1, m );
+$TEMPLATE[ungrq.all.M.trait_of]
+A
+$TEMPLATE[ungrq.all.N.trait_of]
+A
+$TEMPLATE[ungrq.all.K.trait]
+size,TAU
 $TEMPLATE[ungrq.all.min_size_work.args]
 M
 $TEMPLATE[ungrq.all.min_size_work]