Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63096 - sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational
From: thomas.klimpel_at_[hidden]
Date: 2010-06-19 07:08:46


Author: klimpel
Date: 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
New Revision: 63096
URL: http://svn.boost.org/trac/boost/changeset/63096

Log:
improved automatic minimum workspace size determination for some routines in lapack/computational
Text files modified:
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp | 18 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp | 18 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp | 26 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp | 26 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp | 12
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/stedc.hpp | 250 +++++++++++++++++++++------------------
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp | 24 ++-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp | 18 +-
   sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp | 12
   9 files changed, 216 insertions(+), 188 deletions(-)

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gehrd.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -140,7 +140,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorTAU >::value) );
         BOOST_ASSERT( bindings::size(tau) >= bindings::size_column(a)-1 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -166,7 +166,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column(a) ) );
         return invoke( ilo, ihi, a, tau, workspace( tmp_work ) );
     }
 
@@ -195,9 +195,8 @@
     // 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 n ) {
+ return std::max< std::ptrdiff_t >(1,n);
     }
 };
 
@@ -229,7 +228,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorTAU >::value) );
         BOOST_ASSERT( bindings::size(tau) >= bindings::size_column(a)-1 );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -255,7 +254,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column(a) ) );
         return invoke( ilo, ihi, a, tau, workspace( tmp_work ) );
     }
 
@@ -284,9 +283,8 @@
     // 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 n ) {
+ return std::max< std::ptrdiff_t >(1,n);
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/gerqf.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -141,7 +141,7 @@
                 std::ptrdiff_t >(bindings::size_row(a),
                 bindings::size_column(a)) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -167,7 +167,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a) ) );
         return invoke( a, tau, workspace( tmp_work ) );
     }
 
@@ -195,9 +195,8 @@
     // 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 m ) {
+ return std::max< std::ptrdiff_t >(1,m);
     }
 };
 
@@ -230,7 +229,7 @@
                 std::ptrdiff_t >(bindings::size_row(a),
                 bindings::size_column(a)) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -256,7 +255,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a) ) );
         return invoke( a, tau, workspace( tmp_work ) );
     }
 
@@ -284,9 +283,8 @@
     // 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 m ) {
+ return std::max< std::ptrdiff_t >(1,m);
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggqrf.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -166,7 +166,8 @@
                 std::ptrdiff_t >(bindings::size_row(a),
                 bindings::size_column(b)) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a),
+ bindings::size_column(a), bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
@@ -200,7 +201,8 @@
             VectorTAUB& taub, minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a), bindings::size_column(a),
+ bindings::size_column(b) ) );
         return invoke( a, taua, b, taub, workspace( tmp_work ) );
     }
 
@@ -231,9 +233,10 @@
     // 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 n,
+ const std::ptrdiff_t m, const std::ptrdiff_t p ) {
+ return std::max< std::ptrdiff_t >(1,std::max< std::ptrdiff_t >(n,
+ std::max< std::ptrdiff_t >(m,p)));
     }
 };
 
@@ -281,7 +284,8 @@
                 std::ptrdiff_t >(bindings::size_row(a),
                 bindings::size_column(b)) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a),
+ bindings::size_column(a), bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_column(b) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
@@ -315,7 +319,8 @@
             VectorTAUB& taub, minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a), bindings::size_column(a),
+ bindings::size_column(b) ) );
         return invoke( a, taua, b, taub, workspace( tmp_work ) );
     }
 
@@ -346,9 +351,10 @@
     // 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 n,
+ const std::ptrdiff_t m, const std::ptrdiff_t p ) {
+ return std::max< std::ptrdiff_t >(1,std::max< std::ptrdiff_t >(n,
+ std::max< std::ptrdiff_t >(m,p)));
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/ggrqf.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -166,7 +166,8 @@
                 std::ptrdiff_t >(bindings::size_row(b),
                 bindings::size_column(a)) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column(a),
+ bindings::size_row(a), bindings::size_row(b) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -200,7 +201,8 @@
             VectorTAUB& taub, minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column(a), bindings::size_row(a),
+ bindings::size_row(b) ) );
         return invoke( a, taua, b, taub, workspace( tmp_work ) );
     }
 
@@ -231,9 +233,10 @@
     // 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 n,
+ const std::ptrdiff_t m, const std::ptrdiff_t p ) {
+ return std::max< std::ptrdiff_t >(1,std::max< std::ptrdiff_t >(n,
+ std::max< std::ptrdiff_t >(m,p)));
     }
 };
 
