Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63465 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/auxiliary boost/numeric/bindings/lapack/computational boost/numeric/bindings/lapack/driver libs/numeric/bindings/tools libs/numeric/bindings/tools/templates/computational
From: thomas.klimpel_at_[hidden]
Date: 2010-06-30 19:54:43


Author: klimpel
Date: 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
New Revision: 63465
URL: http://svn.boost.org/trac/boost/changeset/63465

Log:
- Improved whitespace handling of match_assert_ge (formula parsing)
- Override wrong formula in documentation of gbrfs and added missing parentheses for num_super_sub trait, which would have been important for the initial wrong formula.
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbrfs.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrs.hpp | 6 +
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp | 94 +++++++++++++++++++++++++--------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp | 6 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp | 8 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp | 1
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp | 8 +++
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp | 24 ++++++++++
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp | 8 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsvx.hpp | 24 +++++-----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 25 ++++++----
   16 files changed, 141 insertions(+), 75 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrs.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -159,7 +159,8 @@
         BOOST_ASSERT( bindings::size_column_op(a, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
- BOOST_ASSERT( bindings::stride_major(a) >= ?MAX );
+ BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
         BOOST_ASSERT( normin == 'Y' || normin == 'N' );
         return detail::latrs( uplo, trans(), diag(), normin,
                 bindings::size_column_op(a, trans()),
@@ -203,7 +204,8 @@
         BOOST_ASSERT( bindings::size_column_op(a, trans()) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
- BOOST_ASSERT( bindings::stride_major(a) >= ?MAX );
+ BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
         BOOST_ASSERT( normin == 'Y' || normin == 'N' );
         return detail::latrs( uplo, trans(), diag(), normin,
                 bindings::size_column_op(a, trans()),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbrfs.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 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>
@@ -162,8 +164,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<
@@ -189,16 +191,16 @@
         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_upper(ab) >= 0 );
+ BOOST_ASSERT( bindings::bandwidth_lower_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ab) );
+ BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(ab,
+ trans()) );
         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 ||
@@ -208,15 +210,23 @@
         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)+
- 1 );
- BOOST_ASSERT( bindings::stride_major(afb) >= 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(afb) >=
+ 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)) );
- return detail::gbrfs( trans(), bindings::size_column(ab),
- bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
+ bindings::size_column_op(ab, trans())) );
+ BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())) >= 0 );
+ return detail::gbrfs( 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),
@@ -241,10 +251,12 @@
             const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
             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( ab, afb, ipiv, b, x, ferr, berr, workspace( tmp_work,
                 tmp_iwork ) );
     }
@@ -263,6 +275,8 @@
             const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
             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( ab, afb, ipiv, b, x, ferr, berr, minimal_workspace() );
     }
 
@@ -305,8 +319,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<
@@ -328,16 +342,16 @@
         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_upper(ab) >= 0 );
+ BOOST_ASSERT( bindings::bandwidth_lower_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size(berr) >= bindings::size_column(b) );
- BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ab) );
+ BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(ab,
+ trans()) );
         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 ||
@@ -347,15 +361,23 @@
         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)+
- 1 );
- BOOST_ASSERT( bindings::stride_major(afb) >= 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(afb) >=
+ 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)) );
- return detail::gbrfs( trans(), bindings::size_column(ab),
- bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
+ bindings::size_column_op(ab, trans())) );
+ BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())) >= 0 );
+ return detail::gbrfs( 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),
@@ -380,10 +402,12 @@
             const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
             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( ab, afb, ipiv, b, x, ferr, berr, workspace( tmp_work,
                 tmp_rwork ) );
     }
@@ -402,6 +426,8 @@
             const VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
             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( ab, afb, ipiv, b, x, ferr, berr, minimal_workspace() );
     }
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrf.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -122,8 +122,6 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixAB >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIPIV >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
- BOOST_ASSERT( bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab) >= 0 );
         BOOST_ASSERT( bindings::size(ipiv) >= std::min<
                 std::ptrdiff_t >(bindings::size_row(ab),
                 bindings::size_column(ab)) );
@@ -132,9 +130,11 @@
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::size_row(ab) >= 0 );
         BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
+ BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)) >= 0 );
         return detail::gbtrf( bindings::size_row(ab),
                 bindings::size_column(ab), bindings::bandwidth_lower(ab),
- bindings::bandwidth_upper(ab)-bindings::bandwidth_lower(ab),
+ (bindings::bandwidth_upper(ab)-bindings::bandwidth_lower(ab)),
                 bindings::begin_value(ab), bindings::stride_major(ab),
                 bindings::begin_value(ipiv) );
     }

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbtrs.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -140,8 +140,6 @@
                 MatrixB >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower_op(ab, trans()) >= 0 );
