Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63939 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack boost/numeric/bindings/lapack/auxiliary boost/numeric/bindings/lapack/computational boost/numeric/bindings/lapack/driver libs/numeric/bindings/doc/lapack/computational libs/numeric/bindings/doc/lapack/driver libs/numeric/bindings/tools libs/numeric/bindings/tools/templates/auxiliary libs/numeric/bindings/tools/templates/computational libs/numeric/bindings/tools/templates/driver
From: thomas.klimpel_at_[hidden]
Date: 2010-07-12 19:00:13


Author: klimpel
Date: 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
New Revision: 63939
URL: http://svn.boost.org/trac/boost/changeset/63939

Log:
I doubt that the TRANS stuff is really always correct for lapack, but at least some more generated files where TRANS occurs pass the compile test now.
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gtrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gttrs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbrfs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tprfs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tptrs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gtsvx.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp | 18 ++
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational.hpp | 14 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp | 261 ++++++++++++++++++++++-----------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp | 51 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp | 6
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp | 80 +++++++-----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp | 76 ++++++----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp | 18 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp | 6
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver.hpp | 4
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp | 120 ++++++++++-------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp | 220 ++++++++++++++++++---------------
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gtrfs.qbk | 8
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gttrs.qbk | 5
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/gtsvx.qbk | 8
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 5
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gbsvx.hpp | 2
   21 files changed, 519 insertions(+), 391 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -15,7 +15,7 @@
 #define BOOST_NUMERIC_BINDINGS_LAPACK_AUXILIARY_HPP
 
 #include <boost/numeric/bindings/lapack/auxiliary/larf.hpp>
-// #include <boost/numeric/bindings/lapack/auxiliary/larfb.hpp>
+#include <boost/numeric/bindings/lapack/auxiliary/larfb.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/larfg.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/larft.hpp>
 // #include <boost/numeric/bindings/lapack/auxiliary/larfx.hpp>

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -16,6 +16,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
 #include <boost/numeric/bindings/detail/if_left.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
@@ -26,6 +27,7 @@
 #include <boost/numeric/bindings/remove_imaginary.hpp>
 #include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/stride.hpp>
+#include <boost/numeric/bindings/trans_tag.hpp>
 #include <boost/numeric/bindings/value_type.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -156,8 +158,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixV >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixT >::value) );
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixC >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< MatrixV >::type >::type,
@@ -203,6 +205,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         bindings::detail::array< real_type > tmp_work( min_size_work( ldwork,
                 bindings::size_column(t) ) );
         return invoke( side, direct, storev, v, t, c, ldwork,
@@ -222,6 +226,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         return invoke( side, direct, storev, v, t, c, ldwork,
                 minimal_workspace() );
     }
@@ -256,8 +262,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixV >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixT >::value) );
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixC >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< MatrixV >::type >::type,
@@ -303,6 +309,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         bindings::detail::array< value_type > tmp_work( min_size_work( ldwork,
                 bindings::size_column(t) ) );
         return invoke( side, direct, storev, v, t, c, ldwork,
@@ -322,6 +330,8 @@
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
             const fortran_int_t ldwork, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixT >::type order;
+ typedef typename result_of::trans_tag< MatrixV, order >::type trans;
         return invoke( side, direct, storev, v, t, c, ldwork,
                 minimal_workspace() );
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -78,8 +78,8 @@
 #include <boost/numeric/bindings/lapack/computational/getrf.hpp>
 #include <boost/numeric/bindings/lapack/computational/getri.hpp>
 #include <boost/numeric/bindings/lapack/computational/getrs.hpp>
-// #include <boost/numeric/bindings/lapack/computational/gtrfs.hpp>
-// #include <boost/numeric/bindings/lapack/computational/gttrs.hpp>
+#include <boost/numeric/bindings/lapack/computational/gtrfs.hpp>
+#include <boost/numeric/bindings/lapack/computational/gttrs.hpp>
 #include <boost/numeric/bindings/lapack/computational/hecon.hpp>
 #include <boost/numeric/bindings/lapack/computational/herfs.hpp>
 #include <boost/numeric/bindings/lapack/computational/hetrf.hpp>
@@ -123,12 +123,12 @@
 #include <boost/numeric/bindings/lapack/computational/sytri.hpp>
 #include <boost/numeric/bindings/lapack/computational/sytrs.hpp>
 #include <boost/numeric/bindings/lapack/computational/tbcon.hpp>
-// #include <boost/numeric/bindings/lapack/computational/tbrfs.hpp>
+#include <boost/numeric/bindings/lapack/computational/tbrfs.hpp>
 #include <boost/numeric/bindings/lapack/computational/tbtrs.hpp>
 #include <boost/numeric/bindings/lapack/computational/tpcon.hpp>
-// #include <boost/numeric/bindings/lapack/computational/tprfs.hpp>
+#include <boost/numeric/bindings/lapack/computational/tprfs.hpp>
 #include <boost/numeric/bindings/lapack/computational/tptri.hpp>
-// #include <boost/numeric/bindings/lapack/computational/tptrs.hpp>
+#include <boost/numeric/bindings/lapack/computational/tptrs.hpp>
 #include <boost/numeric/bindings/lapack/computational/trcon.hpp>
 #include <boost/numeric/bindings/lapack/computational/trrfs.hpp>
 #include <boost/numeric/bindings/lapack/computational/trtri.hpp>
@@ -137,7 +137,7 @@
 #include <boost/numeric/bindings/lapack/computational/hetrd.hpp>
 #include <boost/numeric/bindings/lapack/computational/hptrd.hpp>
 #include <boost/numeric/bindings/lapack/computational/opgtr.hpp>
-// #include <boost/numeric/bindings/lapack/computational/opmtr.hpp>
+#include <boost/numeric/bindings/lapack/computational/opmtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/orgtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/ormtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/pteqr.hpp>
@@ -154,7 +154,7 @@
 // #include <boost/numeric/bindings/lapack/computational/ungtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/unmtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/upgtr.hpp>
-// #include <boost/numeric/bindings/lapack/computational/upmtr.hpp>
+#include <boost/numeric/bindings/lapack/computational/upmtr.hpp>
 #include <boost/numeric/bindings/lapack/computational/ggbak.hpp>
 #include <boost/numeric/bindings/lapack/computational/ggbal.hpp>
 #include <boost/numeric/bindings/lapack/computational/gghrd.hpp>

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gtrfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -159,13 +159,15 @@
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR,
             typename WORK, typename IWORK >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- detail::workspace2< WORK, IWORK > work ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
+ IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -212,36 +214,45 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(d) >= n );
- BOOST_ASSERT( bindings::size(df) >= n );
- BOOST_ASSERT( bindings::size(dl) >= n-1 );
- BOOST_ASSERT( bindings::size(dlf) >= n-1 );
- BOOST_ASSERT( bindings::size(du) >= n-1 );
- BOOST_ASSERT( bindings::size(du2) >= n-2 );
- BOOST_ASSERT( bindings::size(duf) >= n-1 );
- BOOST_ASSERT( bindings::size(ipiv) >= n );
+ BOOST_ASSERT( bindings::size(d) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(df) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(dl) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(dlf) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du2) >= bindings::size_column_op(d,
+ trans())-2 );
+ BOOST_ASSERT( bindings::size(duf) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(d,
+ trans()) );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( n ));
+ min_size_iwork( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( n ));
+ min_size_work( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(d, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- n) );
- BOOST_ASSERT( n >= 0 );
- return detail::gtrfs( trans(), n, bindings::size_column(b),
- bindings::begin_value(dl), bindings::begin_value(d),
- bindings::begin_value(du), bindings::begin_value(dlf),
- bindings::begin_value(df), bindings::begin_value(duf),
- bindings::begin_value(du2), bindings::begin_value(ipiv),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x),
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ bindings::size_column_op(d, trans())) );
+ return detail::gtrfs( trans(), bindings::size_column_op(d, trans()),
+ bindings::size_column(b), bindings::begin_value(dl),
+ bindings::begin_value(d), bindings::begin_value(du),
+ bindings::begin_value(dlf), bindings::begin_value(df),
+ bindings::begin_value(duf), bindings::begin_value(du2),
+ bindings::begin_value(ipiv), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
@@ -257,18 +268,20 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- minimal_workspace ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ bindings::detail::array< real_type > tmp_work( min_size_work(
+ bindings::size_column_op(d, trans()) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( n ) );
- return invoke( n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
- berr, workspace( tmp_work, tmp_iwork ) );
+ min_size_iwork( bindings::size_column_op(d, trans()) ) );
+ return invoke( dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr, berr,
+ workspace( tmp_work, tmp_iwork ) );
     }
 
     //
