Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64400 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational libs/numeric/bindings/tools/templates/computational
From: thomas.klimpel_at_[hidden]
Date: 2010-07-27 16:47:44


Author: klimpel
Date: 2010-07-27 16:47:41 EDT (Tue, 27 Jul 2010)
New Revision: 64400
URL: http://svn.boost.org/trac/boost/changeset/64400

Log:
applied fix to gbcon.hpp requested by Marco Guazzone
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbcon.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp | 29 ++++++++++++++++-------------
   1 files changed, 16 insertions(+), 13 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gbcon.hpp 2010-07-27 16:47:41 EDT (Tue, 27 Jul 2010)
@@ -143,7 +143,6 @@
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
- BOOST_ASSERT( bindings::bandwidth_upper(ab) >= 0 );
         BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ab) );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
                 min_size_iwork( bindings::size_column(ab) ));
@@ -153,14 +152,16 @@
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >=
- 2*bindings::bandwidth_lower(ab)+bindings::bandwidth_upper(ab)+
- 1 );
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
+ BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)) >= 0 );
         BOOST_ASSERT( norm == '1' || norm == 'O' || norm == 'I' );
         return detail::gbcon( norm, bindings::size_column(ab),
- bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(ipiv), anorm, rcond,
- bindings::begin_value(work.select(real_type())),
+ bindings::bandwidth_lower(ab), (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(ipiv),
+ anorm, rcond, bindings::begin_value(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())) );
     }
 
@@ -238,7 +239,6 @@
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
- BOOST_ASSERT( bindings::bandwidth_upper(ab) >= 0 );
         BOOST_ASSERT( bindings::size(ipiv) >= bindings::size_column(ab) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
                 min_size_rwork( bindings::size_column(ab) ));
@@ -248,13 +248,16 @@
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
         BOOST_ASSERT( bindings::stride_major(ab) >=
- 2*bindings::bandwidth_lower(ab)+bindings::bandwidth_upper(ab)+
- 1 );
+ 2*bindings::bandwidth_lower(ab)+(bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab))+1 );
+ BOOST_ASSERT( (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)) >= 0 );
         BOOST_ASSERT( norm == '1' || norm == 'O' || norm == 'I' );
         return detail::gbcon( norm, bindings::size_column(ab),
- bindings::bandwidth_lower(ab), bindings::bandwidth_upper(ab),
- bindings::begin_value(ab), bindings::stride_major(ab),
- bindings::begin_value(ipiv), anorm, rcond,
+ bindings::bandwidth_lower(ab), (bindings::bandwidth_upper(ab)-
+ bindings::bandwidth_lower(ab)), bindings::begin_value(ab),
+ bindings::stride_major(ab), bindings::begin_value(ipiv),
+ anorm, rcond,
                 bindings::begin_value(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())) );
     }

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbcon.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gbcon.hpp 2010-07-27 16:47:41 EDT (Tue, 27 Jul 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[gbcon.all.KU.trait]
+num_super_sub,AB
+$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