Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52368 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational boost/numeric/bindings/lapack/driver libs/numeric/bindings/tools
From: rutger_at_[hidden]
Date: 2009-04-13 05:28:28


Author: rutger
Date: 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
New Revision: 52368
URL: http://svn.boost.org/trac/boost/changeset/52368

Log:
Improved type selection determination

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp | 3 -
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp | 3 -
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp | 12 ++----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp | 8 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp | 72 ++++++++++++++++++++++++---------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp | 4 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp | 6 +--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp | 32 +++++++----------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp | 6 +--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp | 6 +--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp | 6 +--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp | 8 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp | 2
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp | 8 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 31 +++++++++++++++-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 14 ++++++-
   21 files changed, 137 insertions(+), 104 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/bdsqr.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -227,7 +227,7 @@
         typename MatrixU, typename MatrixC, typename Workspace >
 inline integer_t bdsqr( char const uplo, integer_t const n, VectorD& d,
         VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixVT >::value_type value_type;
     integer_t info(0);
     bdsqr_impl< value_type >::invoke( uplo, n, d, e, vt, u, c, info,
             work );
@@ -239,7 +239,7 @@
         typename MatrixU, typename MatrixC >
 inline integer_t bdsqr( char const uplo, integer_t const n, VectorD& d,
         VectorE& e, MatrixVT& vt, MatrixU& u, MatrixC& c ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixVT >::value_type value_type;
     integer_t info(0);
     bdsqr_impl< value_type >::invoke( uplo, n, d, e, vt, u, c, info,
             optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gebak.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -131,8 +131,7 @@
 inline integer_t gebak( char const job, char const side,
         integer_t const ilo, integer_t const ihi, VectorSCALE& scale,
         MatrixV& v ) {
- typedef typename traits::vector_traits<
- VectorSCALE >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixV >::value_type value_type;
     integer_t info(0);
     gebak_impl< value_type >::invoke( job, side, ilo, ihi, scale, v,
             info );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggbak.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -143,8 +143,7 @@
 inline integer_t ggbak( char const job, char const side,
         integer_t const ilo, integer_t const ihi, VectorLSCALE& lscale,
         VectorRSCALE& rscale, MatrixV& v ) {
- typedef typename traits::vector_traits<
- VectorLSCALE >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixV >::value_type value_type;
     integer_t info(0);
     ggbak_impl< value_type >::invoke( job, side, ilo, ihi, lscale,
             rscale, v, info );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/hsein.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -279,8 +279,7 @@
         VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t const mm,
         integer_t& m, VectorIFAILL& ifaill, VectorIFAILR& ifailr,
         Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
     integer_t info(0);
     hsein_impl< value_type >::invoke( side, eigsrc, initv, select, h, wr,
             wi, vl, vr, mm, m, ifaill, ifailr, info, work );
@@ -295,8 +294,7 @@
         char const initv, VectorSELECT& select, MatrixH& h, VectorWR& wr,
         VectorWI& wi, MatrixVL& vl, MatrixVR& vr, integer_t const mm,
         integer_t& m, VectorIFAILL& ifaill, VectorIFAILR& ifailr ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
     integer_t info(0);
     hsein_impl< value_type >::invoke( side, eigsrc, initv, select, h, wr,
             wi, vl, vr, mm, m, ifaill, ifailr, info, optimal_workspace() );
@@ -310,8 +308,7 @@
         char const initv, VectorSELECT& select, MatrixH& h, VectorW& w,
         MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
         VectorIFAILL& ifaill, VectorIFAILR& ifailr, Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
     integer_t info(0);
     hsein_impl< value_type >::invoke( side, eigsrc, initv, select, h, w,
             vl, vr, mm, m, ifaill, ifailr, info, work );
@@ -326,8 +323,7 @@
         char const initv, VectorSELECT& select, MatrixH& h, VectorW& w,
         MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
         VectorIFAILL& ifaill, VectorIFAILR& ifailr ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixH >::value_type value_type;
     integer_t info(0);
     hsein_impl< value_type >::invoke( side, eigsrc, initv, select, h, w,
             vl, vr, mm, m, ifaill, ifailr, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pteqr.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -169,7 +169,7 @@
         typename Workspace >
 inline integer_t pteqr( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     pteqr_impl< value_type >::invoke( compz, n, d, e, z, info, work );
     return info;
@@ -179,7 +179,7 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline integer_t pteqr( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     pteqr_impl< value_type >::invoke( compz, n, d, e, z, info,
             optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ptrfs.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -266,7 +266,7 @@
 inline integer_t ptrfs( integer_t const n, VectorD& d, VectorE& e,
         VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x, VectorFERR& ferr,
         VectorBERR& berr, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptrfs_impl< value_type >::invoke( n, d, e, df, ef, b, x, ferr, berr,
             info, work );
@@ -280,7 +280,7 @@
 inline integer_t ptrfs( integer_t const n, VectorD& d, VectorE& e,
         VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x, VectorFERR& ferr,
         VectorBERR& berr ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptrfs_impl< value_type >::invoke( n, d, e, df, ef, b, x, ferr, berr,
             info, optimal_workspace() );
@@ -293,7 +293,7 @@
 inline integer_t ptrfs( char const uplo, integer_t const n, VectorD& d,
         VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
         VectorFERR& ferr, VectorBERR& berr, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptrfs_impl< value_type >::invoke( uplo, n, d, e, df, ef, b, x, ferr,
             berr, info, work );
@@ -307,7 +307,7 @@
 inline integer_t ptrfs( char const uplo, integer_t const n, VectorD& d,
         VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
         VectorFERR& ferr, VectorBERR& berr ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptrfs_impl< value_type >::invoke( uplo, n, d, e, df, ef, b, x, ferr,
             berr, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/pttrs.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -120,7 +120,7 @@
 template< typename VectorD, typename VectorE, typename MatrixB >
 inline integer_t pttrs( integer_t const n, VectorD& d, VectorE& e,
         MatrixB& b ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     pttrs_impl< value_type >::invoke( n, d, e, b, info );
     return info;
@@ -129,7 +129,7 @@
 template< typename VectorD, typename VectorE, typename MatrixB >
 inline integer_t pttrs( char const uplo, integer_t const n, VectorD& d,
         VectorE& e, MatrixB& b ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     pttrs_impl< value_type >::invoke( uplo, n, d, e, b, info );
     return info;

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -235,7 +235,7 @@
         typename Workspace >
 inline integer_t stedc( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stedc_impl< value_type >::invoke( compz, n, d, e, z, info, work );
     return info;
@@ -245,7 +245,7 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline integer_t stedc( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stedc_impl< value_type >::invoke( compz, n, d, e, z, info,
             optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stegr.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -114,9 +114,9 @@
         BOOST_ASSERT( traits::vector_size(e) >= n );
         BOOST_ASSERT( traits::vector_size(w) >= n );
         BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( n, jobz ));
         BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
- min_size_iwork( $CALL_MIN_SIZE ));
+ min_size_iwork( n, jobz ));
         detail::stegr( jobz, range, n, traits::vector_storage(d),
                 traits::vector_storage(e), vl, vu, il, iu, abstol, m,
                 traits::vector_storage(w), traits::matrix_storage(z),
@@ -135,10 +135,10 @@
             integer_t const il, integer_t const iu, real_type const abstol,
             integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
             integer_t& info, minimal_workspace work ) {
- traits::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
- traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
- $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_work( min_size_work( n,
+ jobz ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n,
+ jobz ) );
         invoke( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, isuppz,
                 info, workspace( tmp_work, tmp_iwork ) );
     }
@@ -165,12 +165,20 @@
                 info, workspace( tmp_work, tmp_iwork ) );
     }
 
- static integer_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_work( integer_t const n, char const jobz ) {
+ if ( jobz == 'V' ) {
+ return std::max( 1, 18*n );
+ } else {
+ return std::max( 1, 12*n );
+ }
     }
 
- static integer_t min_size_iwork( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_iwork( integer_t const n, char const jobz ) {
+ if ( jobz == 'V' ) {
+ return std::max( 1, 10*n );
+ } else {
+ return std::max( 1, 8*n );
+ }
     }
 };
 
@@ -203,9 +211,9 @@
         BOOST_ASSERT( traits::vector_size(e) >= n );
         BOOST_ASSERT( traits::vector_size(w) >= n );
         BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( n, jobz ));
         BOOST_ASSERT( traits::vector_size(work.select(integer_t())) >=
- min_size_iwork( $CALL_MIN_SIZE ));
+ min_size_iwork( n, jobz ));
         detail::stegr( jobz, range, n, traits::vector_storage(d),
                 traits::vector_storage(e), vl, vu, il, iu, abstol, m,
                 traits::vector_storage(w), traits::matrix_storage(z),
@@ -224,10 +232,10 @@
             integer_t const il, integer_t const iu, real_type const abstol,
             integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
             integer_t& info, minimal_workspace work ) {
- traits::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
- traits::detail::array< integer_t > tmp_iwork( min_size_iwork(
- $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_work( min_size_work( n,
+ jobz ) );
+ traits::detail::array< integer_t > tmp_iwork( min_size_iwork( n,
+ jobz ) );
         invoke( jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, isuppz,
                 info, workspace( tmp_work, tmp_iwork ) );
     }
@@ -254,12 +262,20 @@
                 info, workspace( tmp_work, tmp_iwork ) );
     }
 
- static integer_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_work( integer_t const n, char const jobz ) {
+ if ( jobz == 'V' ) {
+ return std::max( 1, 18*n );
+ } else {
+ return std::max( 1, 12*n );
+ }
     }
 
- static integer_t min_size_iwork( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_iwork( integer_t const n, char const jobz ) {
+ if ( jobz == 'V' ) {
+ return std::max( 1, 10*n );
+ } else {
+ return std::max( 1, 8*n );
+ }
     }
 };
 
@@ -269,13 +285,13 @@
         typename MatrixZ, typename VectorISUPPZ, typename Workspace >
 inline integer_t stegr( char const jobz, char const range,
         integer_t const n, VectorD& d, VectorE& e,
- typename traits::vector_traits< VectorD >::value_type const vl,
- typename traits::vector_traits< VectorD >::value_type const vu,
+ typename traits::matrix_traits< MatrixZ >::value_type const vl,
+ typename traits::matrix_traits< MatrixZ >::value_type const vu,
         integer_t const il, integer_t const iu,
- typename traits::vector_traits< VectorD >::value_type const abstol,
+ typename traits::matrix_traits< MatrixZ >::value_type const abstol,
         integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz,
         Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stegr_impl< value_type >::invoke( jobz, range, n, d, e, vl, vu, il,
             iu, abstol, m, w, z, isuppz, info, work );
@@ -287,12 +303,12 @@
         typename MatrixZ, typename VectorISUPPZ >
 inline integer_t stegr( char const jobz, char const range,
         integer_t const n, VectorD& d, VectorE& e,
- typename traits::vector_traits< VectorD >::value_type const vl,
- typename traits::vector_traits< VectorD >::value_type const vu,
+ typename traits::matrix_traits< MatrixZ >::value_type const vl,
+ typename traits::matrix_traits< MatrixZ >::value_type const vu,
         integer_t const il, integer_t const iu,
- typename traits::vector_traits< VectorD >::value_type const abstol,
+ typename traits::matrix_traits< MatrixZ >::value_type const abstol,
         integer_t& m, VectorW& w, MatrixZ& z, VectorISUPPZ& isuppz ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stegr_impl< value_type >::invoke( jobz, range, n, d, e, vl, vu, il,
             iu, abstol, m, w, z, isuppz, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stein.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -247,7 +247,7 @@
         integer_t const m, VectorW& w, VectorIBLOCK& iblock,
         VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail,
         Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stein_impl< value_type >::invoke( n, d, e, m, w, iblock, isplit, z,
             ifail, info, work );
@@ -261,7 +261,7 @@
 inline integer_t stein( integer_t const n, VectorD& d, VectorE& e,
         integer_t const m, VectorW& w, VectorIBLOCK& iblock,
         VectorISPLIT& isplit, MatrixZ& z, VectorIFAIL& ifail ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     stein_impl< value_type >::invoke( n, d, e, m, w, iblock, isplit, z,
             ifail, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/steqr.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -169,7 +169,7 @@
         typename Workspace >
 inline integer_t steqr( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     steqr_impl< value_type >::invoke( compz, n, d, e, z, info, work );
     return info;
@@ -179,7 +179,7 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline integer_t steqr( char const compz, integer_t const n, VectorD& d,
         VectorE& e, MatrixZ& z ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixZ >::value_type value_type;
     integer_t info(0);
     steqr_impl< value_type >::invoke( compz, n, d, e, z, info,
             optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgevc.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -231,8 +231,7 @@
         VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
         MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m,
         Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixS >::value_type value_type;
     integer_t info(0);
     tgevc_impl< value_type >::invoke( side, howmny, select, n, s, p, vl,
             vr, mm, m, info, work );
@@ -245,8 +244,7 @@
 inline integer_t tgevc( char const side, char const howmny,
         VectorSELECT& select, integer_t const n, MatrixS& s, MatrixP& p,
         MatrixVL& vl, MatrixVR& vr, integer_t const mm, integer_t& m ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixS >::value_type value_type;
     integer_t info(0);
     tgevc_impl< value_type >::invoke( side, howmny, select, n, s, p, vl,
             vr, mm, m, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsen.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -337,11 +337,10 @@
         logical_t const wantz, VectorSELECT& select, integer_t const n,
         MatrixA& a, MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
         VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& m,
- typename traits::vector_traits< VectorSELECT >::value_type& pl,
- typename traits::vector_traits< VectorSELECT >::value_type& pr,
+ typename traits::matrix_traits< MatrixA >::value_type& pl,
+ typename traits::matrix_traits< MatrixA >::value_type& pr,
         VectorDIF& dif, Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsen_impl< value_type >::invoke( ijob, wantq, wantz, select, n, a,
             b, alphar, alphai, beta, q, z, m, pl, pr, dif, info, work );
@@ -356,11 +355,10 @@
         logical_t const wantz, VectorSELECT& select, integer_t const n,
         MatrixA& a, MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
         VectorBETA& beta, MatrixQ& q, MatrixZ& z, integer_t& m,
- typename traits::vector_traits< VectorSELECT >::value_type& pl,
- typename traits::vector_traits< VectorSELECT >::value_type& pr,
+ typename traits::matrix_traits< MatrixA >::value_type& pl,
+ typename traits::matrix_traits< MatrixA >::value_type& pr,
         VectorDIF& dif ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsen_impl< value_type >::invoke( ijob, wantq, wantz, select, n, a,
             b, alphar, alphai, beta, q, z, m, pl, pr, dif, info,
@@ -374,11 +372,10 @@
 inline integer_t tgsen( integer_t const ijob, logical_t const wantq,
         logical_t const wantz, VectorSELECT& select, integer_t const n,
         MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
- MatrixQ& q, MatrixZ& z, integer_t& m, typename traits::vector_traits<
- VectorSELECT >::value_type& pl, typename traits::vector_traits<
- VectorSELECT >::value_type& pr, VectorDIF& dif, Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ MatrixQ& q, MatrixZ& z, integer_t& m, typename traits::matrix_traits<
+ MatrixA >::value_type& pl, typename traits::matrix_traits<
+ MatrixA >::value_type& pr, VectorDIF& dif, Workspace work ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsen_impl< value_type >::invoke( ijob, wantq, wantz, select, n, a,
             b, alpha, beta, q, z, m, pl, pr, dif, info, work );
@@ -392,11 +389,10 @@
 inline integer_t tgsen( integer_t const ijob, logical_t const wantq,
         logical_t const wantz, VectorSELECT& select, integer_t const n,
         MatrixA& a, MatrixB& b, VectorALPHA& alpha, VectorBETA& beta,
- MatrixQ& q, MatrixZ& z, integer_t& m, typename traits::vector_traits<
- VectorSELECT >::value_type& pl, typename traits::vector_traits<
- VectorSELECT >::value_type& pr, VectorDIF& dif ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ MatrixQ& q, MatrixZ& z, integer_t& m, typename traits::matrix_traits<
+ MatrixA >::value_type& pl, typename traits::matrix_traits<
+ MatrixA >::value_type& pr, VectorDIF& dif ) {
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsen_impl< value_type >::invoke( ijob, wantq, wantz, select, n, a,
             b, alpha, beta, q, z, m, pl, pr, dif, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsna.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -285,8 +285,7 @@
         VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
         MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
         integer_t const mm, integer_t& m, Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsna_impl< value_type >::invoke( job, howmny, select, n, a, b, vl,
             vr, s, dif, mm, m, info, work );
@@ -301,8 +300,7 @@
         VectorSELECT& select, integer_t const n, MatrixA& a, MatrixB& b,
         MatrixVL& vl, MatrixVR& vr, VectorS& s, VectorDIF& dif,
         integer_t const mm, integer_t& m ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixA >::value_type value_type;
     integer_t info(0);
     tgsna_impl< value_type >::invoke( job, howmny, select, n, a, b, vl,
             vr, s, dif, mm, m, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trevc.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -222,8 +222,7 @@
 inline integer_t trevc( char const side, char const howmny,
         VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
         integer_t const mm, integer_t& m, Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
     integer_t info(0);
     trevc_impl< value_type >::invoke( side, howmny, select, t, vl, vr,
             mm, m, info, work );
@@ -236,8 +235,7 @@
 inline integer_t trevc( char const side, char const howmny,
         VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
         integer_t const mm, integer_t& m ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
     integer_t info(0);
     trevc_impl< value_type >::invoke( side, howmny, select, t, vl, vr,
             mm, m, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/trsna.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -251,8 +251,7 @@
         VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
         VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m,
         Workspace work ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
     integer_t info(0);
     trsna_impl< value_type >::invoke( job, howmny, select, t, vl, vr, s,
             sep, mm, m, info, work );
@@ -265,8 +264,7 @@
 inline integer_t trsna( char const job, char const howmny,
         VectorSELECT& select, MatrixT& t, MatrixVL& vl, MatrixVR& vr,
         VectorS& s, VectorSEP& sep, integer_t const mm, integer_t& m ) {
- typedef typename traits::vector_traits<
- VectorSELECT >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixT >::value_type value_type;
     integer_t info(0);
     trsna_impl< value_type >::invoke( job, howmny, select, t, vl, vr, s,
             sep, mm, m, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/lalsd.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -255,9 +255,9 @@
         typename Workspace >
 inline integer_t lalsd( char const uplo, integer_t const smlsiz,
         integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
- typename traits::vector_traits< VectorD >::value_type const rcond,
+ typename traits::matrix_traits< MatrixB >::value_type const rcond,
         integer_t& rank, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixB >::value_type value_type;
     integer_t info(0);
     lalsd_impl< value_type >::invoke( uplo, smlsiz, n, d, e, b, rcond,
             rank, info, work );
@@ -268,9 +268,9 @@
 template< typename VectorD, typename VectorE, typename MatrixB >
 inline integer_t lalsd( char const uplo, integer_t const smlsiz,
         integer_t const n, VectorD& d, VectorE& e, MatrixB& b,
- typename traits::vector_traits< VectorD >::value_type const rcond,
+ typename traits::matrix_traits< MatrixB >::value_type const rcond,
         integer_t& rank ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::matrix_traits< MatrixB >::value_type value_type;
     integer_t info(0);
     lalsd_impl< value_type >::invoke( uplo, smlsiz, n, d, e, b, rcond,
             rank, info, optimal_workspace() );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsv.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -138,7 +138,7 @@
 template< typename VectorD, typename VectorE, typename MatrixB >
 inline integer_t ptsv( integer_t const n, VectorD& d, VectorE& e,
         MatrixB& b ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptsv_impl< value_type >::invoke( n, d, e, b, info );
     return info;

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/ptsvx.hpp 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -267,9 +267,9 @@
         typename VectorFERR, typename VectorBERR, typename Workspace >
 inline integer_t ptsvx( char const fact, integer_t const n, VectorD& d,
         VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
- typename traits::vector_traits< VectorD >::value_type& rcond,
+ typename traits::vector_traits< VectorE >::value_type& rcond,
         VectorFERR& ferr, VectorBERR& berr, Workspace work ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptsvx_impl< value_type >::invoke( fact, n, d, e, df, ef, b, x, rcond,
             ferr, berr, info, work );
@@ -282,9 +282,9 @@
         typename VectorFERR, typename VectorBERR >
 inline integer_t ptsvx( char const fact, integer_t const n, VectorD& d,
         VectorE& e, VectorDF& df, VectorEF& ef, MatrixB& b, MatrixX& x,
- typename traits::vector_traits< VectorD >::value_type& rcond,
+ typename traits::vector_traits< VectorE >::value_type& rcond,
         VectorFERR& ferr, VectorBERR& berr ) {
- typedef typename traits::vector_traits< VectorD >::value_type value_type;
+ typedef typename traits::vector_traits< VectorE >::value_type value_type;
     integer_t info(0);
     ptsvx_impl< value_type >::invoke( fact, n, d, e, df, ef, b, x, rcond,
             ferr, berr, info, optimal_workspace() );

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-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
 #
 # Copyright (c) 2008 Thomas Klimpel and Rutger ter Borg
 #
@@ -99,7 +100,20 @@
           cases[ 'complex' ] = {}
           cases[ 'complex' ][ 'subroutines' ] = []
         cases[ 'complex' ][ 'subroutines' ] += [ subroutine ]
-
+
+ # Figure out what the real/complex type selector argument might be
+ type_selector_candidates = []
+ if cases.has_key( 'real' ) and cases.has_key( 'complex' ):
+ # we have real and complex scenarios, these keys only exist
+ # if we also have associated routines
+ for arg in info_map[ cases[ 'real' ][ 'subroutines' ][0] ][ 'arguments' ]:
+ if arg in info_map[ cases[ 'complex' ][ 'subroutines' ][0] ][ 'arguments' ]:
+ if info_map[ cases[ 'real' ][ 'subroutines' ][0] ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_type' ] != None and \
+ info_map[ cases[ 'complex' ][ 'subroutines' ][0] ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_type' ] != None and \
+ info_map[ cases[ 'real' ][ 'subroutines' ][0] ][ 'argument_map' ][ arg ][ 'value_type_variant' ] == 'real' and \
+ info_map[ cases[ 'complex' ][ 'subroutines' ][0] ][ 'argument_map' ][ arg ][ 'value_type_variant' ] == 'complex':
+ type_selector_candidates += [ arg ]
+
     #
     # LEVEL 1 and 2 HANDLING
     #
@@ -222,8 +236,19 @@
       # some special stuff is done here, such as replacing real_type with a
       # type-traits deduction, etc..
       level2_template = level2_template.replace( "$LEVEL2", ", ".join( level2_arg_list ) )
- first_typename = level1_type_arg_list[0].split(" ")[-1]
- first_typename_datatype = first_typename[0:6].lower() # 'matrix' or 'vector'
+
+ # Determine a right type to select for real or complex variants
+ first_typename = ''
+ print "Type selectors: ", type_selector_candidates
+ if len( type_selector_candidates ) > 0:
+ first_typename_arg = type_selector_candidates[0]
+ first_typename_code = info_map[ subroutine ][ 'argument_map' ][ first_typename_arg ][ 'code' ][ 'level_1_type' ]
+ first_typename = first_typename_code.split(" ")[-1]
+ else:
+ first_typename = level1_type_arg_list[0].split(" ")[-1]
+
+ # generate the word "matrix" or "vector", to select the right traits
+ first_typename_datatype = first_typename[0:6].lower()
       level2_template = level2_template.replace( "$FIRST_TYPENAME", first_typename )
       level2_template = level2_template.replace( "$TYPEOF_FIRST_TYPENAME", first_typename_datatype )
       level2_template = level2_template.replace( "$CALL_LEVEL1", ", ".join( call_level1_arg_list ) )

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 2009-04-13 05:28:22 EDT (Mon, 13 Apr 2009)
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+# -*- coding: utf-8 -*-
 #
 # Copyright (c) 2008 Thomas Klimpel and Rutger ter Borg
 #
@@ -20,10 +21,18 @@
   'INTEGER': 'integer_t',
   'REAL': 'float',
   'DOUBLE PRECISION': 'double' }
-
-templates = {}
 
+global_type_variant_map = {
+ 'CHARACTER': None,
+ 'LOGICAL': None,
+ 'INTEGER': None,
+ 'REAL': 'real',
+ 'DOUBLE PRECISION': 'real',
+ 'COMPLEX': 'complex',
+ 'COMPLEX*16': 'complex',
+ 'DOUBLE COMPLEX': 'complex' }
 
+templates = {}
 
 
 def value_type( fortran_type ):
@@ -737,6 +746,7 @@
         if argument_name in subroutine_arguments:
           argument_map[ argument_name ] = {}
           argument_map[ argument_name ][ 'value_type' ] = match_argument_declaration.group( 1 )
+ argument_map[ argument_name ][ 'value_type_variant' ] = global_type_variant_map[ argument_map[ argument_name ][ 'value_type' ] ]
           if len(argument_description) == 1:
             argument_map[ argument_name ][ 'type' ] = 'scalar'
           else:


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