@@ -282,15 +295,16 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- optimal_workspace ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
- berr, minimal_workspace() );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ return invoke( dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr, berr,
+ minimal_workspace() );
     }
 
     //
@@ -329,13 +343,15 @@
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR,
             typename WORK, typename RWORK >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- detail::workspace2< WORK, RWORK > work ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
+ RWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -378,36 +394,45 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(d) >= n );
- BOOST_ASSERT( bindings::size(df) >= n );
- BOOST_ASSERT( bindings::size(dl) >= n-1 );
- BOOST_ASSERT( bindings::size(dlf) >= n-1 );
- BOOST_ASSERT( bindings::size(du) >= n-1 );
- BOOST_ASSERT( bindings::size(du2) >= n-2 );
- BOOST_ASSERT( bindings::size(duf) >= n-1 );
- BOOST_ASSERT( bindings::size(ipiv) >= n );
+ BOOST_ASSERT( bindings::size(d) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(df) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(dl) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(dlf) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du2) >= bindings::size_column_op(d,
+ trans())-2 );
+ BOOST_ASSERT( bindings::size(duf) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(d,
+ trans()) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( n ));
+ min_size_rwork( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( n ));
+ min_size_work( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(d, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- n) );
- BOOST_ASSERT( n >= 0 );
- return detail::gtrfs( trans(), n, bindings::size_column(b),
- bindings::begin_value(dl), bindings::begin_value(d),
- bindings::begin_value(du), bindings::begin_value(dlf),
- bindings::begin_value(df), bindings::begin_value(duf),
- bindings::begin_value(du2), bindings::begin_value(ipiv),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x),
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ bindings::size_column_op(d, trans())) );
+ return detail::gtrfs( trans(), bindings::size_column_op(d, trans()),
+ bindings::size_column(b), bindings::begin_value(dl),
+ bindings::begin_value(d), bindings::begin_value(du),
+ bindings::begin_value(dlf), bindings::begin_value(df),
+ bindings::begin_value(duf), bindings::begin_value(du2),
+ bindings::begin_value(ipiv), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }
@@ -423,17 +448,20 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- minimal_workspace ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< value_type > tmp_work( min_size_work( n ) );
- bindings::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
- return invoke( n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
- berr, workspace( tmp_work, tmp_rwork ) );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ bindings::detail::array< value_type > tmp_work( min_size_work(
+ bindings::size_column_op(d, trans()) ) );
+ bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
+ bindings::size_column_op(d, trans()) ) );
+ return invoke( dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr, berr,
+ workspace( tmp_work, tmp_rwork ) );
     }
 
     //
@@ -447,15 +475,16 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- optimal_workspace ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
+ const VectorDUF& duf, const VectorDU2& du2,
+ const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( n, dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr,
- berr, minimal_workspace() );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ return invoke( dl, d, du, dlf, df, duf, du2, ipiv, b, x, ferr, berr,
+ minimal_workspace() );
     }
 
     //
@@ -497,14 +526,13 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-gtrfs( const fortran_int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
- const VectorDUF& duf, const VectorDU2& du2, const VectorIPIV& ipiv,
- const MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
- Workspace work ) {
+gtrfs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
+ const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr, Workspace work ) {
     return gtrfs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, dlf, df, duf, du2, ipiv,
- b, x, ferr, berr, work );
+ VectorDL >::type >::invoke( dl, d, du, dlf, df, duf, du2, ipiv, b,
+ x, ferr, berr, work );
 }
 
 //
@@ -518,13 +546,13 @@
         typename MatrixX, typename VectorFERR, typename VectorBERR >
 inline typename boost::disable_if< detail::is_workspace< VectorBERR >,
         std::ptrdiff_t >::type