@@ -281,7 +284,8 @@
                 std::ptrdiff_t >(bindings::size_row(b),
                 bindings::size_column(a)) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column(a),
+ bindings::size_row(a), bindings::size_row(b) ));
         BOOST_ASSERT( bindings::size_column(a) >= 0 );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -315,7 +319,8 @@
             VectorTAUB& taub, minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column(a), bindings::size_row(a),
+ bindings::size_row(b) ) );
         return invoke( a, taua, b, taub, workspace( tmp_work ) );
     }
 
@@ -346,9 +351,10 @@
     // 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 n,
+ const std::ptrdiff_t m, const std::ptrdiff_t p ) {
+ return std::max< std::ptrdiff_t >(1,std::max< std::ptrdiff_t >(n,
+ std::max< std::ptrdiff_t >(m,p)));
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/orghr.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -103,7 +103,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(tau) >= n-1 );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( ihi, ilo ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
@@ -127,8 +127,8 @@
             const fortran_int_t ilo, const fortran_int_t ihi,
             MatrixA& a, const VectorTAU& tau, minimal_workspace work ) {
         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( ihi,
+ ilo ) );
         return invoke( n, ilo, ihi, a, tau, workspace( tmp_work ) );
     }
 
@@ -157,9 +157,9 @@
     // 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 ihi,
+ const std::ptrdiff_t ilo ) {
+ return ihi-ilo;
     }
 };
 

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 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -136,9 +136,8 @@
     //
     template< typename VectorD, typename VectorE, typename MatrixZ,
             typename WORK, typename IWORK >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, detail::workspace2< WORK,
- IWORK > work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, detail::workspace2< WORK, IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixZ >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -152,18 +151,18 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorD >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorE >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixZ >::value) );
- BOOST_ASSERT( bindings::size(e) >= n-1 );
+ BOOST_ASSERT( bindings::size(d) >= 0 );
+ BOOST_ASSERT( bindings::size(e) >= bindings::size(d)-1 );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( compz, n ));
+ min_size_iwork( compz, bindings::size(d) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( compz, bindings::size(d) ));
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( compz == 'N' || compz == 'I' || compz == 'V' );
- BOOST_ASSERT( n >= 0 );
- return detail::stedc( compz, n, bindings::begin_value(d),
- bindings::begin_value(e), bindings::begin_value(z),
- bindings::stride_major(z),
+ return detail::stedc( compz, bindings::size(d),
+ bindings::begin_value(d), bindings::begin_value(e),
+ bindings::begin_value(z), bindings::stride_major(z),
                 bindings::begin_value(work.select(real_type())),
                 bindings::size(work.select(real_type())),
                 bindings::begin_value(work.select(fortran_int_t())),
@@ -178,14 +177,14 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename VectorD, typename VectorE, typename MatrixZ >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, minimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, minimal_workspace work ) {
         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( compz,
+ bindings::size(d) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( compz, n ) );
- return invoke( compz, n, d, e, z, workspace( tmp_work, tmp_iwork ) );
+ min_size_iwork( compz, bindings::size(d) ) );
+ return invoke( compz, d, e, z, workspace( tmp_work, tmp_iwork ) );
     }
 
     //
@@ -196,29 +195,36 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename VectorD, typename VectorE, typename MatrixZ >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, optimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, optimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         real_type opt_size_work;
         fortran_int_t opt_size_iwork;
- detail::stedc( compz, n, bindings::begin_value(d),
- bindings::begin_value(e), bindings::begin_value(z),
- bindings::stride_major(z), &opt_size_work, -1,
- &opt_size_iwork, -1 );
+ detail::stedc( compz, bindings::size(d),
+ bindings::begin_value(d), bindings::begin_value(e),
+ bindings::begin_value(z), bindings::stride_major(z),
+ &opt_size_work, -1, &opt_size_iwork, -1 );
         bindings::detail::array< real_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
                 opt_size_iwork );
- return invoke( compz, n, d, e, z, workspace( tmp_work, tmp_iwork ) );
+ return invoke( compz, d, e, z, workspace( tmp_work, tmp_iwork ) );
     }
 
     //
     // 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 compz,
+ const std::ptrdiff_t n ) {
+ if ( compz == 'N' || n <= 1 ) {
+ return 1;
+ } else if ( compz == 'V' ) {
+ return 1 + 3*n + 2*n*static_cast<std::ptrdiff_t>(std::ceil(std::log(
+ n)/std::log(2))) + 3*n*n;
+ } else { // compz == 'I'
+ return 1 + 4*n + n*n;
+ }
     }
 
     //