- BOOST_ASSERT( bindings::bandwidth_upper_op(ab, trans())-
- bindings::bandwidth_lower_op(ab, trans()) >= 0 );
         BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column_op(ab,
                 trans()) );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
@@ -153,10 +151,12 @@
         BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column_op(ab, trans())) );
+ BOOST_ASSERT( (bindings::bandwidth_upper_op(ab, trans())-
+ bindings::bandwidth_lower_op(ab, trans())) >= 0 );
         return detail::gbtrs( 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::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(ipiv),
                 bindings::begin_value(b), bindings::stride_major(b) );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hetrf.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -101,6 +101,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIPIV >::value) );
+ BOOST_ASSERT( bindings::size(work.select(value_type())) >= 1 );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
                 min_size_work());
         BOOST_ASSERT( bindings::size_column(a) >= 0 );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hgeqz.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -203,6 +203,10 @@
                 bindings::stride_minor(t) == 1 );
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
+ BOOST_ASSERT( bindings::stride_major(h) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(h)) );
+ BOOST_ASSERT( bindings::stride_major(t) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(h)) );
         BOOST_ASSERT( compq == 'N' || compq == 'I' || compq == 'V' );
         BOOST_ASSERT( compz == 'N' || compz == 'I' || compz == 'V' );
         BOOST_ASSERT( job == 'E' || job == 'S' );
@@ -344,6 +348,10 @@
                 bindings::stride_minor(t) == 1 );
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
+ BOOST_ASSERT( bindings::stride_major(h) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(h)) );
+ BOOST_ASSERT( bindings::stride_major(t) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(h)) );
         BOOST_ASSERT( compq == 'N' || compq == 'I' || compq == 'V' );
         BOOST_ASSERT( compz == 'N' || compz == 'I' || compz == 'V' );
         BOOST_ASSERT( job == 'E' || job == 'S' );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -214,6 +214,18 @@
                 bindings::stride_minor(e) == 1 );
         BOOST_ASSERT( bindings::size_minor(f) == 1 ||
                 bindings::stride_minor(f) == 1 );
+ BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(b)) );
+ BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(d) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(e) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(b)) );
+ BOOST_ASSERT( bindings::stride_major(f) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
         return detail::tgsyl( trans(), ijob, bindings::size_column_op(a,
                 trans()), bindings::size_column(b), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(b),
@@ -375,6 +387,18 @@
                 bindings::stride_minor(e) == 1 );
         BOOST_ASSERT( bindings::size_minor(f) == 1 ||
                 bindings::stride_minor(f) == 1 );
+ BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(b)) );
+ BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(d) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
+ BOOST_ASSERT( bindings::stride_major(e) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(b)) );
+ BOOST_ASSERT( bindings::stride_major(f) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column_op(a, trans())) );
         return detail::tgsyl( trans(), ijob, bindings::size_column_op(a,
                 trans()), bindings::size_column(b), bindings::begin_value(a),
                 bindings::stride_major(a), bindings::begin_value(b),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gbsv.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -132,8 +132,6 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorIPIV >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
- BOOST_ASSERT( bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab) >= 0 );
         BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ab) );
         BOOST_ASSERT( bindings::size_column(ab) >= 0 );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
@@ -144,9 +142,11 @@
         BOOST_ASSERT( bindings::stride_major(ab) >= 2 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(ab)) );
+ BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)) >= 0 );
         return detail::gbsv( bindings::size_column(ab),
- bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab)-
- bindings::bandwidth_lower(ab), bindings::size_column(b),
+ 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(ipiv), bindings::begin_value(b),
                 bindings::stride_major(b) );

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-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -207,8 +207,6 @@
         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_upper(ab)-
- bindings::bandwidth_lower(ab) >= 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) ));
@@ -225,19 +223,21 @@
         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(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
         BOOST_ASSERT( bindings::stride_major(afb) >= 2 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(ab)) );
         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 );
         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::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),
@@ -370,8 +370,6 @@
         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_upper(ab)-