-gtrfs( const fortran_int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
- const VectorDUF& duf, const VectorDU2& du2, const VectorIPIV& ipiv,
- const MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr ) {
+gtrfs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
+ const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr ) {
     return gtrfs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, dlf, df, duf, du2, ipiv,
- b, x, ferr, berr, optimal_workspace() );
+ VectorDL >::type >::invoke( dl, d, du, dlf, df, duf, du2, ipiv, b,
+ x, ferr, berr, optimal_workspace() );
 }
 
 //
@@ -539,14 +567,14 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-gtrfs( const fortran_int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
- const VectorDUF& duf, const VectorDU2& du2, const VectorIPIV& ipiv,
- const MatrixB& b, const MatrixX& x, VectorFERR& ferr,
- VectorBERR& berr, Workspace work ) {
+gtrfs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
+ const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
+ const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work ) {
     return gtrfs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, dlf, df, duf, du2, ipiv,
- b, x, ferr, berr, work );
+ VectorDL >::type >::invoke( dl, d, du, dlf, df, duf, du2, ipiv, b,
+ x, ferr, berr, work );
 }
 
 //
@@ -560,14 +588,13 @@
         typename MatrixX, typename VectorFERR, typename VectorBERR >
 inline typename boost::disable_if< detail::is_workspace< VectorBERR >,
         std::ptrdiff_t >::type
-gtrfs( const fortran_int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
- const VectorDUF& duf, const VectorDU2& du2, const VectorIPIV& ipiv,
- const MatrixB& b, const MatrixX& x, VectorFERR& ferr,
- VectorBERR& berr ) {
+gtrfs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
+ const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
+ const MatrixX& x, VectorFERR& ferr, VectorBERR& berr ) {
     return gtrfs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, dlf, df, duf, du2, ipiv,
- b, x, ferr, berr, optimal_workspace() );
+ VectorDL >::type >::invoke( dl, d, du, dlf, df, duf, du2, ipiv, b,
+ x, ferr, berr, optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gttrs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -128,10 +128,12 @@
     //
     template< typename VectorDL, typename VectorD, typename VectorDU,
             typename VectorDU2, typename VectorIPIV, typename MatrixB >
- static std::ptrdiff_t invoke( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDU2& du2, const VectorIPIV& ipiv, MatrixB& b ) {
+ static std::ptrdiff_t invoke( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDU2& du2, const VectorIPIV& ipiv,
+ MatrixB& b ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< VectorDL >::type >::type,
@@ -150,21 +152,26 @@
                 typename remove_const< typename bindings::value_type<
                 MatrixB >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
- BOOST_ASSERT( bindings::size(d) >= n );
- BOOST_ASSERT( bindings::size(dl) >= n-1 );
- BOOST_ASSERT( bindings::size(du) >= n-1 );
- BOOST_ASSERT( bindings::size(du2) >= n-2 );
- BOOST_ASSERT( bindings::size(ipiv) >= n );
+ BOOST_ASSERT( bindings::size(d) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(dl) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du2) >= bindings::size_column_op(d,
+ trans())-2 );
+ BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(d,
+ trans()) );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- n) );
- return detail::gttrs( trans(), n, bindings::size_column(b),
- bindings::begin_value(dl), bindings::begin_value(d),
- bindings::begin_value(du), bindings::begin_value(du2),
- bindings::begin_value(ipiv), bindings::begin_value(b),
- bindings::stride_major(b) );
+ bindings::size_column_op(d, trans())) );
+ return detail::gttrs( trans(), bindings::size_column_op(d, trans()),
+ bindings::size_column(b), bindings::begin_value(dl),
+ bindings::begin_value(d), bindings::begin_value(du),
+ bindings::begin_value(du2), bindings::begin_value(ipiv),
+ bindings::begin_value(b), bindings::stride_major(b) );
     }
 
 };
@@ -185,11 +192,11 @@
 //
 template< typename VectorDL, typename VectorD, typename VectorDU,
         typename VectorDU2, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t gttrs( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDU2& du2, const VectorIPIV& ipiv, MatrixB& b ) {
+inline std::ptrdiff_t gttrs( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDU2& du2, const VectorIPIV& ipiv,
+ MatrixB& b ) {
     return gttrs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, du2, ipiv, b );
+ VectorDL >::type >::invoke( dl, d, du, du2, ipiv, b );
 }
 
 //
@@ -198,11 +205,11 @@
 //
 template< typename VectorDL, typename VectorD, typename VectorDU,
         typename VectorDU2, typename VectorIPIV, typename MatrixB >
-inline std::ptrdiff_t gttrs( const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b ) {
+inline std::ptrdiff_t gttrs( const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, const VectorDU2& du2, const VectorIPIV& ipiv,
+ const MatrixB& b ) {
     return gttrs_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( n, dl, d, du, du2, ipiv, b );
+ VectorDL >::type >::invoke( dl, d, du, du2, ipiv, b );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/opmtr.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -102,6 +102,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixC >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< VectorAP >::type >::type,
@@ -141,6 +143,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         bindings::detail::array< real_type > tmp_work( min_size_work( side,
                 bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, uplo, ap, tau, c, workspace( tmp_work ) );
@@ -159,6 +163,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         return invoke( side, uplo, ap, tau, c, minimal_workspace() );
     }
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tbrfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/bandwidth.hpp>
 #include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
 #include <boost/numeric/bindings/diag_tag.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
@@ -27,6 +28,7 @@
 #include <boost/numeric/bindings/remove_imaginary.hpp>
 #include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/stride.hpp>
+#include <boost/numeric/bindings/trans_tag.hpp>
 #include <boost/numeric/bindings/uplo_tag.hpp>
 #include <boost/numeric/bindings/value_type.hpp>
 #include <boost/static_assert.hpp>
@@ -160,10 +162,10 @@
             VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
             IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< MatrixAB >::type >::type,
@@ -185,11 +187,11 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( bindings::size_column(ab) ));
+ min_size_iwork( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( bindings::size_column(ab) ));
- BOOST_ASSERT( bindings::size_column(ab) >= 0 );
+ min_size_work( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
@@ -198,16 +200,17 @@
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= kd+1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( kd >= 0 );
         return detail::tbrfs( uplo(), trans(), diag(),
- bindings::size_column(ab), kd, bindings::size_column(b),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x),
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ bindings::size_column_op(ab, trans()), kd,
+ bindings::size_column(b), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
@@ -225,12 +228,14 @@
             const MatrixAB& ab, const MatrixB& b, const MatrixX& x,
             VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( bindings::size_column(ab) ) );
+ min_size_iwork( bindings::size_column_op(ab, trans()) ) );
         return invoke( kd, ab, b, x, ferr, berr, workspace( tmp_work,
                 tmp_iwork ) );
     }