@@ -227,7 +233,14 @@
     //
     static std::ptrdiff_t min_size_iwork( const char compz,
             const std::ptrdiff_t n ) {
- // some formula
+ if ( compz == 'N' || n <= 1 ) {
+ return 1;
+ } else if ( compz == 'V' ) {
+ return 6 + 6*n + 5*n*static_cast<std::ptrdiff_t>(std::ceil(std::log(
+ n)/std::log(2)));
+ } else { // compz == 'I'
+ return 3 + 5*n;
+ }
     }
 };
 
@@ -247,9 +260,8 @@
     //
     template< typename VectorD, typename VectorE, typename MatrixZ,
             typename WORK, typename RWORK, typename IWORK >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, detail::workspace3< WORK,
- RWORK, IWORK > work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, detail::workspace3< WORK, RWORK, IWORK > work ) {
         namespace bindings = ::boost::numeric::bindings;
         BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixZ >::value) );
         BOOST_STATIC_ASSERT( (boost::is_same< typename remove_const<
@@ -259,20 +271,20 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorD >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorE >::value) );
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixZ >::value) );
- BOOST_ASSERT( bindings::size(e) >= n-1 );
+ BOOST_ASSERT( bindings::size(d) >= 0 );
+ BOOST_ASSERT( bindings::size(e) >= bindings::size(d)-1 );
         BOOST_ASSERT( bindings::size(work.select(fortran_int_t())) >=
- min_size_iwork( compz, n ));
+ min_size_iwork( compz, bindings::size(d) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_rwork( $CALL_MIN_SIZE ));
+ min_size_rwork( compz, bindings::size(d) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( compz, bindings::size(d) ));
         BOOST_ASSERT( bindings::size_minor(z) == 1 ||
                 bindings::stride_minor(z) == 1 );
         BOOST_ASSERT( compz == 'N' || compz == 'I' || compz == 'V' );