- bindings::bandwidth_lower(ab) >= 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) ));
@@ -388,19 +386,21 @@
         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(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
         BOOST_ASSERT( bindings::stride_major(afb) >= 2 );
         BOOST_ASSERT( bindings::stride_major(b) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(ab)) );
         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 );
         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::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),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbev.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -124,7 +124,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
         return detail::hbev( jobz, uplo(), bindings::size_column(ab),
                 bindings::bandwidth(ab, uplo()), bindings::begin_value(ab),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -131,7 +131,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
         return detail::hbevd( jobz, uplo(), bindings::size_column(ab),
                 bindings::bandwidth(ab, uplo()), bindings::begin_value(ab),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevx.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -151,7 +151,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( bindings::stride_major(q) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(ab)) );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbev.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -124,7 +124,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
         return detail::sbev( jobz, uplo(), bindings::size_column(ab),
                 bindings::bandwidth(ab, uplo()), bindings::begin_value(ab),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -130,7 +130,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
         return detail::sbevd( jobz, uplo(), bindings::size_column(ab),
                 bindings::bandwidth(ab, uplo()), bindings::begin_value(ab),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevx.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -149,7 +149,7 @@
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >= bindings::bandwidth(ab,
- uplo()) );
+ uplo())+1 );
         BOOST_ASSERT( bindings::stride_major(q) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(ab)) );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -219,14 +219,14 @@
 
     if properties[ 'trait_type' ] == 'num_super_sub':
       if 'ref_trans' not in arg_map[ properties[ 'trait_of' ][ 0 ] ]:
- result = "$NAMESPACEbandwidth_upper(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ result = "($NAMESPACEbandwidth_upper(" + properties[ 'trait_of' ][ 0 ].lower() + \
             ")-$NAMESPACEbandwidth_lower(" + properties[ 'trait_of' ][ 0 ].lower() + \
- ")"
+ "))"
       else:
- result = "$NAMESPACEbandwidth_upper_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ result = "($NAMESPACEbandwidth_upper_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
             ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + \
             "())-$NAMESPACEbandwidth_lower_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
- ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
+ ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "()))"
 
     if properties[ 'trait_type' ] == 'num_super_uplo' or \
        properties[ 'trait_type' ] == 'num_sub_uplo':
@@ -788,13 +788,13 @@
 #
 def match_assert_ge( argument_map, text_field ):
   #print "Match assert GE..."
- match_it = re.compile( ' +[A-Z]+[ ]{0,3}(>=|must be at least)[ ]{0,3}([0-9]|(min|max|MIN|MAX|[\(\)\,0-9A-Z\+\*\-])+)' ).findall( text_field )
+ match_it = re.compile( ' +[A-Z]+[ ]{0,3}(>=|must be at least)[ ]{0,3}([0-9]|(min|max|MIN|MAX|[0-9A-Z]| ?[\(\)\,\+\*\-] ?)+)' ).findall( text_field )
   if len( match_it ) == 1 or \
- (len( match_it ) == 2 and re.compile( 'For optimum performance' ).search( text_field ) != None):
+ (len( match_it ) == 2 and re.compile( 'For (optimum|optimal|best) (performance|efficiency)' ).search( text_field ) != None):
     print "Match assert GE:", match_it
     #print match_it
     #if len( match_it[ 0 ][ 2 ] ) > 0:
- return decompose_formula( match_it[ 0 ][ 1 ] )
+ return decompose_formula( match_it[ 0 ][ 1 ].replace( ' ', '' ) )
   else:
     print "nr of matches: ", len( match_it )
     return None
@@ -1396,9 +1396,14 @@
       # Fetch greater-than-or-equal-to integer asserts, such as
       # M >= 0.
       # N >= max(...)
- match_greater_equal = match_assert_ge( argument_map, comment_block )
- if match_greater_equal != None:
- argument_properties[ 'assert_ge' ] = match_greater_equal
+ assert_ge_key = subroutine_group_name.lower() + '.' + subroutine_value_type + '.' + \
+ argument_name + '.assert_ge'
+ if my_has_key( assert_ge_key, template_map ):
+ argument_properties[ 'assert_ge' ] = decompose_formula( template_map[ my_has_key( assert_ge_key, template_map ) ].replace(' ','') )
+ else:
+ match_greater_equal = match_assert_ge( argument_map, comment_block )
+ if match_greater_equal != None:
+ argument_properties[ 'assert_ge' ] = match_greater_equal
 
       # Are we dealing with a workspace-length integer?
       # If so, try to detect the workspace-query text.

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbrfs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbrfs.hpp 2010-06-30 19:54:40 EDT (Wed, 30 Jun 2010)
@@ -0,0 +1,7 @@
+$TEMPLATE[gbrfs.all.TRANS.trait_of]
+AB
+$TEMPLATE[gbrfs.all.KU.trait]
+num_super_sub,AB
+$TEMPLATE[gbrfs.all.LDAFB.assert_ge]
+2*KL+KU+1
+$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