|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64050 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/driver libs/numeric/bindings/tools/templates/driver
From: rutger_at_[hidden]
Date: 2010-07-15 11:58:29
Author: rutger
Date: 2010-07-15 11:58:28 EDT (Thu, 15 Jul 2010)
New Revision: 64050
URL: http://svn.boost.org/trac/boost/changeset/64050
Log:
Added N=0 case to gges min work space function
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp | 6 +++++-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp 2010-07-15 11:58:28 EDT (Thu, 15 Jul 2010)
@@ -294,7 +294,11 @@
// workspace-array work.
//
static std::ptrdiff_t min_size_work( const std::ptrdiff_t n ) {
- return std::max< std::ptrdiff_t >( 8*n, 6*n + 16 );
+ if ( n == 0 ) {
+ return 1;
+ } else {
+ return std::max< std::ptrdiff_t >( 8*n, 6*n + 16 );
+ }
}
//
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp 2010-07-15 11:58:28 EDT (Thu, 15 Jul 2010)
@@ -1,7 +1,11 @@
$TEMPLATE[gges.all.min_size_work.args]
N
$TEMPLATE[gges.real.min_size_work]
-return std::max< $INTEGER_TYPE >( 8*n, 6*n + 16 );
+if ( n == 0 ) {
+ return 1;
+} else {
+ return std::max< $INTEGER_TYPE >( 8*n, 6*n + 16 );
+}
$TEMPLATE[gges.complex.min_size_work]
return std::max< $INTEGER_TYPE >( 1, 2*n );
$TEMPLATE[gges.all.min_size_bwork.args]
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