- BOOST_ASSERT( n >= 0 );
- return detail::stedc( compz, n, bindings::begin_value(d),
- bindings::begin_value(e), bindings::begin_value(z),
- bindings::stride_major(z),
+ return detail::stedc( compz, bindings::size(d),
+ bindings::begin_value(d), bindings::begin_value(e),
+ bindings::begin_value(z), bindings::stride_major(z),
                 bindings::begin_value(work.select(value_type())),
                 bindings::size(work.select(value_type())),
                 bindings::begin_value(work.select(real_type())),
@@ -289,16 +301,16 @@
     // * Enables the unblocked algorithm (BLAS level 2)
     //
     template< typename VectorD, typename VectorE, typename MatrixZ >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, minimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
- bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
- bindings::detail::array< real_type > tmp_rwork( min_size_rwork(
- $CALL_MIN_SIZE ) );
+ bindings::detail::array< value_type > tmp_work( min_size_work( compz,
+ bindings::size(d) ) );
+ bindings::detail::array< real_type > tmp_rwork( min_size_rwork( compz,
+ bindings::size(d) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
- min_size_iwork( compz, n ) );
- return invoke( compz, n, d, e, z, workspace( tmp_work, tmp_rwork,
+ min_size_iwork( compz, bindings::size(d) ) );
+ return invoke( compz, d, e, z, workspace( tmp_work, tmp_rwork,
                 tmp_iwork ) );
     }
 
@@ -310,23 +322,23 @@
     // * Enables the blocked algorithm (BLAS level 3)
     //
     template< typename VectorD, typename VectorE, typename MatrixZ >
- static std::ptrdiff_t invoke( const char compz, const fortran_int_t n,
- VectorD& d, VectorE& e, MatrixZ& z, optimal_workspace work ) {
+ static std::ptrdiff_t invoke( const char compz, VectorD& d, VectorE& e,
+ MatrixZ& z, optimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         value_type opt_size_work;
         real_type opt_size_rwork;
         fortran_int_t opt_size_iwork;
- detail::stedc( compz, n, bindings::begin_value(d),
- bindings::begin_value(e), bindings::begin_value(z),
- bindings::stride_major(z), &opt_size_work, -1,
- &opt_size_rwork, -1, &opt_size_iwork, -1 );
+ detail::stedc( compz, bindings::size(d),
+ bindings::begin_value(d), bindings::begin_value(e),
+ bindings::begin_value(z), bindings::stride_major(z),
+ &opt_size_work, -1, &opt_size_rwork, -1, &opt_size_iwork, -1 );
         bindings::detail::array< value_type > tmp_work(
                 traits::detail::to_int( opt_size_work ) );
         bindings::detail::array< real_type > tmp_rwork(
                 traits::detail::to_int( opt_size_rwork ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
                 opt_size_iwork );
- return invoke( compz, n, d, e, z, workspace( tmp_work, tmp_rwork,
+ return invoke( compz, d, e, z, workspace( tmp_work, tmp_rwork,
                 tmp_iwork ) );
     }
 
@@ -334,18 +346,29 @@
     // 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 compz,
+ const std::ptrdiff_t n ) {
+ if ( compz == 'N' || compz == 'I' || n <= 1 ) {
+ return 1;
+ } else { // compz == 'V'
+ return n*n;
+ }
     }
 
     //
     // Static member function that returns the minimum size of
     // workspace-array rwork.
     //
- template< $TYPES >
- static std::ptrdiff_t min_size_rwork( $ARGUMENTS ) {
- $MIN_SIZE_IMPLEMENTATION
+ static std::ptrdiff_t min_size_rwork( const char compz,
+ const std::ptrdiff_t n ) {
+ if ( compz == 'N' || n <= 1 ) {
+ return 1;
+ } else if ( compz == 'V' ) {
+ return 1 + 3*n + 2*n*static_cast<std::ptrdiff_t>(std::ceil(std::log(
+ n)/std::log(2))) + 3*n*n;
+ } else { // compz == 'I'
+ return 1 + 4*n + 2*n*n;
+ }
     }
 
     //
@@ -354,7 +377,14 @@
     //
     static std::ptrdiff_t min_size_iwork( const char compz,
             const std::ptrdiff_t n ) {
- // some formula
+ if ( compz == 'N' || n <= 1 ) {
+ return 1;
+ } else if ( compz == 'V' ) {
+ return 6 + 6*n + 5*n*static_cast<std::ptrdiff_t>(std::ceil(std::log(
+ n)/std::log(2)));
+ } else { // compz == 'I'
+ return 3 + 5*n;
+ }
     }
 };
 
@@ -379,10 +409,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- VectorE& e, MatrixZ& z, Workspace work ) {
+stedc( const char compz, VectorD& d, VectorE& e, MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -395,11 +425,9 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- VectorE& e, MatrixZ& z ) {
+stedc( const char compz, VectorD& d, VectorE& e, MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -413,10 +441,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- VectorE& e, MatrixZ& z, Workspace work ) {
+stedc( const char compz, const VectorD& d, VectorE& e, MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -429,11 +457,9 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- VectorE& e, MatrixZ& z ) {
+stedc( const char compz, const VectorD& d, VectorE& e, MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -447,10 +473,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- const VectorE& e, MatrixZ& z, Workspace work ) {
+stedc( const char compz, VectorD& d, const VectorE& e, MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -463,11 +489,9 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- const VectorE& e, MatrixZ& z ) {
+stedc( const char compz, VectorD& d, const VectorE& e, MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -481,10 +505,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- const VectorE& e, MatrixZ& z, Workspace work ) {
+stedc( const char compz, const VectorD& d, const VectorE& e, MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -497,11 +521,10 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- const VectorE& e, MatrixZ& z ) {
+stedc( const char compz, const VectorD& d, const VectorE& e,
+ MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -515,10 +538,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- VectorE& e, const MatrixZ& z, Workspace work ) {
+stedc( const char compz, VectorD& d, VectorE& e, const MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -531,11 +554,9 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- VectorE& e, const MatrixZ& z ) {
+stedc( const char compz, VectorD& d, VectorE& e, const MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -549,10 +570,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- VectorE& e, const MatrixZ& z, Workspace work ) {
+stedc( const char compz, const VectorD& d, VectorE& e, const MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -565,11 +586,10 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- VectorE& e, const MatrixZ& z ) {
+stedc( const char compz, const VectorD& d, VectorE& e,
+ const MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -583,10 +603,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- const VectorE& e, const MatrixZ& z, Workspace work ) {
+stedc( const char compz, VectorD& d, const VectorE& e, const MatrixZ& z,
+ Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -599,11 +619,10 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, VectorD& d,
- const VectorE& e, const MatrixZ& z ) {
+stedc( const char compz, VectorD& d, const VectorE& e,
+ const MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 //
@@ -617,10 +636,10 @@
         typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- const VectorE& e, const MatrixZ& z, Workspace work ) {
+stedc( const char compz, const VectorD& d, const VectorE& e,
+ const MatrixZ& z, Workspace work ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z, work );
+ MatrixZ >::type >::invoke( compz, d, e, z, work );
 }
 
 //
@@ -633,11 +652,10 @@
 template< typename VectorD, typename VectorE, typename MatrixZ >
 inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
         std::ptrdiff_t >::type
-stedc( const char compz, const fortran_int_t n, const VectorD& d,
- const VectorE& e, const MatrixZ& z ) {
+stedc( const char compz, const VectorD& d, const VectorE& e,
+ const MatrixZ& z ) {
     return stedc_impl< typename bindings::value_type<
- MatrixZ >::type >::invoke( compz, n, d, e, z,
- optimal_workspace() );
+ MatrixZ >::type >::invoke( compz, d, e, z, optimal_workspace() );
 }
 
 } // namespace lapack

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tgsyl.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -200,7 +200,8 @@
                 min_size_iwork( bindings::size_column_op(a, trans()),
                 bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column_op(a, trans()),
+ bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
@@ -243,7 +244,8 @@
         typedef typename result_of::data_order< MatrixB >::type order;
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column_op(a, trans()),
+ bindings::size_column(b) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
                 min_size_iwork( bindings::size_column_op(a, trans()),
                 bindings::size_column(b) ) );
@@ -290,9 +292,9 @@
     // 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 m,
+ const std::ptrdiff_t n ) {
+ return std::max< std::ptrdiff_t >(1,2*m*n);
     }
 
     //
@@ -359,7 +361,8 @@
                 min_size_iwork( bindings::size_column_op(a, trans()),
                 bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_column_op(a, trans()),
+ bindings::size_column(b) ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
         BOOST_ASSERT( bindings::size_minor(b) == 1 ||
@@ -402,7 +405,8 @@
         typedef typename result_of::data_order< MatrixB >::type order;
         typedef typename result_of::trans_tag< MatrixA, order >::type trans;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_column_op(a, trans()),
+ bindings::size_column(b) ) );
         bindings::detail::array< fortran_int_t > tmp_iwork(
                 min_size_iwork( bindings::size_column_op(a, trans()),
                 bindings::size_column(b) ) );
@@ -449,9 +453,9 @@
     // 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 m,
+ const std::ptrdiff_t n ) {
+ return std::max< std::ptrdiff_t >(1,2*m*n);
     }
 
     //

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/tzrzf.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -139,7 +139,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorTAU >::value) );
         BOOST_ASSERT( bindings::size(tau) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -165,7 +165,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a) ) );
         return invoke( a, tau, workspace( tmp_work ) );
     }
 
@@ -193,9 +193,8 @@
     // 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 m ) {
+ return std::max< std::ptrdiff_t >(1,m);
     }
 };
 
@@ -226,7 +225,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorTAU >::value) );
         BOOST_ASSERT( bindings::size(tau) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( bindings::size_row(a) ));
         BOOST_ASSERT( bindings::size_column(a) >= bindings::size_row(a) );
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
@@ -252,7 +251,7 @@
             minimal_workspace work ) {
         namespace bindings = ::boost::numeric::bindings;
         bindings::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ bindings::size_row(a) ) );
         return invoke( a, tau, workspace( tmp_work ) );
     }
 
@@ -280,9 +279,8 @@
     // 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 m ) {
+ return std::max< std::ptrdiff_t >(1,m);
     }
 };
 

Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/unghr.hpp 2010-06-19 07:08:44 EDT (Sat, 19 Jun 2010)
@@ -105,7 +105,7 @@
         BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixA >::value) );
         BOOST_ASSERT( bindings::size(tau) >= n-1 );
         BOOST_ASSERT( bindings::size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work( ihi, ilo ));
         BOOST_ASSERT( bindings::size_minor(a) == 1 ||
                 bindings::stride_minor(a) == 1 );
         BOOST_ASSERT( bindings::stride_major(a) >= std::max< std::ptrdiff_t >(1,
@@ -129,8 +129,8 @@
             const fortran_int_t ilo, const fortran_int_t ihi,
             MatrixA& a, const VectorTAU& tau, minimal_workspace work ) {
         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( ihi,
+ ilo ) );
         return invoke( n, ilo, ihi, a, tau, workspace( tmp_work ) );
     }
 
@@ -159,9 +159,9 @@
     // 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 ihi,
+ const std::ptrdiff_t ilo ) {
+ return ihi-ilo;
     }
 };
 


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