@@ -248,7 +253,9 @@
             const MatrixAB& ab, const MatrixB& b, const MatrixX& x,
             VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
         return invoke( kd, ab, b, x, ferr, berr, minimal_workspace() );
     }
@@ -292,10 +299,10 @@
             VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
             RWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< VectorFERR >::type >::type,
@@ -313,11 +320,11 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( bindings::size_column(ab) ));
+ min_size_rwork( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( bindings::size_column(ab) ));
- BOOST_ASSERT( bindings::size_column(ab) >= 0 );
+ min_size_work( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
@@ -326,16 +333,17 @@
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= kd+1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( kd >= 0 );
         return detail::tbrfs( uplo(), trans(), diag(),
- bindings::size_column(ab), kd, bindings::size_column(b),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x),
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ bindings::size_column_op(ab, trans()), kd,
+ bindings::size_column(b), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }
@@ -353,12 +361,14 @@
             const MatrixAB& ab, const MatrixB& b, const MatrixX& x,
             VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         return invoke( kd, ab, b, x, ferr, berr, workspace( tmp_work,
                 tmp_rwork ) );
     }
@@ -376,7 +386,9 @@
             const MatrixAB& ab, const MatrixB& b, const MatrixX& x,
             VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAB, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
         return invoke( kd, ab, b, x, ferr, berr, minimal_workspace() );
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tprfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -16,6 +16,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
 #include <boost/numeric/bindings/diag_tag.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
@@ -26,6 +27,7 @@
 #include <boost/numeric/bindings/remove_imaginary.hpp>
 #include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/stride.hpp>
+#include <boost/numeric/bindings/trans_tag.hpp>
 #include <boost/numeric/bindings/uplo_tag.hpp>
 #include <boost/numeric/bindings/value_type.hpp>
 #include <boost/static_assert.hpp>
@@ -154,9 +156,10 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             detail::workspace2< WORK, IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< MatrixAP >::type >::type,
@@ -178,25 +181,25 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( bindings::size_column(ap) ));
+ min_size_iwork( bindings::size_column_op(ap, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( bindings::size_column(ap) ));
- BOOST_ASSERT( bindings::size_column(ap) >= 0 );
+ min_size_work( bindings::size_column_op(ap, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ap, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ap)) );
+ bindings::size_column_op(ap, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ap)) );
+ bindings::size_column_op(ap, trans())) );
         return detail::tprfs( uplo(), trans(), diag(),
- bindings::size_column(ap), bindings::size_column(b),
- bindings::begin_value(ap), bindings::begin_value(b),
- bindings::stride_major(b), bindings::begin_value(x),
- bindings::stride_major(x), bindings::begin_value(ferr),
- bindings::begin_value(berr),
+ bindings::size_column_op(ap, trans()),
+ bindings::size_column(b), bindings::begin_value(ap),
+ bindings::begin_value(b), bindings::stride_major(b),
+ bindings::begin_value(x), bindings::stride_major(x),
+ bindings::begin_value(ferr), bindings::begin_value(berr),
                 bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
@@ -214,12 +217,14 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- bindings::size_column(ap) ) );
+ bindings::size_column_op(ap, trans()) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( bindings::size_column(ap) ) );
+ min_size_iwork( bindings::size_column_op(ap, trans()) ) );
         return invoke( ap, b, x, ferr, berr, workspace( tmp_work,
                 tmp_iwork ) );
     }
@@ -237,7 +242,9 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
         return invoke( ap, b, x, ferr, berr, minimal_workspace() );
     }
@@ -280,9 +287,10 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             detail::workspace2< WORK, RWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< VectorFERR >::type >::type,
@@ -300,25 +308,25 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( bindings::size_column(ap) ));
+ min_size_rwork( bindings::size_column_op(ap, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( bindings::size_column(ap) ));
- BOOST_ASSERT( bindings::size_column(ap) >= 0 );
+ min_size_work( bindings::size_column_op(ap, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ap, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ap)) );
+ bindings::size_column_op(ap, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ap)) );
+ bindings::size_column_op(ap, trans())) );
         return detail::tprfs( uplo(), trans(), diag(),
- bindings::size_column(ap), bindings::size_column(b),
- bindings::begin_value(ap), bindings::begin_value(b),
- bindings::stride_major(b), bindings::begin_value(x),
- bindings::stride_major(x), bindings::begin_value(ferr),
- bindings::begin_value(berr),
+ bindings::size_column_op(ap, trans()),
+ bindings::size_column(b), bindings::begin_value(ap),
+ bindings::begin_value(b), bindings::stride_major(b),
+ bindings::begin_value(x), bindings::stride_major(x),
+ bindings::begin_value(ferr), bindings::begin_value(berr),
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }
@@ -336,12 +344,14 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- bindings::size_column(ap) ) );
+ bindings::size_column_op(ap, trans()) ) );
         bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
- bindings::size_column(ap) ) );
+ bindings::size_column_op(ap, trans()) ) );
         return invoke( ap, b, x, ferr, berr, workspace( tmp_work,
                 tmp_rwork ) );
     }
@@ -359,7 +369,9 @@
             const MatrixX& x, VectorFERR& ferr, VectorBERR& berr,
             optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
         return invoke( ap, b, x, ferr, berr, minimal_workspace() );
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tptrs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -16,12 +16,13 @@
 
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
 #include <boost/numeric/bindings/diag_tag.hpp>
-#include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_mutable.hpp>
 #include <boost/numeric/bindings/remove_imaginary.hpp>
 #include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/stride.hpp>
+#include <boost/numeric/bindings/trans_tag.hpp>
 #include <boost/numeric/bindings/uplo_tag.hpp>
 #include <boost/numeric/bindings/value_type.hpp>
 #include <boost/static_assert.hpp>
