Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58544 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates templates/driver
From: rutger_at_[hidden]
Date: 2009-12-28 08:59:55


Author: rutger
Date: 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
New Revision: 58544
URL: http://svn.boost.org/trac/boost/changeset/58544

Log:
misc. updates to the lapack generator

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 1 +
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp | 2 ++
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp | 14 +++++++++++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp | 2 +-
   8 files changed, 19 insertions(+), 8 deletions(-)

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 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -60,6 +60,7 @@
       '#include <boost/numeric/bindings/value.hpp>',
       '#include <boost/numeric/bindings/begin.hpp>',
       '#include <boost/numeric/bindings/size.hpp>',
+ #'#include <boost/numeric/bindings/tag.hpp>',
       '#include <boost/numeric/bindings/stride.hpp>',
       '#include <boost/numeric/bindings/is_mutable.hpp>',
       #'#include <boost/numeric/bindings/traits/traits.hpp>',

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -1,3 +1,5 @@
+$TEMPLATE[cgesv.complex.WORK.type]
+vector
 $TEMPLATE[cgesv.complex.min_size_work.args]
 N, NRHS
 $TEMPLATE[cgesv.complex.min_size_work]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -5,7 +5,7 @@
 $TEMPLATE[gelsd.all.extra_variables]
 MINMN,SMLSIZ,NLVL
 $TEMPLATE[gelsd.all.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gelsd.all.SMLSIZ.init]
 integer_t smlsiz = ilaenv(9, "GELSD", "");
 $TEMPLATE[gelsd.all.NLVL.init]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -8,7 +8,7 @@
 $TEMPLATE[gelss.complex.extra_opt_variables]
 MINMN
 $TEMPLATE[gelss.complex.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gelss.complex.min_size_work.args]
 M,N,NRHS,MINMN
 $TEMPLATE[gelss.complex.min_size_work]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -3,7 +3,7 @@
 $TEMPLATE[gesdd.all.extra_opt_variables]
 MINMN
 $TEMPLATE[gesdd.all.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gesdd.all.min_size_work.args]
 M, N, JOBZ, MINMN
 $TEMPLATE[gesdd.real.min_size_work]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -8,7 +8,7 @@
 $TEMPLATE[gesvd.complex.extra_opt_variables]
 MINMN
 $TEMPLATE[gesvd.complex.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gesvd.complex.min_size_work.args]
 M,N,MINMN
 $TEMPLATE[gesvd.complex.min_size_work]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -123,7 +123,7 @@
     // Static member function that
     // * Figures out the minimal workspace requirements, and passes
     // the results to the user-defined workspace overload of the
- // invoke static member
+ // invoke static member function
     //
     template< $TYPES >
     static void invoke( $LEVEL1, minimal_workspace work ) {
@@ -183,6 +183,10 @@
 $TEMPLATE[setup_opt_workspace]
         traits::detail::array< $WORKSPACE_TYPE > tmp_$NAME( $TMP_SIZE );
 $TEMPLATE[min_size_func]
+ //
+ // Static member function that returns the minimum size of
+ // workspace-array $NAME.
+ //
     static integer_t min_size_$NAME( $ARGUMENTS ) {
         $MIN_SIZE
     }
@@ -190,10 +194,14 @@
 $TEMPLATE[level1_noworkspace]
     typedef Value value_type;
     typedef typename remove_imaginary< Value >::type real_type;
- typedef tag::colum_major order;
+ typedef tag::column_major order;
 
 $INCLUDE_TEMPLATES
- // templated specialization
+ //
+ // Static member function, that
+ // * Deduces the required arguments for dispatching to LAPACK, and
+ // * Asserts that most arguments make sense.
+ //
     template< $TYPES >
     static void invoke( $LEVEL1 ) {
         $TYPEDEFS

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp 2009-12-28 08:59:54 EST (Mon, 28 Dec 2009)
@@ -17,7 +17,7 @@
 
     template< typename MatrixA, typename MatrixB, typename VectorP >
     static void solve( MatrixA& A, MatrixB& B, VectorP const&, integer_t& info ) {
- traits::detail::array< integer_t > pivot( traits::matrix_num_columns(A) );
+ traits::detail::array< integer_t > pivot( size_column(A) );
         invoke( $KEYWORDS );
     }
 $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