Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63849 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/auxiliary libs/numeric/bindings/doc/lapack/auxiliary libs/numeric/bindings/tools/templates/auxiliary libs/numeric/bindings/tools/templates/computational libs/numeric/bindings/tools/templates/driver
From: thomas.klimpel_at_[hidden]
Date: 2010-07-11 08:09:54


Author: klimpel
Date: 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
New Revision: 63849
URL: http://svn.boost.org/trac/boost/changeset/63849

Log:
added templates to override detected workspace size for some routines in lapack/auxiliary
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lalsd.hpp
      - copied unchanged from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/langb.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lange.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhb.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhe.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhf.hpp
      - copied unchanged from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhp.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhs.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansb.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansp.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansy.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantb.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantp.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantr.hpp
      - copied, changed from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/laqhe.hpp
      - copied unchanged from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larz.hpp
      - copied, changed from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp
Removed:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/langb.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lange.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhb.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhe.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhp.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhs.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansb.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansp.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansy.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantb.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantp.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantr.hpp | 15 ++++---
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larf.hpp | 23 ++++++-----
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp | 78 ++++++++++++++++++++++-----------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfx.hpp | 37 ++++++++++++------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larz.hpp | 13 ++----
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/auxiliary/larfb.qbk | 3 +
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantr.hpp | 7 +++
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larf.hpp | 6 ++-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larz.hpp | 7 +--
   20 files changed, 211 insertions(+), 143 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/langb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/langb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/langb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -125,7 +125,7 @@
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
         BOOST_ASSERT( bindings::bandwidth_upper(ab) >= 0 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ab) ));
         BOOST_ASSERT( bindings::size_column(ab) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
@@ -149,8 +149,8 @@
     static std::ptrdiff_t invoke( const char norm, const MatrixAB& ab,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ab) ) );
         return invoke( norm, ab, workspace( tmp_work ) );
     }
 
@@ -172,9 +172,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lange.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lange.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lange.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -120,7 +120,7 @@
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -144,8 +144,8 @@
     static std::ptrdiff_t invoke( const char norm, const MatrixA& a,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_row(a) ) );
         return invoke( norm, a, workspace( tmp_work ) );
     }
 
@@ -167,9 +167,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t m ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, m );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -104,7 +104,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ab) ));
         BOOST_ASSERT( bindings::size_column(ab) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
@@ -128,8 +128,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ab) ) );
         return invoke( norm, ab, workspace( tmp_work ) );
     }
 
@@ -152,9 +152,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhe.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhe.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhe.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -98,7 +98,7 @@
         typedef typename result_of::uplo_tag< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -121,8 +121,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixA >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(a) ) );
         return invoke( norm, a, workspace( tmp_work ) );
     }
 
@@ -145,9 +145,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhp.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhp.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -94,7 +94,7 @@
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ap) ));
         BOOST_ASSERT( bindings::size_column(ap) >= 0 );
         return detail::lanhp( norm, uplo(), bindings::size_column(ap),
                 bindings::begin_value(ap),
@@ -113,8 +113,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ap) ) );
         return invoke( norm, ap, workspace( tmp_work ) );
     }
 
@@ -137,9 +137,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhs.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhs.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lanhs.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -117,7 +117,7 @@
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -139,8 +139,8 @@
     static std::ptrdiff_t invoke( const char norm, const MatrixA& a,
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(a) ) );
         return invoke( norm, a, workspace( tmp_work ) );
     }
 
@@ -162,9 +162,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -134,7 +134,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
         BOOST_ASSERT( bindings::bandwidth_lower(ab) >= 0 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ab) ));
         BOOST_ASSERT( bindings::size_column(ab) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
@@ -158,8 +158,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ab) ) );
         return invoke( norm, ab, workspace( tmp_work ) );
     }
 
