Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64000 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack boost/numeric/bindings/lapack/auxiliary libs/numeric/bindings/tools libs/numeric/bindings/tools/templates/auxiliary
From: thomas.klimpel_at_[hidden]
Date: 2010-07-13 17:36:44


Author: klimpel
Date: 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
New Revision: 64000
URL: http://svn.boost.org/trac/boost/changeset/64000

Log:
Now only lapack/computational.hpp remains hand edited despite "PLEASE DO NOT EDIT!" to make include_test.cpp pass.
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/latrd.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary.hpp | 8 ++++----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lalsd.hpp | 6 ++----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfx.hpp | 3 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrd.hpp | 3 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrs.hpp | 4 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lalsd.hpp | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp | 2 ++
   8 files changed, 16 insertions(+), 14 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-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -18,7 +18,7 @@
 #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>
+#include <boost/numeric/bindings/lapack/auxiliary/larfx.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/largv.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/larnv.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/larrb.hpp>
@@ -39,11 +39,11 @@
 #include <boost/numeric/bindings/lapack/auxiliary/lacgv.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/lacon.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/laebz.hpp>
-// #include <boost/numeric/bindings/lapack/auxiliary/lalsd.hpp>
+#include <boost/numeric/bindings/lapack/auxiliary/lalsd.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/largv.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/larz.hpp>
-// #include <boost/numeric/bindings/lapack/auxiliary/latrd.hpp>
-// #include <boost/numeric/bindings/lapack/auxiliary/latrs.hpp>
+#include <boost/numeric/bindings/lapack/auxiliary/latrd.hpp>
+#include <boost/numeric/bindings/lapack/auxiliary/latrs.hpp>
 #include <boost/numeric/bindings/lapack/auxiliary/latrz.hpp>
 
 #endif

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lalsd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lalsd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lalsd.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -273,8 +273,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixB >::value) );
         std::ptrdiff_t nlvl = std::max< std::ptrdiff_t >( 0,
                 static_cast<std::ptrdiff_t>(
- std::log(static_cast<real_type>(std::min<
- std::ptrdiff_t >(traits::matrix_size2(b),n))/
+ std::log(static_cast<real_type>(n)/
             static_cast<real_type>(smlsiz+1)) /
             std::log(static_cast<real_type>(2.))) + 1 );
         BOOST_ASSERT( bindings::size(e) >= n-1 );
@@ -313,8 +312,7 @@
         namespace bindings = ::boost::numeric::bindings;
         std::ptrdiff_t nlvl = std::max< std::ptrdiff_t >( 0,
                 static_cast<std::ptrdiff_t>(
- std::log(static_cast<real_type>(std::min<
- std::ptrdiff_t >(traits::matrix_size2(b),n))/
+ std::log(static_cast<real_type>(n)/
             static_cast<real_type>(smlsiz+1)) /
             std::log(static_cast<real_type>(2.))) + 1 );
         bindings::detail::array< value_type > tmp_work( min_size_work( n,

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfx.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -151,7 +151,8 @@
                 bindings::size_column(c) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
- BOOST_ASSERT( bindings::stride_major(c) >= (ERROR) );
+ BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_row(c)) );
         return detail::larfx( side, bindings::size_row(c),
                 bindings::size_column(c), bindings::begin_value(v), tau,
                 bindings::begin_value(c), bindings::stride_major(c),

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/latrd.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -160,7 +160,8 @@
                 bindings::stride_minor(a) == 1 );
         BOOST_ASSERT( bindings::size_minor(w) == 1 ||
                 bindings::stride_minor(w) == 1 );
- BOOST_ASSERT( bindings::stride_major(a) >= (ERROR) );
+ BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ bindings::size_column(a)) );
         BOOST_ASSERT( bindings::stride_major(w) >= std::max< std::ptrdiff_t >(1,
                 bindings::size_column(a)) );
         return detail::latrd( uplo(), bindings::size_column(a), nb,

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-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -141,7 +141,7 @@
             const MatrixA& a, VectorX& x, real_type& scale,
             VectorCNORM& cnorm ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename detail::default_order< MatrixA >::type order;
+ typedef typename blas::detail::default_order< MatrixA >::type order;
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         typedef typename result_of::diag_tag< MatrixA >::type diag;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -190,7 +190,7 @@
             const MatrixA& a, VectorX& x, real_type& scale,
             VectorCNORM& cnorm ) {
         namespace bindings = ::boost::numeric::bindings;
- typedef typename detail::default_order< MatrixA >::type order;
+ typedef typename blas::detail::default_order< MatrixA >::type order;
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         typedef typename result_of::diag_tag< MatrixA >::type diag;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<

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-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -276,7 +276,7 @@
             matrix_wo_trans_arg_removed = [ matrix_wo_trans_arg[0] ]
             del matrix_wo_trans_arg[0]
           else:
- typedef_list.insert( 0, 'typedef typename detail::default_order< ' + matrix_with_trans[0] + \
+ typedef_list.insert( 0, 'typedef typename blas::detail::default_order< ' + matrix_with_trans[0] + \
                 ' >::type order;' )
             includes += [ '#include <boost/numeric/bindings/blas/detail/default_order.hpp>' ]
         else:

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lalsd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lalsd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lalsd.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -16,7 +16,7 @@
 NLVL
 $TEMPLATE[lalsd.complex.NLVL.init]
 $INTEGER_TYPE nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<$INTEGER_TYPE>(
- std::log(static_cast<real_type>(std::min< $INTEGER_TYPE >(traits::matrix_size2(b),n))/
+ std::log(static_cast<real_type>(n)/
     static_cast<real_type>(smlsiz+1)) /
     std::log(static_cast<real_type>(2.))) + 1 );
 $TEMPLATE[lalsd.real.NLVL.init]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -8,4 +8,6 @@
     return 1;
 else
     return std::max< $INTEGER_TYPE >( 1, order );
+$TEMPLATE[larfx.all.LDC.assert_ge]
+max(1,M)
 $TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/latrd.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/latrd.hpp 2010-07-13 17:36:43 EDT (Tue, 13 Jul 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[latrd.all.LDA.assert_ge]
+max(1,N)
+$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