Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58926 - sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver
From: rutger_at_[hidden]
Date: 2010-01-12 06:06:19


Author: rutger
Date: 2010-01-12 06:06:18 EST (Tue, 12 Jan 2010)
New Revision: 58926
URL: http://svn.boost.org/trac/boost/changeset/58926

Log:
Fixed missing detected trait in sygv

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp | 131 +++++++++++++++++++--------------------
   1 files changed, 64 insertions(+), 67 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sygv.hpp 2010-01-12 06:06:18 EST (Tue, 12 Jan 2010)
@@ -99,8 +99,8 @@
     template< typename MatrixA, typename MatrixB, typename VectorW,
             typename WORK >
     static std::ptrdiff_t invoke( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- MatrixB& b, VectorW& w, detail::workspace1< WORK > work ) {
+ const char jobz, MatrixA& a, MatrixB& b, VectorW& w,
+ detail::workspace1< WORK > work ) {
         typedef typename result_of::data_side< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
                 typename value< MatrixA >::type >::type,
@@ -114,15 +114,19 @@
         BOOST_STATIC_ASSERT( (is_mutable< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< VectorW >::value) );
         BOOST_ASSERT( jobz == 'N' || jobz == 'V' );
- BOOST_ASSERT( n >= 0 );
- BOOST_ASSERT( size(work.select(real_type())) >= min_size_work( n ));
+ BOOST_ASSERT( size(work.select(real_type())) >= min_size_work(
+ size_column(a) ));
+ BOOST_ASSERT( size_column(a) >= 0 );
         BOOST_ASSERT( size_minor(a) == 1 || stride_minor(a) == 1 );
         BOOST_ASSERT( size_minor(b) == 1 || stride_minor(b) == 1 );
- BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,n) );
- BOOST_ASSERT( stride_major(b) >= std::max< std::ptrdiff_t >(1,n) );
- return detail::sygv( itype, jobz, uplo(), n, begin_value(a),
- stride_major(a), begin_value(b), stride_major(b),
- begin_value(w), begin_value(work.select(real_type())),
+ BOOST_ASSERT( stride_major(a) >= std::max< std::ptrdiff_t >(1,
+ size_column(a)) );
+ BOOST_ASSERT( stride_major(b) >= std::max< std::ptrdiff_t >(1,
+ size_column(a)) );
+ return detail::sygv( itype, jobz, uplo(), size_column(a),
+ begin_value(a), stride_major(a), begin_value(b),
+ stride_major(b), begin_value(w),
+ begin_value(work.select(real_type())),
                 size(work.select(real_type())) );
     }
 
@@ -135,11 +139,12 @@
     //
     template< typename MatrixA, typename MatrixB, typename VectorW >
     static std::ptrdiff_t invoke( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- MatrixB& b, VectorW& w, minimal_workspace work ) {
+ const char jobz, MatrixA& a, MatrixB& b, VectorW& w,
+ minimal_workspace work ) {
         typedef typename result_of::data_side< MatrixA >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work( n ) );
- return invoke( itype, jobz, n, a, b, w, workspace( tmp_work ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work(
+ size_column(a) ) );
+ return invoke( itype, jobz, a, b, w, workspace( tmp_work ) );
     }
 
     //
@@ -151,16 +156,16 @@
     //
     template< typename MatrixA, typename MatrixB, typename VectorW >
     static std::ptrdiff_t invoke( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- MatrixB& b, VectorW& w, optimal_workspace work ) {
+ const char jobz, MatrixA& a, MatrixB& b, VectorW& w,
+ optimal_workspace work ) {
         typedef typename result_of::data_side< MatrixA >::type uplo;
         real_type opt_size_work;
- detail::sygv( itype, jobz, uplo(), n, begin_value(a),
- stride_major(a), begin_value(b), stride_major(b),
- begin_value(w), &opt_size_work, -1 );
+ detail::sygv( itype, jobz, uplo(), size_column(a),
+ begin_value(a), stride_major(a), begin_value(b),
+ stride_major(b), begin_value(w), &opt_size_work, -1 );
         bindings::detail::array< real_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
- return invoke( itype, jobz, n, a, b, w, workspace( tmp_work ) );
+ return invoke( itype, jobz, a, b, w, workspace( tmp_work ) );
     }
 
     //
@@ -192,10 +197,9 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a, MatrixB& b,
- VectorW& w, Workspace work ) {
+ const char jobz, MatrixA& a, MatrixB& b, VectorW& w, Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -207,10 +211,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a, MatrixB& b,
- VectorW& w ) {
+ const char jobz, MatrixA& a, MatrixB& b, VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -223,10 +226,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- MatrixB& b, VectorW& w, Workspace work ) {
+ const char jobz, const MatrixA& a, MatrixB& b, VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -238,10 +241,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- MatrixB& b, VectorW& w ) {
+ const char jobz, const MatrixA& a, MatrixB& b, VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -254,10 +256,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- const MatrixB& b, VectorW& w, Workspace work ) {
+ const char jobz, MatrixA& a, const MatrixB& b, VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -269,10 +271,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- const MatrixB& b, VectorW& w ) {
+ const char jobz, MatrixA& a, const MatrixB& b, VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -285,10 +286,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- const MatrixB& b, VectorW& w, Workspace work ) {
+ const char jobz, const MatrixA& a, const MatrixB& b, VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -300,10 +301,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- const MatrixB& b, VectorW& w ) {
+ const char jobz, const MatrixA& a, const MatrixB& b, VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -316,10 +316,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a, MatrixB& b,
- const VectorW& w, Workspace work ) {
+ const char jobz, MatrixA& a, MatrixB& b, const VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -331,10 +331,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a, MatrixB& b,
- const VectorW& w ) {
+ const char jobz, MatrixA& a, MatrixB& b, const VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -347,10 +346,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- MatrixB& b, const VectorW& w, Workspace work ) {
+ const char jobz, const MatrixA& a, MatrixB& b, const VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -362,10 +361,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- MatrixB& b, const VectorW& w ) {
+ const char jobz, const MatrixA& a, MatrixB& b, const VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -378,10 +376,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- const MatrixB& b, const VectorW& w, Workspace work ) {
+ const char jobz, MatrixA& a, const MatrixB& b, const VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -393,10 +391,9 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, MatrixA& a,
- const MatrixB& b, const VectorW& w ) {
+ const char jobz, MatrixA& a, const MatrixB& b, const VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 //
@@ -409,10 +406,10 @@
 template< typename MatrixA, typename MatrixB, typename VectorW,
         typename Workspace >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- const MatrixB& b, const VectorW& w, Workspace work ) {
+ const char jobz, const MatrixA& a, const MatrixB& b, const VectorW& w,
+ Workspace work ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, work );
+ jobz, a, b, w, work );
 }
 
 //
@@ -424,10 +421,10 @@
 //
 template< typename MatrixA, typename MatrixB, typename VectorW >
 inline std::ptrdiff_t sygv( const fortran_int_t itype,
- const char jobz, const fortran_int_t n, const MatrixA& a,
- const MatrixB& b, const VectorW& w ) {
+ const char jobz, const MatrixA& a, const MatrixB& b,
+ const VectorW& w ) {
     return sygv_impl< typename value< MatrixA >::type >::invoke( itype,
- jobz, n, a, b, w, optimal_workspace() );
+ jobz, a, b, w, optimal_workspace() );
 }
 
 } // namespace lapack


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