@@ -182,9 +182,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansp.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansp.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -120,7 +120,7 @@
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ap) ));
         BOOST_ASSERT( bindings::size_column(ap) >= 0 );
         return detail::lansp( norm, uplo(), bindings::size_column(ap),
                 bindings::begin_value(ap),
@@ -139,8 +139,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixAP >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ap) ) );
         return invoke( norm, ap, workspace( tmp_work ) );
     }
 
@@ -163,9 +163,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansy.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansy.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lansy.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -126,7 +126,7 @@
         typedef typename result_of::uplo_tag< MatrixA >::type uplo;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -149,8 +149,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixA >::type uplo;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(a) ) );
         return invoke( norm, a, workspace( tmp_work ) );
     }
 
@@ -173,9 +173,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -135,7 +135,7 @@
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ab) ));
         BOOST_ASSERT( bindings::size_column(ab) >= 0 );
         BOOST_ASSERT( bindings::size_minor(ab) == 1 ||
                 bindings::stride_minor(ab) == 1 );
@@ -159,8 +159,8 @@
             minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::diag_tag< MatrixAB >::type diag;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ab) ) );
         return invoke( norm, uplo, k, ab, workspace( tmp_work ) );
     }
 
@@ -184,9 +184,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantp.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantp.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -121,7 +121,7 @@
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_column(ap) ));
         BOOST_ASSERT( bindings::size_column(ap) >= 0 );
         return detail::lantp( norm, uplo, diag(), bindings::size_column(ap),
                 bindings::begin_value(ap),
@@ -140,8 +140,8 @@
             const MatrixAP& ap, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::diag_tag< MatrixAP >::type diag;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_column(ap) ) );
         return invoke( norm, uplo, ap, workspace( tmp_work ) );
     }
 
@@ -164,9 +164,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t n ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, n );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/lantr.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -133,7 +133,7 @@
         typedef typename result_of::diag_tag< MatrixA >::type diag;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( norm, bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -159,8 +159,8 @@
         namespace bindings = ::boost::numeric::bindings;
         typedef typename result_of::uplo_tag< MatrixA >::type uplo;
         typedef typename result_of::diag_tag< MatrixA >::type diag;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( norm,
+ bindings::size_row(a) ) );
         return invoke( norm, a, workspace( tmp_work ) );
     }
 
@@ -184,9 +184,12 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const char norm,
+ const std::ptrdiff_t m ) {
+ if ( norm == 'I' )
+ return std::max< std::ptrdiff_t >( 1, m );
+ else
+ return 1;
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larf.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
+#include <boost/numeric/bindings/detail/if_left.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_complex.hpp>
 #include <boost/numeric/bindings/is_mutable.hpp>
@@ -148,8 +149,8 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( side, bindings::size_column(c),
- bindings::size_row(c) ));
+ min_size_work( side, bindings::size_row(c),
+ bindings::size_column(c) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
@@ -173,7 +174,7 @@
             const real_type tau, MatrixC& c, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work( side,
- bindings::size_column(c), bindings::size_row(c) ) );
+ bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, v, tau, c, workspace( tmp_work ) );
     }
 
@@ -197,8 +198,9 @@
     //
     template< typename Side >
     static std::ptrdiff_t min_size_work( const Side side,
- const std::ptrdiff_t n, const std::ptrdiff_t m ) {
- return ( side == 'L' ? n : m );
+ const std::ptrdiff_t m, const std::ptrdiff_t n ) {
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
     }
 };
 
@@ -229,8 +231,8 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( side, bindings::size_column(c),
- bindings::size_row(c) ));
+ min_size_work( side, bindings::size_row(c),
+ bindings::size_column(c) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
@@ -254,7 +256,7 @@
             const value_type tau, MatrixC& c, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work( side,
- bindings::size_column(c), bindings::size_row(c) ) );
+ bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, v, tau, c, workspace( tmp_work ) );
     }
 