@@ -131,24 +132,25 @@
     template< typename MatrixAP, typename MatrixB >
     static std::ptrdiff_t invoke( const MatrixAP& ap, MatrixB& b ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
+ typedef typename result_of::data_order< MatrixB >::type order;
+ typedef typename result_of::trans_tag< MatrixAP, order >::type trans;
+ typedef typename result_of::uplo_tag< MatrixAP, trans >::type uplo;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< MatrixAP >::type >::type,
                 typename remove_const< typename bindings::value_type<
                 MatrixB >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
- BOOST_ASSERT( bindings::size_column(ap) >= 0 );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ap, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ap)) );
+ bindings::size_column_op(ap, trans())) );
         return detail::tptrs( uplo(), trans(), diag(),
- bindings::size_column(ap), bindings::size_column(b),
- bindings::begin_value(ap), bindings::begin_value(b),
- bindings::stride_major(b) );
+ bindings::size_column_op(ap, trans()),
+ bindings::size_column(b), bindings::begin_value(ap),
+ bindings::begin_value(b), bindings::stride_major(b) );
     }
 
 };

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/upmtr.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -104,6 +104,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixC >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename bindings::value_type< VectorAP >::type >::type,
@@ -143,6 +145,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         bindings::detail::array< value_type > tmp_work( min_size_work( side,
                 bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, uplo, ap, tau, c, workspace( tmp_work ) );
@@ -161,6 +165,8 @@
             const VectorAP& ap, const VectorTAU& tau, MatrixC& c,
             optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorAP, order >::type trans;
         return invoke( side, uplo, ap, tau, c, minimal_workspace() );
     }
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -41,12 +41,12 @@
 #include <boost/numeric/bindings/lapack/driver/ggglm.hpp>
 #include <boost/numeric/bindings/lapack/driver/gglse.hpp>
 #include <boost/numeric/bindings/lapack/driver/gbsv.hpp>
-// #include <boost/numeric/bindings/lapack/driver/gbsvx.hpp>
+#include <boost/numeric/bindings/lapack/driver/gbsvx.hpp>
 #include <boost/numeric/bindings/lapack/driver/gejsv.hpp>
 #include <boost/numeric/bindings/lapack/driver/gesv.hpp>
 #include <boost/numeric/bindings/lapack/driver/gesvx.hpp>
 #include <boost/numeric/bindings/lapack/driver/gtsv.hpp>
-// #include <boost/numeric/bindings/lapack/driver/gtsvx.hpp>
+#include <boost/numeric/bindings/lapack/driver/gtsvx.hpp>
 #include <boost/numeric/bindings/lapack/driver/hesv.hpp>
 #include <boost/numeric/bindings/lapack/driver/hesvx.hpp>
 #include <boost/numeric/bindings/lapack/driver/hpsv.hpp>

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/bandwidth.hpp>
 #include <boost/numeric/bindings/begin.hpp>
+#include <boost/numeric/bindings/data_order.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_complex.hpp>
@@ -26,6 +27,7 @@
 #include <boost/numeric/bindings/remove_imaginary.hpp>
 #include <boost/numeric/bindings/size.hpp>
 #include <boost/numeric/bindings/stride.hpp>
+#include <boost/numeric/bindings/trans_tag.hpp>
 #include <boost/numeric/bindings/value_type.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -165,8 +167,8 @@
             VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
             IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAFB >::value) );
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -206,14 +208,14 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
- BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
+ BOOST_ASSERT( bindings::bandwidth_lower_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( bindings::size_column(ab) ));
+ min_size_iwork( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( bindings::size_column(ab) ));
- BOOST_ASSERT( bindings::size_column(ab) >= 0 );
+ min_size_work( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::size_minor(afb) == 1 ||
@@ -223,30 +225,33 @@
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >=
- bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab))+1 );
+ bindings::bandwidth_lower_op(ab, trans())+
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans()))+1 );
         BOOST_ASSERT( bindings::stride_major(afb) >=
- 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab))+1 );
+ 2*bindings::bandwidth_lower_op(ab, trans())+
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans()))+1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
- BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab)) >= 0 );
+ bindings::size_column_op(ab, trans())) );
+ BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())) >= 0 );
         BOOST_ASSERT( equed == 'N' || equed == 'R' || equed == 'C' ||
                 equed == 'B' );
         BOOST_ASSERT( fact == 'F' || fact == 'N' || fact == 'E' );
- return detail::gbsvx( fact, trans(), bindings::size_column(ab),
- bindings::bandwidth_lower(ab), (bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab)), bindings::size_column(b),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(afb), bindings::stride_major(afb),
- bindings::begin_value(ipiv), equed, bindings::begin_value(r),
- bindings::begin_value(c), bindings::begin_value(b),
- bindings::stride_major(b), bindings::begin_value(x),
- bindings::stride_major(x), rcond, bindings::begin_value(ferr),
- bindings::begin_value(berr),
+ return detail::gbsvx( fact, trans(), bindings::size_column_op(ab,
+ trans()), bindings::bandwidth_lower_op(ab, trans()),
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())),
+ bindings::size_column(b), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(afb),
+ bindings::stride_major(afb), bindings::begin_value(ipiv),
+ equed, bindings::begin_value(r), bindings::begin_value(c),
+ bindings::begin_value(b), bindings::stride_major(b),
+ bindings::begin_value(x), bindings::stride_major(x), rcond,
+ bindings::begin_value(ferr), bindings::begin_value(berr),
                 bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
@@ -266,10 +271,12 @@
             VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
             VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( bindings::size_column(ab) ) );
+ min_size_iwork( bindings::size_column_op(ab, trans()) ) );
         return invoke( fact, ab, afb, ipiv, equed, r, c, b, x, rcond, ferr,
                 berr, workspace( tmp_work, tmp_iwork ) );
     }
@@ -289,6 +296,8 @@
             VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
             VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         return invoke( fact, ab, afb, ipiv, equed, r, c, b, x, rcond, ferr,
                 berr, minimal_workspace() );
     }
@@ -334,8 +343,8 @@
             VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
             RWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
- BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAFB >::value) );
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -371,14 +380,14 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
- BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
+ BOOST_ASSERT( bindings::bandwidth_lower_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( bindings::size_column(ab) ));
+ min_size_rwork( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( bindings::size_column(ab) ));
- BOOST_ASSERT( bindings::size_column(ab) >= 0 );
+ min_size_work( bindings::size_column_op(ab, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::size_minor(afb) == 1 ||
@@ -388,30 +397,33 @@
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >=
- bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab))+1 );
+ bindings::bandwidth_lower_op(ab, trans())+
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans()))+1 );
         BOOST_ASSERT( bindings::stride_major(afb) >=
- 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab))+1 );
+ 2*bindings::bandwidth_lower_op(ab, trans())+
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans()))+1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
+ bindings::size_column_op(ab, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- bindings::size_column(ab)) );
- BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab)) >= 0 );
+ bindings::size_column_op(ab, trans())) );
+ BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())) >= 0 );
         BOOST_ASSERT( equed == 'N' || equed == 'R' || equed == 'C' ||
                 equed == 'B' );
         BOOST_ASSERT( fact == 'F' || fact == 'N' || fact == 'E' );
- return detail::gbsvx( fact, trans(), bindings::size_column(ab),
- bindings::bandwidth_lower(ab), (bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab)), bindings::size_column(b),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(afb), bindings::stride_major(afb),
- bindings::begin_value(ipiv), equed, bindings::begin_value(r),
- bindings::begin_value(c), bindings::begin_value(b),
- bindings::stride_major(b), bindings::begin_value(x),
- bindings::stride_major(x), rcond, bindings::begin_value(ferr),
- bindings::begin_value(berr),
+ return detail::gbsvx( fact, trans(), bindings::size_column_op(ab,
+ trans()), bindings::bandwidth_lower_op(ab, trans()),
+ (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())),
+ bindings::size_column(b), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(afb),
+ bindings::stride_major(afb), bindings::begin_value(ipiv),
+ equed, bindings::begin_value(r), bindings::begin_value(c),
+ bindings::begin_value(b), bindings::stride_major(b),
+ bindings::begin_value(x), bindings::stride_major(x), rcond,
+ bindings::begin_value(ferr), bindings::begin_value(berr),
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }
@@ -431,10 +443,12 @@
             VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
             VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
- bindings::size_column(ab) ) );
+ bindings::size_column_op(ab, trans()) ) );
         return invoke( fact, ab, afb, ipiv, equed, r, c, b, x, rcond, ferr,
                 berr, workspace( tmp_work, tmp_rwork ) );
     }
@@ -454,6 +468,8 @@
             VectorC& c, MatrixB& b, MatrixX& x, real_type& rcond,
             VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef typename result_of::data_order< MatrixAFB >::type order;
+ typedef typename result_of::trans_tag< MatrixAB, order >::type trans;
         return invoke( fact, ab, afb, ipiv, equed, r, c, b, x, rcond, ferr,
                 berr, minimal_workspace() );
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gtsvx.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -161,13 +161,14 @@
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR,
             typename WORK, typename IWORK >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
- IWORK > work ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, detail::workspace2< WORK, IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -219,32 +220,36 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(d) >= n );
- BOOST_ASSERT( bindings::size(dl) >= n-1 );
- BOOST_ASSERT( bindings::size(du) >= n-1 );
+ BOOST_ASSERT( bindings::size(d) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(dl) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du) >= bindings::size_column_op(d,
+ trans())-1 );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( n ));
+ min_size_iwork( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( n ));
+ min_size_work( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(d, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( fact == 'F' || fact == 'N' );
- BOOST_ASSERT( n >= 0 );
- return detail::gtsvx( fact, trans(), n, bindings::size_column(b),
- bindings::begin_value(dl), bindings::begin_value(d),
- bindings::begin_value(du), bindings::begin_value(dlf),
- bindings::begin_value(df), bindings::begin_value(duf),
- bindings::begin_value(du2), bindings::begin_value(ipiv),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x), rcond,
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ return detail::gtsvx( fact, trans(), bindings::size_column_op(d,
+ trans()), bindings::size_column(b), bindings::begin_value(dl),
+ bindings::begin_value(d), bindings::begin_value(du),
+ bindings::begin_value(dlf), bindings::begin_value(df),
+ bindings::begin_value(duf), bindings::begin_value(du2),
+ bindings::begin_value(ipiv), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), rcond, bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
@@ -260,17 +265,20 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ bindings::detail::array< real_type > tmp_work( min_size_work(
+ bindings::size_column_op(d, trans()) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( n ) );
- return invoke( fact, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
- rcond, ferr, berr, workspace( tmp_work, tmp_iwork ) );
+ min_size_iwork( bindings::size_column_op(d, trans()) ) );
+ return invoke( fact, dl, d, du, dlf, df, duf, du2, ipiv, b, x, rcond,
+ ferr, berr, workspace( tmp_work, tmp_iwork ) );
     }
 
     //
@@ -284,14 +292,16 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( fact, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
- rcond, ferr, berr, minimal_workspace() );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ return invoke( fact, dl, d, du, dlf, df, duf, du2, ipiv, b, x, rcond,
+ ferr, berr, minimal_workspace() );
     }
 
     //
@@ -330,13 +340,14 @@
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR,
             typename WORK, typename RWORK >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, detail::workspace2< WORK,
- RWORK > work ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, detail::workspace2< WORK, RWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixX >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -384,32 +395,36 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorFERR >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorBERR >::value) );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(d) >= n );
- BOOST_ASSERT( bindings::size(dl) >= n-1 );
- BOOST_ASSERT( bindings::size(du) >= n-1 );
+ BOOST_ASSERT( bindings::size(d) >= bindings::size_column_op(d,
+ trans()) );
+ BOOST_ASSERT( bindings::size(dl) >= bindings::size_column_op(d,
+ trans())-1 );
+ BOOST_ASSERT( bindings::size(du) >= bindings::size_column_op(d,
+ trans())-1 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( n ));
+ min_size_rwork( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( n ));
+ min_size_work( bindings::size_column_op(d, trans()) ));
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
+ BOOST_ASSERT( bindings::size_column_op(d, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
                 bindings::stride_minor(b) == 1 );
         BOOST_ASSERT( bindings::size_minor(x) == 1 ||
                 bindings::stride_minor(x) == 1 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( bindings::stride_major(x) >= std::max< std::ptrdiff_t >(1,
- n) );
+ bindings::size_column_op(d, trans())) );
         BOOST_ASSERT( fact == 'F' || fact == 'N' );
