Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58829 - in sandbox/numeric_bindings/boost/numeric/bindings/lapack: detail driver
From: rutger_at_[hidden]
Date: 2010-01-09 07:13:22


Author: rutger
Date: 2010-01-09 07:13:21 EST (Sat, 09 Jan 2010)
New Revision: 58829
URL: http://svn.boost.org/trac/boost/changeset/58829

Log:
updated gelsd to have mutable matrixA in real case

Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/detail/lapack.h | 4 ++--
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp | 19 ++++++++++---------
   2 files changed, 12 insertions(+), 11 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/detail/lapack.h
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/detail/lapack.h (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/detail/lapack.h 2010-01-09 07:13:21 EST (Sat, 09 Jan 2010)
@@ -3853,12 +3853,12 @@
 
 // Value-type variants of gelsd
 void LAPACK_SGELSD( const fortran_int_t* m, const fortran_int_t* n,
- const fortran_int_t* nrhs, const float* a, const fortran_int_t* lda,
+ const fortran_int_t* nrhs, float* a, const fortran_int_t* lda,
         float* b, const fortran_int_t* ldb, float* s, const float* rcond,
         fortran_int_t* rank, float* work, const fortran_int_t* lwork,
         fortran_int_t* iwork, fortran_int_t* info );
 void LAPACK_DGELSD( const fortran_int_t* m, const fortran_int_t* n,
- const fortran_int_t* nrhs, const double* a, const fortran_int_t* lda,
+ const fortran_int_t* nrhs, double* a, const fortran_int_t* lda,
         double* b, const fortran_int_t* ldb, double* s, const double* rcond,
         fortran_int_t* rank, double* work, const fortran_int_t* lwork,
         fortran_int_t* iwork, fortran_int_t* info );

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gelsd.hpp 2010-01-09 07:13:21 EST (Sat, 09 Jan 2010)
@@ -49,9 +49,9 @@
 // Overloaded function for dispatching to float value-type.
 //
 inline void gelsd( fortran_int_t m, fortran_int_t n, fortran_int_t nrhs,
- const float* a, fortran_int_t lda, float* b, fortran_int_t ldb,
- float* s, float rcond, fortran_int_t& rank, float* work,
- fortran_int_t lwork, fortran_int_t* iwork, fortran_int_t& info ) {
+ float* a, fortran_int_t lda, float* b, fortran_int_t ldb, float* s,
+ float rcond, fortran_int_t& rank, float* work, fortran_int_t lwork,
+ fortran_int_t* iwork, fortran_int_t& info ) {
     LAPACK_SGELSD( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank, work,
             &lwork, iwork, &info );
 }
@@ -60,9 +60,9 @@
 // Overloaded function for dispatching to double value-type.
 //
 inline void gelsd( fortran_int_t m, fortran_int_t n, fortran_int_t nrhs,
- const double* a, fortran_int_t lda, double* b, fortran_int_t ldb,
- double* s, double rcond, fortran_int_t& rank, double* work,
- fortran_int_t lwork, fortran_int_t* iwork, fortran_int_t& info ) {
+ double* a, fortran_int_t lda, double* b, fortran_int_t ldb, double* s,
+ double rcond, fortran_int_t& rank, double* work, fortran_int_t lwork,
+ fortran_int_t* iwork, fortran_int_t& info ) {
     LAPACK_DGELSD( &m, &n, &nrhs, a, &lda, b, &ldb, s, &rcond, &rank, work,
             &lwork, iwork, &info );
 }
@@ -117,7 +117,7 @@
     //
     template< typename MatrixA, typename MatrixB, typename VectorS,
             typename WORK, typename IWORK >
- static void invoke( const MatrixA& a, MatrixB& b, VectorS& s,
+ static void invoke( MatrixA& a, MatrixB& b, VectorS& s,
             const real_type rcond, fortran_int_t& rank,
             fortran_int_t& info, detail::workspace2< WORK, IWORK > work ) {
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -128,6 +128,7 @@
                 typename value< MatrixA >::type >::type,
                 typename remove_const< typename value<
                 VectorS >::type >::type >::value) );
+ BOOST_STATIC_ASSERT( (is_mutable< MatrixA >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< MatrixB >::value) );
         BOOST_STATIC_ASSERT( (is_mutable< VectorS >::value) );
         std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
@@ -167,7 +168,7 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename MatrixA, typename MatrixB, typename VectorS >
- static void invoke( const MatrixA& a, MatrixB& b, VectorS& s,
+ static void invoke( MatrixA& a, MatrixB& b, VectorS& s,
             const real_type rcond, fortran_int_t& rank,
             fortran_int_t& info, minimal_workspace work ) {
         std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
@@ -191,7 +192,7 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename MatrixA, typename MatrixB, typename VectorS >
- static void invoke( const MatrixA& a, MatrixB& b, VectorS& s,
+ static void invoke( MatrixA& a, MatrixB& b, VectorS& s,
             const real_type rcond, fortran_int_t& rank,
             fortran_int_t& info, optimal_workspace work ) {
         real_type opt_size_work;


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