@@ -278,8 +280,9 @@
     //
     template< typename Side >
     static std::ptrdiff_t min_size_work( const Side side,
- const std::ptrdiff_t n, const std::ptrdiff_t m ) {
- return ( side == 'L' ? n : m );
+ const std::ptrdiff_t m, const std::ptrdiff_t n ) {
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larfb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
+#include <boost/numeric/bindings/detail/if_left.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_complex.hpp>
 #include <boost/numeric/bindings/is_mutable.hpp>
@@ -153,7 +154,7 @@
             typename MatrixC, typename WORK >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- detail::workspace1< WORK > work ) {
+ const fortran_int_t ldwork, detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixV >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixT >::value) );
@@ -168,7 +169,7 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( ldwork, bindings::size_column(t) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::size_minor(t) == 1 ||
@@ -185,8 +186,8 @@
                 bindings::size_column(t), bindings::begin_value(v),
                 bindings::stride_major(v), bindings::begin_value(t),
                 bindings::stride_major(t), bindings::begin_value(c),
- bindings::stride_major(c), bindings::begin_value(work),
- bindings::stride_major(work) );
+ bindings::stride_major(c),
+ bindings::begin_value(work.select(real_type())), ldwork );
     }
 
     //
@@ -200,11 +201,12 @@
             typename MatrixC >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- minimal_workspace ) {
+ const fortran_int_t ldwork, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
- return invoke( side, direct, storev, v, t, c, workspace( tmp_work ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( ldwork,
+ bindings::size_column(t) ) );
+ return invoke( side, direct, storev, v, t, c, ldwork,
+ workspace( tmp_work ) );
     }
 
     //
@@ -218,18 +220,19 @@
             typename MatrixC >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- optimal_workspace ) {
+ const fortran_int_t ldwork, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( side, direct, storev, v, t, c, minimal_workspace() );
+ return invoke( side, direct, storev, v, t, c, ldwork,
+ minimal_workspace() );
     }
 
     //
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const std::ptrdiff_t ldwork,
+ const std::ptrdiff_t k ) {
+ return ldwork * k;
     }
 };
 
@@ -251,7 +254,7 @@
             typename MatrixC, typename WORK >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- detail::workspace1< WORK > work ) {
+ const fortran_int_t ldwork, detail::workspace1< WORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixV >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixT >::value) );
@@ -266,7 +269,7 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( ldwork, bindings::size_column(t) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::size_minor(t) == 1 ||
@@ -283,8 +286,8 @@
                 bindings::size_column(t), bindings::begin_value(v),
                 bindings::stride_major(v), bindings::begin_value(t),
                 bindings::stride_major(t), bindings::begin_value(c),
- bindings::stride_major(c), bindings::begin_value(work),
- bindings::stride_major(work) );
+ bindings::stride_major(c),
+ bindings::begin_value(work.select(value_type())), ldwork );
     }
 
     //
@@ -298,11 +301,12 @@
             typename MatrixC >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- minimal_workspace ) {
+ const fortran_int_t ldwork, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
- return invoke( side, direct, storev, v, t, c, workspace( tmp_work ) );
+ bindings::detail::array< value_type > tmp_work( min_size_work( ldwork,
+ bindings::size_column(t) ) );
+ return invoke( side, direct, storev, v, t, c, ldwork,
+ workspace( tmp_work ) );
     }
 
     //
@@ -316,18 +320,19 @@
             typename MatrixC >
     static std::ptrdiff_t invoke( const Side side, const char direct,
             const char storev, const MatrixV& v, const MatrixT& t, MatrixC& c,
- optimal_workspace ) {
+ const fortran_int_t ldwork, optimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- return invoke( side, direct, storev, v, t, c, minimal_workspace() );
+ return invoke( side, direct, storev, v, t, c, ldwork,
+ minimal_workspace() );
     }
 
     //
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_work( const std::ptrdiff_t ldwork,
+ const std::ptrdiff_t k ) {
+ return ldwork * k;
     }
 };
 