- BOOST_ASSERT( n >= 0 );
- return detail::gtsvx( fact, trans(), n, bindings::size_column(b),
- bindings::begin_value(dl), bindings::begin_value(d),
- bindings::begin_value(du), bindings::begin_value(dlf),
- bindings::begin_value(df), bindings::begin_value(duf),
- bindings::begin_value(du2), bindings::begin_value(ipiv),
- bindings::begin_value(b), bindings::stride_major(b),
- bindings::begin_value(x), bindings::stride_major(x), rcond,
- bindings::begin_value(ferr), bindings::begin_value(berr),
+ return detail::gtsvx( fact, trans(), bindings::size_column_op(d,
+ trans()), bindings::size_column(b), bindings::begin_value(dl),
+ bindings::begin_value(d), bindings::begin_value(du),
+ bindings::begin_value(dlf), bindings::begin_value(df),
+ bindings::begin_value(duf), bindings::begin_value(du2),
+ bindings::begin_value(ipiv), bindings::begin_value(b),
+ bindings::stride_major(b), bindings::begin_value(x),
+ bindings::stride_major(x), rcond, bindings::begin_value(ferr),
+ bindings::begin_value(berr),
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }
@@ -425,16 +440,20 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, minimal_workspace ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< value_type > tmp_work( min_size_work( n ) );
- bindings::detail::array< real_type > tmp_rwork( min_size_rwork( n ) );
- return invoke( fact, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
- rcond, ferr, berr, workspace( tmp_work, tmp_rwork ) );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ bindings::detail::array< value_type > tmp_work( min_size_work(
+ bindings::size_column_op(d, trans()) ) );
+ bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
+ bindings::size_column_op(d, trans()) ) );
+ return invoke( fact, dl, d, du, dlf, df, duf, du2, ipiv, b, x, rcond,
+ ferr, berr, workspace( tmp_work, tmp_rwork ) );
     }
 
     //
@@ -448,14 +467,16 @@
             typename VectorDLF, typename VectorDF, typename VectorDUF,
             typename VectorDU2, typename VectorIPIV, typename MatrixB,
             typename MatrixX, typename VectorFERR, typename VectorBERR >