@@ -351,9 +356,11 @@
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
 larfb( const Side side, const char direct, const char storev,
- const MatrixV& v, const MatrixT& t, MatrixC& c, Workspace work ) {
+ const MatrixV& v, const MatrixT& t, MatrixC& c,
+ const fortran_int_t ldwork, Workspace work ) {
     return larfb_impl< typename bindings::value_type<
- MatrixV >::type >::invoke( side, direct, storev, v, t, c, work );
+ MatrixV >::type >::invoke( side, direct, storev, v, t, c, ldwork,
+ work );
 }
 
 //
@@ -365,9 +372,10 @@
 inline typename boost::disable_if< detail::is_workspace< MatrixC >,
         std::ptrdiff_t >::type
 larfb( const Side side, const char direct, const char storev,
- const MatrixV& v, const MatrixT& t, MatrixC& c ) {
+ const MatrixV& v, const MatrixT& t, MatrixC& c,
+ const fortran_int_t ldwork ) {
     return larfb_impl< typename bindings::value_type<
- MatrixV >::type >::invoke( side, direct, storev, v, t, c,
+ MatrixV >::type >::invoke( side, direct, storev, v, t, c, ldwork,
             optimal_workspace() );
 }
 
@@ -382,9 +390,10 @@
         std::ptrdiff_t >::type
 larfb( const Side side, const char direct, const char storev,
         const MatrixV& v, const MatrixT& t, const MatrixC& c,
- Workspace work ) {
+ const fortran_int_t ldwork, Workspace work ) {
     return larfb_impl< typename bindings::value_type<
- MatrixV >::type >::invoke( side, direct, storev, v, t, c, work );
+ MatrixV >::type >::invoke( side, direct, storev, v, t, c, ldwork,
+ work );
 }
 
 //
@@ -396,9 +405,10 @@
 inline typename boost::disable_if< detail::is_workspace< MatrixC >,
         std::ptrdiff_t >::type
 larfb( const Side side, const char direct, const char storev,
- const MatrixV& v, const MatrixT& t, const MatrixC& c ) {
+ const MatrixV& v, const MatrixT& t, const MatrixC& c,
+ const fortran_int_t ldwork ) {
     return larfb_impl< typename bindings::value_type<
- MatrixV >::type >::invoke( side, direct, storev, v, t, c,
+ MatrixV >::type >::invoke( side, direct, storev, v, t, c, ldwork,
             optimal_workspace() );
 }
 

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-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
+#include <boost/numeric/bindings/detail/if_left.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_complex.hpp>
 #include <boost/numeric/bindings/is_mutable.hpp>
@@ -146,7 +147,8 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( side, bindings::size_row(c),
+ bindings::size_column(c) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::stride_major(c) >= (ERROR) );
@@ -167,8 +169,8 @@
     static std::ptrdiff_t invoke( const Side side, const VectorV& v,
             const real_type tau, MatrixC& c, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< real_type > tmp_work( min_size_work( side,
+ bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, v, tau, c, workspace( tmp_work ) );
     }
 
@@ -190,9 +192,14 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ template< typename Side >
+ static std::ptrdiff_t min_size_work( const Side side,
+ const std::ptrdiff_t m, const std::ptrdiff_t n ) {
+ std::ptrdiff_t order = bindings::detail::if_left( side, n, m );
+ if ( order < 11)
+ return 1;
+ else
+ return std::max< std::ptrdiff_t >( 1, order );
     }
 };
 
@@ -223,7 +230,8 @@
                 MatrixC >::type >::type >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixC >::value) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( side, bindings::size_row(c),
+ bindings::size_column(c) ));
         BOOST_ASSERT( bindings::size_minor(c) == 1 ||
                 bindings::stride_minor(c) == 1 );
         BOOST_ASSERT( bindings::stride_major(c) >= std::max< std::ptrdiff_t >(1,
@@ -245,8 +253,8 @@
     static std::ptrdiff_t invoke( const Side side, const VectorV& v,
             const value_type tau, MatrixC& c, minimal_workspace ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< value_type > tmp_work( min_size_work( side,
+ bindings::size_row(c), bindings::size_column(c) ) );
         return invoke( side, v, tau, c, workspace( tmp_work ) );
     }
 
@@ -268,9 +276,14 @@
     // Static member function that returns the minimum size of
     // workspace-array work.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ template< typename Side >
+ static std::ptrdiff_t min_size_work( const Side side,
+ const std::ptrdiff_t m, const std::ptrdiff_t n ) {
+ std::ptrdiff_t order = bindings::detail::if_left( side, n, m );
+ if ( order < 11)
+ return 1;
+ else
+ return std::max< std::ptrdiff_t >( 1, order );
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larz.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larz.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/auxiliary/larz.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -17,6 +17,7 @@
 #include <boost/assert.hpp>
 #include <boost/numeric/bindings/begin.hpp>
 #include <boost/numeric/bindings/detail/array.hpp>
+#include <boost/numeric/bindings/detail/if_left.hpp>
 #include <boost/numeric/bindings/is_column_major.hpp>
 #include <boost/numeric/bindings/is_complex.hpp>
 #include <boost/numeric/bindings/is_mutable.hpp>
@@ -202,10 +203,8 @@
     template< typename Side >
     static std::ptrdiff_t min_size_work( const Side side,
             const std::ptrdiff_t m, const std::ptrdiff_t n ) {
- if ( side == 'L' )
- return n;
- else
- return m;
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
     }
 };
 
@@ -288,10 +287,8 @@
     template< typename Side >
     static std::ptrdiff_t min_size_work( const Side side,
             const std::ptrdiff_t m, const std::ptrdiff_t n ) {
- if ( side == 'L' )
- return n;
- else
- return m;
+ return std::max< std::ptrdiff_t >( 1, bindings::detail::if_left( side,
+ n, m ) );
     }
 };
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/auxiliary/larfb.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/auxiliary/larfb.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/auxiliary/larfb.qbk 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -10,7 +10,8 @@
 There is one prototype of `larfb` available, please see below.
 ``
 larfb( const Side side, const char direct, const char storev,
- const MatrixV& v, const MatrixT& t, MatrixC& c );
+ const MatrixV& v, const MatrixT& t, MatrixC& c,
+ const int_t ldwork );
 ``
 
 

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/langb.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/langb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[langb.all.min_size_work.args]
+NORM,N
+$TEMPLATE[langb.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lange.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lange.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lange.all.min_size_work.args]
+NORM,M
+$TEMPLATE[lange.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, m );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhb.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lanhb.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lanhb.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhe.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhe.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lanhe.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lanhe.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhp.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lanhp.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lanhp.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lanhs.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lanhs.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lanhs.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansb.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lansb.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lansb.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansp.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lansp.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lansp.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansy.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lansy.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lansy.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lansy.all.min_size_work]
+if ( norm == 'I' || norm == '1' || norm == 'O' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantb.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lantb.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lantb.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantp.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantp.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,8 @@
+$TEMPLATE[lantp.all.min_size_work.args]
+NORM,N
+$TEMPLATE[lantp.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, n );
+else
+ return 1;
+$TEMPLATE[end]

Copied: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantr.hpp (from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp)
==============================================================================
--- /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/lantr.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -1,3 +1,10 @@
 $TEMPLATE[lantr.all.UPLO.trait_of]
 A
+$TEMPLATE[lantr.all.min_size_work.args]
+NORM,M
+$TEMPLATE[lantr.all.min_size_work]
+if ( norm == 'I' )
+ return std::max< $INTEGER_TYPE >( 1, m );
+else
+ return 1;
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larf.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larf.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larf.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -1,5 +1,7 @@
 $TEMPLATE[larf.all.min_size_work.args]
-SIDE, N, M
+SIDE,M,N
+$TEMPLATE[larf.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
 $TEMPLATE[larf.all.min_size_work]
-return ( side == 'L' ? n : m );
+return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
 $TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfb.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,16 @@
+$TEMPLATE[larfb.all.WORK.type]
+vector
+$TEMPLATE[larfb.all.fixme]
+LDWORK isn't handled correctly yet,
+because larfb uses a matrix as workspace instead of a vector.
+$TEMPLATE[larfb.all.extra_variables]
+LDWORK
+$TEMPLATE[larfb.all.LDWORK.init]
+$INTEGER_TYPE ldwork = std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
+$TEMPLATE[larfb.all.min_size_work.args]
+LDWORK,K
+$TEMPLATE[larfb.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
+$TEMPLATE[larfb.all.min_size_work]
+return ldwork * k;
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larfx.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -0,0 +1,11 @@
+$TEMPLATE[larfx.all.min_size_work.args]
+SIDE,M,N
+$TEMPLATE[larfx.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
+$TEMPLATE[larfx.all.min_size_work]
+$INTEGER_TYPE order = bindings::detail::if_left( side, n, m );
+if ( order < 11)
+ return 1;
+else
+ return std::max< $INTEGER_TYPE >( 1, order );
+$TEMPLATE[end]

Copied: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larz.hpp (from r63831, /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp)
==============================================================================
--- /sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/auxiliary/larz.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
@@ -1,8 +1,7 @@
 $TEMPLATE[larz.all.min_size_work.args]
 SIDE,M,N
+$TEMPLATE[larz.includes]
+#include <boost/numeric/bindings/detail/if_left.hpp>
 $TEMPLATE[larz.all.min_size_work]
-if ( side == 'L' )
- return n;
-else
- return m;
+return std::max< $INTEGER_TYPE >( 1, bindings::detail::if_left( side, n, m ) );
 $TEMPLATE[end]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
+++ (empty file)
@@ -1,3 +0,0 @@
-$TEMPLATE[lanhf.all.UPLO.trait_of]
-A
-$TEMPLATE[end]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
+++ (empty file)
@@ -1,3 +0,0 @@
-$TEMPLATE[lantr.all.UPLO.trait_of]
-A
-$TEMPLATE[end]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
+++ (empty file)
@@ -1,3 +0,0 @@
-$TEMPLATE[laqhe.all.UPLO.trait_of]
-A
-$TEMPLATE[end]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/larz.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
+++ (empty file)
@@ -1,8 +0,0 @@
-$TEMPLATE[larz.all.min_size_work.args]
-SIDE,M,N
-$TEMPLATE[larz.all.min_size_work]
-if ( side == 'L' )
- return n;
-else
- return m;
-$TEMPLATE[end]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp 2010-07-11 08:09:51 EDT (Sun, 11 Jul 2010)
+++ (empty file)
@@ -1,26 +0,0 @@
-$TEMPLATE[lalsd.real.min_size_work.args]
-N,SMLSIZ, NLVL, NRHS
-$TEMPLATE[lalsd.real.min_size_work]
-$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
-return 9*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + smlsiz_plus_one * smlsiz_plus_one;
-$TEMPLATE[lalsd.real.min_size_iwork.args]
-N,NLVL
-$TEMPLATE[lalsd.real.min_size_iwork]
-return 3*n*nlvl + 11*n;
-$TEMPLATE[lalsd.complex.min_size_rwork.args]
-N,SMLSIZ, NLVL, NRHS
-$TEMPLATE[lalsd.complex.min_size_rwork]
-$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
-return 9*n + 2*n*smlsiz + 8*n*nlvl + 3*smlsiz*nrhs + smlsiz_plus_one * smlsiz_plus_one;
-$TEMPLATE[lalsd.all.extra_variables]
-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))/
- static_cast<real_type>(smlsiz+1)) /
- std::log(static_cast<real_type>(2.))) + 1 );
-$TEMPLATE[lalsd.real.NLVL.init]
-$INTEGER_TYPE nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<$INTEGER_TYPE>(
- std::log(static_cast<real_type>(n)/static_cast<real_type>(smlsiz+1)) /
- std::log(static_cast<real_type>(2.)) ) + 1 );
-$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