- static std::ptrdiff_t invoke( const char fact, const fortran_int_t n,
- const VectorDL& dl, const VectorD& d, const VectorDU& du,
- VectorDLF& dlf, VectorDF& df, VectorDUF& duf, VectorDU2& du2,
- VectorIPIV& ipiv, const MatrixB& b, MatrixX& x, real_type& rcond,
- VectorFERR& ferr, VectorBERR& berr, optimal_workspace ) {
+ static std::ptrdiff_t invoke( const char fact, const VectorDL& dl,
+ const VectorD& d, const VectorDU& du, VectorDLF& dlf,
+ VectorDF& df, VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv,
+ const MatrixB& b, MatrixX& x, real_type& rcond, VectorFERR& ferr,
+ VectorBERR& berr, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( fact, n, dl, d, du, dlf, df, duf, du2, ipiv, b, x,
- rcond, ferr, berr, minimal_workspace() );
+ typedef tag::column_major order;
+ typedef typename result_of::trans_tag< VectorD, order >::type trans;
+ return invoke( fact, dl, d, du, dlf, df, duf, du2, ipiv, b, x, rcond,
+ ferr, berr, minimal_workspace() );
     }
 
     //
@@ -497,14 +518,14 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-gtsvx( const char fact, const fortran_int_t n, const VectorDL& dl,
- const VectorD& d, const VectorDU& du, VectorDLF& dlf, VectorDF& df,
- VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, typename remove_imaginary< typename bindings::value_type<
+gtsvx( const char fact, const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, VectorDLF& dlf, VectorDF& df, VectorDUF& duf,
+ VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ typename remove_imaginary< typename bindings::value_type<
         VectorDL >::type >::type& rcond, VectorFERR& ferr, VectorBERR& berr,
         Workspace work ) {
     return gtsvx_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( fact, n, dl, d, du, dlf, df, duf, du2,
+ VectorDL >::type >::invoke( fact, dl, d, du, dlf, df, duf, du2,
             ipiv, b, x, rcond, ferr, berr, work );
 }
 
@@ -519,13 +540,13 @@
         typename MatrixX, typename VectorFERR, typename VectorBERR >
 inline typename boost::disable_if< detail::is_workspace< VectorBERR >,
         std::ptrdiff_t >::type
-gtsvx( const char fact, const fortran_int_t n, const VectorDL& dl,
- const VectorD& d, const VectorDU& du, VectorDLF& dlf, VectorDF& df,
- VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, typename remove_imaginary< typename bindings::value_type<
+gtsvx( const char fact, const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, VectorDLF& dlf, VectorDF& df, VectorDUF& duf,
+ VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ typename remove_imaginary< typename bindings::value_type<
         VectorDL >::type >::type& rcond, VectorFERR& ferr, VectorBERR& berr ) {
     return gtsvx_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( fact, n, dl, d, du, dlf, df, duf, du2,
+ VectorDL >::type >::invoke( fact, dl, d, du, dlf, df, duf, du2,
             ipiv, b, x, rcond, ferr, berr, optimal_workspace() );
 }
 
@@ -541,14 +562,14 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-gtsvx( const char fact, const fortran_int_t n, const VectorDL& dl,
- const VectorD& d, const VectorDU& du, VectorDLF& dlf, VectorDF& df,
- VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b,
- const MatrixX& x, typename remove_imaginary<
- typename bindings::value_type< VectorDL >::type >::type& rcond,
- VectorFERR& ferr, VectorBERR& berr, Workspace work ) {
+gtsvx( const char fact, const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, VectorDLF& dlf, VectorDF& df, VectorDUF& duf,
+ VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b, const MatrixX& x,
+ typename remove_imaginary< typename bindings::value_type<
+ VectorDL >::type >::type& rcond, VectorFERR& ferr, VectorBERR& berr,
+ Workspace work ) {
     return gtsvx_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( fact, n, dl, d, du, dlf, df, duf, du2,
+ VectorDL >::type >::invoke( fact, dl, d, du, dlf, df, duf, du2,
             ipiv, b, x, rcond, ferr, berr, work );
 }
 
@@ -563,14 +584,13 @@
         typename MatrixX, typename VectorFERR, typename VectorBERR >
 inline typename boost::disable_if< detail::is_workspace< VectorBERR >,
         std::ptrdiff_t >::type
-gtsvx( const char fact, const fortran_int_t n, const VectorDL& dl,
- const VectorD& d, const VectorDU& du, VectorDLF& dlf, VectorDF& df,
- VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b,
- const MatrixX& x, typename remove_imaginary<
- typename bindings::value_type< VectorDL >::type >::type& rcond,
- VectorFERR& ferr, VectorBERR& berr ) {
+gtsvx( const char fact, const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, VectorDLF& dlf, VectorDF& df, VectorDUF& duf,
+ VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b, const MatrixX& x,
+ typename remove_imaginary< typename bindings::value_type<
+ VectorDL >::type >::type& rcond, VectorFERR& ferr, VectorBERR& berr ) {
     return gtsvx_impl< typename bindings::value_type<
- VectorDL >::type >::invoke( fact, n, dl, d, du, dlf, df, duf, du2,
+ VectorDL >::type >::invoke( fact, dl, d, du, dlf, df, duf, du2,
             ipiv, b, x, rcond, ferr, berr, optimal_workspace() );
 }
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gtrfs.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gtrfs.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gtrfs.qbk 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -9,10 +9,10 @@
 [heading Prototype]
 There is one prototype of `gtrfs` available, please see below.
 ``
-gtrfs( const int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDLF& dlf, const VectorDF& df,
- const VectorDUF& duf, const VectorDU2& du2, const VectorIPIV& ipiv,
- const MatrixB& b, MatrixX& x, VectorFERR& ferr, VectorBERR& berr );
+gtrfs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDLF& dlf, const VectorDF& df, const VectorDUF& duf,
+ const VectorDU2& du2, const VectorIPIV& ipiv, const MatrixB& b,
+ MatrixX& x, VectorFERR& ferr, VectorBERR& berr );
 ``
 
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gttrs.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gttrs.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/computational/gttrs.qbk 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -9,9 +9,8 @@
 [heading Prototype]
 There is one prototype of `gttrs` available, please see below.
 ``
-gttrs( const int_t n, const VectorDL& dl, const VectorD& d,
- const VectorDU& du, const VectorDU2& du2, const VectorIPIV& ipiv,
- MatrixB& b );
+gttrs( const VectorDL& dl, const VectorD& d, const VectorDU& du,
+ const VectorDU2& du2, const VectorIPIV& ipiv, MatrixB& b );
 ``
 
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/gtsvx.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/gtsvx.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/gtsvx.qbk 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -9,10 +9,10 @@
 [heading Prototype]
 There is one prototype of `gtsvx` available, please see below.
 ``
-gtsvx( const char fact, const int_t n, const VectorDL& dl,
- const VectorD& d, const VectorDU& du, VectorDLF& dlf, VectorDF& df,
- VectorDUF& duf, VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b,
- MatrixX& x, Scalar >, VectorFERR& ferr, VectorBERR& berr );
+gtsvx( const char fact, const VectorDL& dl, const VectorD& d,
+ const VectorDU& du, VectorDLF& dlf, VectorDF& df, VectorDUF& duf,
+ VectorDU2& du2, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ Scalar >, VectorFERR& ferr, VectorBERR& berr );
 ``
 
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -288,6 +288,9 @@
               includes += [ '#include <boost/numeric/bindings/data_order.hpp>' ]
               del matrix_wo_trans[0]
               del matrix_wo_trans_arg[0]
+ elif 'TRANS' in info_map[ subroutine ][ 'arguments' ]:
+ # FIXME: workaround such that tridiagonal stuff has a chance to pass compile test even if a 'TRANS' argument is present.
+ typedef_list.insert( 0, 'typedef tag::column_major order;' )
 
         # in LAPACK, every matrix that is not
         # * transposeable
@@ -382,7 +385,7 @@
           # make sure trans tags always preceed other tags, as they may be dependant
           if 'TRANS' in arg:
               at_i = 0
- if len(typedef_list)>0 and '_order<' in typedef_list[0]:
+ if len(typedef_list)>0 and ' order;' in typedef_list[0]:
                 at_i = 1
               typedef_list.insert( at_i, info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'typedef' ] )
           else:

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -1,3 +1,5 @@
+$TEMPLATE[larfb.all.TRANS.trait_of]
+V
 $TEMPLATE[larfb.all.WORK.type]
 vector
 $TEMPLATE[larfb.all.fixme]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gtrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gtrfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,7 @@
+$TEMPLATE[gtrfs.all.fixme]
+The matrix should be A, not its diagonal D
+$TEMPLATE[gtrfs.all.N.trait_of]
+D
+$TEMPLATE[gtrfs.all.TRANS.trait_of]
+D
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gttrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gttrs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,7 @@
+$TEMPLATE[gttrs.all.fixme]
+The matrix should be A, not its diagonal D
+$TEMPLATE[gttrs.all.N.trait_of]
+D
+$TEMPLATE[gttrs.all.TRANS.trait_of]
+D
+$TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/opmtr.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -1,3 +1,5 @@
+$TEMPLATE[opmtr.all.TRANS.trait_of]
+AP
 $TEMPLATE[opmtr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[opmtr.includes]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbrfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[tbrfs.all.TRANS.trait_of]
+AB
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tprfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tprfs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[tprfs.all.TRANS.trait_of]
+AP
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tptrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tptrs.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[tptrs.all.TRANS.trait_of]
+AP
+$TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/upmtr.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -1,3 +1,5 @@
+$TEMPLATE[upmtr.all.TRANS.trait_of]
+AP
 $TEMPLATE[upmtr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[upmtr.includes]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gbsvx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gbsvx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gbsvx.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -1,3 +1,5 @@
+$TEMPLATE[gbsvx.all.TRANS.trait_of]
+AB
 $TEMPLATE[gbsvx.all.KU.trait]
 num_super_sub,AB
 $TEMPLATE[gbsvx.real.min_size_iwork.args]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gtsvx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gtsvx.hpp 2010-07-12 19:00:10 EDT (Mon, 12 Jul 2010)
@@ -0,0 +1,7 @@
+$TEMPLATE[gtsvx.all.fixme]
+The matrix should be A, not its diagonal D
+$TEMPLATE[gtsvx.all.N.trait_of]
+D
+$TEMPLATE[gtsvx.all.TRANS.trait_of]
+D
+$TEMPLATE[end]


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