Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58449 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates templates/computational templates/driver
From: rutger_at_[hidden]
Date: 2009-12-18 04:00:19


Author: rutger
Date: 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
New Revision: 58449
URL: http://svn.boost.org/trac/boost/changeset/58449

Log:
added type-id to max functions in templates, updated lapack to more recent bindings-traits functions

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 1
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 17 +++++++++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/bdsqr.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gebrd.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gelqf.hpp | 6 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/hgeqz.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp | 12 +++++-----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/orm.hpp | 28 +++++++++++++-------------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stegr.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stemr.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp | 42 ++++++++++++++++++++--------------------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gees.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geesx.hpp | 10 ++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geev.hpp | 6 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geevx.hpp | 10 ++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gegv.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp | 10 ++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsy.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp | 14 ++++++------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggesx.hpp | 12 +++++-----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggev.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggevx.hpp | 16 +++++++-------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggglm.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gglse.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heev.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevr.hpp | 6 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevx.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegv.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegvx.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hesvx.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp | 6 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stev.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stevr.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syev.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syevr.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygv.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygvx.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sysvx.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp | 22 +++++++++-----------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.qbk | 4 ---
   45 files changed, 166 insertions(+), 164 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -292,6 +292,7 @@
     result = result.replace( '$groupname', group_name.lower() )
     result = result.replace( '$DIRNAME', base_dir.split("/")[-1].upper() )
     result = result.replace( '$dirname', base_dir.split("/")[-1].lower() )
+ result = result.replace( '$INTEGER_TYPE', netlib.fortran_integer_type )
 
     # replace the global variables as last (this is convenient)
     #result = result.replace( '$INDENT', ' ' )

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -56,11 +56,17 @@
     
     filename = group_name.lower() + '.hpp'
     includes = [ '#include <boost/assert.hpp>',
- '#include <boost/numeric/bindings/traits/traits.hpp>',
- '#include <boost/numeric/bindings/traits/type_traits.hpp>',
+ '#include <boost/numeric/bindings/remove_imaginary.hpp>',
+ '#include <boost/numeric/bindings/value.hpp>',
+ '#include <boost/numeric/bindings/begin.hpp>',
+ '#include <boost/numeric/bindings/size.hpp>',
+ '#include <boost/numeric/bindings/stride.hpp>',
+ #'#include <boost/numeric/bindings/traits/traits.hpp>',
+ #'#include <boost/numeric/bindings/traits/type_traits.hpp>',
       '#include <boost/numeric/bindings/lapack/detail/lapack.h>',
- '#include <boost/mpl/bool.hpp>',
+ #'#include <boost/mpl/bool.hpp>',
       '#include <boost/type_traits/is_same.hpp>',
+ '#include <boost/type_traits/remove_const.hpp>',
       '#include <boost/static_assert.hpp>' ]
 
     if template_map.has_key( group_name.lower() + '.includes' ):
@@ -177,8 +183,8 @@
           for arg_B in static_asserts[1:]:
             print "Adding static assert for argA", arg_A, " argb", arg_B
             assert_line = 'BOOST_STATIC_ASSERT( (boost::is_same< ' + \
- info_map[ subroutine ][ 'argument_map' ][ arg_A ][ 'code' ][ 'level_1_static_assert' ] + ', ' + \
- info_map[ subroutine ][ 'argument_map' ][ arg_B ][ 'code' ][ 'level_1_static_assert' ] + \
+ 'typename remove_const< typename value< ' + info_map[ subroutine ][ 'argument_map' ][ arg_A ][ 'code' ][ 'level_1_static_assert' ] + ' >::type >::type, ' + \
+ 'typename remove_const< typename value< ' + info_map[ subroutine ][ 'argument_map' ][ arg_B ][ 'code' ][ 'level_1_static_assert' ] + ' >::type >::type' \
                 ' >::value) );'
             level1_static_assert_list += [ assert_line ]
 
@@ -406,6 +412,7 @@
     result = result.replace( '$groupname', group_name.lower() )
     result = result.replace( '$DIRNAME', base_dir.split("/")[-1].upper() )
     result = result.replace( '$dirname', base_dir.split("/")[-1].lower() )
+ result = result.replace( '$INTEGER_TYPE', netlib.fortran_integer_type )
 
     # replace the global variables as last (this is convenient)
     #result = result.replace( '$INDENT', ' ' )

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -300,7 +300,7 @@
     
   if arg[0] == 'max' or arg[0] == 'min':
     print "arg1: ", arg[1]
- result = 'std::' + arg[0] + '< std::ptrdiff_t >('
+ result = 'std::' + arg[0] + '< $INTEGER_TYPE >('
     i = 0
     for a in arg[1]:
       result += expand_nested_list( a, arg_map, use_arg_map )

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/bdsqr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/bdsqr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/bdsqr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -4,12 +4,12 @@
 if ( ncvt == 0 && nru == 0 && ncc == 0 )
     return 2*n;
 else
- return std::max(1, 4*n);
+ return std::max< $INTEGER_TYPE >(1, 4*n);
 $TEMPLATE[bdsqr.complex.min_size_rwork.args]
 N,NCVT,NRU,NCC
 $TEMPLATE[bdsqr.complex.min_size_rwork]
 if ( ncvt == 0 && nru == 0 && ncc == 0 )
     return 2*n;
 else
- return std::max(1, 4*n-4);
+ return std::max< $INTEGER_TYPE >(1, 4*n-4);
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gebrd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gebrd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gebrd.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[gebrd.all.min_size_work.args]
 M,N
 $TEMPLATE[gebrd.all.min_size_work]
-return std::max( 1, std::max( m, n ) );
+return std::max< $INTEGER_TYPE >( 1, std::max< $INTEGER_TYPE >( m, n ) );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gelqf.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gelqf.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/gelqf.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,13 +1,13 @@
 $TEMPLATE[gelqf.all.min_size_work.args]
 M
 $TEMPLATE[gelqf.all.min_size_work]
-return std::max( 1, m );
+return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[geqlf.all.min_size_work.args]
 N
 $TEMPLATE[geqlf.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[getri.all.min_size_work.args]
 N
 $TEMPLATE[getri.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/hgeqz.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/hgeqz.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/hgeqz.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[hgeqz.all.min_size_work.args]
 N
 $TEMPLATE[hgeqz.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/org.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,25 +1,25 @@
 $TEMPLATE[orgbr.all.min_size_work.args]
 M,N
 $TEMPLATE[orgbr.all.min_size_work]
-return std::max( 1, std::min( m, n );
+return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n );
 $TEMPLATE[orglq.all.min_size_work.args]
 M
 $TEMPLATE[orglq.all.min_size_work]
-return std::max( 1, m );
+return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[orgrq.all.min_size_work.args]
 M
 $TEMPLATE[orgrq.all.min_size_work]
-return std::max( 1, m );
+return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[orgql.all.min_size_work.args]
 N
 $TEMPLATE[orgql.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[orgqr.all.min_size_work.args]
 N
 $TEMPLATE[orgqr.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[orgtr.all.min_size_work.args]
 N
 $TEMPLATE[orgtr.all.min_size_work]
-return std::max( 1, n-1 );
+return std::max< $INTEGER_TYPE >( 1, n-1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/orm.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/orm.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/orm.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -2,49 +2,49 @@
 SIDE,M,N
 $TEMPLATE[ormbr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormlq.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormlq.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormqr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormqr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormrq.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormrq.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormtr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormtr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormql.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormql.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ormhr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ormhr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stegr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stegr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stegr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -2,16 +2,16 @@
 N, JOBZ
 $TEMPLATE[stegr.all.min_size_work]
 if ( jobz == 'V' ) {
- return std::max( 1, 18*n );
+ return std::max< $INTEGER_TYPE >( 1, 18*n );
 } else {
- return std::max( 1, 12*n );
+ return std::max< $INTEGER_TYPE >( 1, 12*n );
 }
 $TEMPLATE[stegr.all.min_size_iwork.args]
 N,JOBZ
 $TEMPLATE[stegr.all.min_size_iwork]
 if ( jobz == 'V' ) {
- return std::max( 1, 10*n );
+ return std::max< $INTEGER_TYPE >( 1, 10*n );
 } else {
- return std::max( 1, 8*n );
+ return std::max< $INTEGER_TYPE >( 1, 8*n );
 }
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stemr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stemr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/stemr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -2,16 +2,16 @@
 N, JOBZ
 $TEMPLATE[stemr.all.min_size_work]
 if ( jobz == 'V' ) {
- return std::max( 1, 18*n );
+ return std::max< $INTEGER_TYPE >( 1, 18*n );
 } else {
- return std::max( 1, 12*n );
+ return std::max< $INTEGER_TYPE >( 1, 12*n );
 }
 $TEMPLATE[stemr.all.min_size_iwork.args]
 N,JOBZ
 $TEMPLATE[stemr.all.min_size_iwork]
 if ( jobz == 'V' ) {
- return std::max( 1, 10*n );
+ return std::max< $INTEGER_TYPE >( 1, 10*n );
 } else {
- return std::max( 1, 8*n );
+ return std::max< $INTEGER_TYPE >( 1, 8*n );
 }
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/un.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,77 +1,77 @@
 $TEMPLATE[ungbr.all.min_size_work.args]
 M,N
 $TEMPLATE[ungbr.all.min_size_work]
-return std::max( 1, std::min( m, n ) );
+return std::max< $INTEGER_TYPE >( 1, std::min< $INTEGER_TYPE >( m, n ) );
 $TEMPLATE[ungql.all.min_size_work.args]
 N
 $TEMPLATE[ungql.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[ungqr.all.min_size_work.args]
 N
 $TEMPLATE[ungqr.all.min_size_work]
-return std::max( 1, n );
+return std::max< $INTEGER_TYPE >( 1, n );
 $TEMPLATE[unglq.all.min_size_work.args]
 M
 $TEMPLATE[unglq.all.min_size_work]
-return std::max( 1, m );
+return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ungrq.all.min_size_work.args]
 M
 $TEMPLATE[ungrq.all.min_size_work]
-return std::max( 1, m );
+return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[ungtr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[ungtr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmbr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmbr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmhr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmhr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmlq.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmlq.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmqr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmqr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmrq.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmrq.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmql.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmql.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[unmtr.all.min_size_work.args]
 SIDE,M,N
 $TEMPLATE[unmtr.all.min_size_work]
 if ( side == 'L' )
- return std::max( 1, n );
+ return std::max< $INTEGER_TYPE >( 1, n );
 else
- return std::max( 1, m );
+ return std::max< $INTEGER_TYPE >( 1, m );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gees.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gees.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gees.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,7 +1,7 @@
 $TEMPLATE[gees.real.min_size_work.args]
 N
 $TEMPLATE[gees.real.min_size_work]
-return std::max( 1, 3*n );
+return std::max< $INTEGER_TYPE >( 1, 3*n );
 $TEMPLATE[gees.all.min_size_bwork.args]
 N, SORT
 $TEMPLATE[gees.all.min_size_bwork]
@@ -12,5 +12,5 @@
 $TEMPLATE[gees.complex.min_size_work.args]
 N
 $TEMPLATE[gees.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geesx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geesx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geesx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -11,17 +11,17 @@
 if ( sense == 'N' || sense == 'E' )
     return 1;
 else
- return std::max( 1, n*n/4 );
+ return std::max< $INTEGER_TYPE >( 1, n*n/4 );
 $TEMPLATE[geesx.all.min_size_work.args]
 N, SENSE
 $TEMPLATE[geesx.real.min_size_work]
 if ( sense == 'N' )
- return std::max( 1, 3*n );
+ return std::max< $INTEGER_TYPE >( 1, 3*n );
 else
- return std::max( 1, n+n*n/2 );
+ return std::max< $INTEGER_TYPE >( 1, n+n*n/2 );
 $TEMPLATE[geesx.complex.min_size_work]
 if ( sense == 'N' )
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 else
- return std::max( 1, n*n/2 );
+ return std::max< $INTEGER_TYPE >( 1, n*n/2 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geev.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geev.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geev.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -2,11 +2,11 @@
 JOBVL,JOBVR,N
 $TEMPLATE[geev.real.min_size_work]
 if ( jobvl == 'V' || jobvr == 'V' )
- return std::max( 1, 4*n );
+ return std::max< $INTEGER_TYPE >( 1, 4*n );
 else
- return std::max( 1, 3*n );
+ return std::max< $INTEGER_TYPE >( 1, 3*n );
 $TEMPLATE[geev.complex.min_size_work.args]
 N
 $TEMPLATE[geev.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geevx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geevx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/geevx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -10,16 +10,16 @@
 $TEMPLATE[geevx.real.min_size_work]
 if ( sense == 'N' || sense == 'E' ) {
     if ( jobvl =='V' || jobvr == 'V' )
- return std::max( 1, 3*n );
+ return std::max< $INTEGER_TYPE >( 1, 3*n );
     else
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 } else
- return std::max( 1, n*(n+6) );
+ return std::max< $INTEGER_TYPE >( 1, n*(n+6) );
 $TEMPLATE[geevx.complex.min_size_work.args]
 SENSE,N
 $TEMPLATE[geevx.complex.min_size_work]
 if ( sense == 'N' || sense == 'E' )
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 else
- return std::max( 1, n*n + 2*n );
+ return std::max< $INTEGER_TYPE >( 1, n*n + 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gegv.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gegv.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gegv.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[gegv.real.min_size_work.args]
 N
 $TEMPLATE[gegv.real.min_size_work]
-return std::max( 1, 8*n );
+return std::max< $INTEGER_TYPE >( 1, 8*n );
 $TEMPLATE[gegv.complex.min_size_work.args]
 N
 $TEMPLATE[gegv.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,6 +1,6 @@
 $TEMPLATE[gels.all.min_size_work.args]
 M,N,NRHS
 $TEMPLATE[gels.all.min_size_work]
-integer_t minmn = std::min( m, n );
-return std::max( 1, minmn + std::max( minmn, nrhs ) );
+integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+return std::max< $INTEGER_TYPE >( 1, minmn + std::max< $INTEGER_TYPE >( minmn, nrhs ) );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -5,25 +5,25 @@
 $TEMPLATE[gelsd.all.extra_variables]
 MINMN,SMLSIZ,NLVL
 $TEMPLATE[gelsd.all.MINMN.init]
-integer_t minmn = std::min( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
 $TEMPLATE[gelsd.all.SMLSIZ.init]
 integer_t smlsiz = ilaenv(9, "GELSD", "");
 $TEMPLATE[gelsd.all.NLVL.init]
 integer_t nlvl = static_cast<integer_t>(((std::log(static_cast<real_type>(minmn)) / std::log(static_cast<real_type>(2.))) / (smlsiz+1)) + 1);
 $TEMPLATE[gelsd.complex.min_size_rwork]
 integer_t smlsiz_plus_one = smlsiz + 1;
-return std::max( 1, 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl + 3*smlsiz*nrhs + smlsiz_plus_one * smlsiz_plus_one );
+return std::max< $INTEGER_TYPE >( 1, 10*minmn + 2*minmn*smlsiz + 8*minmn*nlvl + 3*smlsiz*nrhs + smlsiz_plus_one * smlsiz_plus_one );
 $TEMPLATE[gelsd.complex.min_size_work.args]
 MINMN, NRHS
 $TEMPLATE[gelsd.complex.min_size_work]
-return std::max( 1, 2*minmn + minmn*nrhs );
+return std::max< $INTEGER_TYPE >( 1, 2*minmn + minmn*nrhs );
 $TEMPLATE[gelsd.all.min_size_iwork.args]
 MINMN,NLVL
 $TEMPLATE[gelsd.all.min_size_iwork]
-return std::max( 1, 3*minmn*nlvl + 11*minmn );
+return std::max< $INTEGER_TYPE >( 1, 3*minmn*nlvl + 11*minmn );
 $TEMPLATE[gelsd.real.min_size_work.args]
 MINMN,SMLSIZ, NLVL, NRHS
 $TEMPLATE[gelsd.real.min_size_work]
 integer_t smlsiz_plus_one = smlsiz + 1;
-return std::max( 1, 12*minmn + 2*minmn*smlsiz + 8*minmn*nlvl + minmn*nrhs + smlsiz_plus_one * smlsiz_plus_one );
+return std::max< $INTEGER_TYPE >( 1, 12*minmn + 2*minmn*smlsiz + 8*minmn*nlvl + minmn*nrhs + smlsiz_plus_one * smlsiz_plus_one );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,18 +1,18 @@
 $TEMPLATE[gelss.real.min_size_work.args]
 M,N,NRHS
 $TEMPLATE[gelss.real.min_size_work]
-integer_t minmn = std::min( m, n );
-return std::max( 1, 3*minmn + std::max( std::max( 2*minmn, std::max(m,n) ), nrhs ) );
+integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+return std::max< $INTEGER_TYPE >( 1, 3*minmn + std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >( 2*minmn, std::max< $INTEGER_TYPE >(m,n) ), nrhs ) );
 $TEMPLATE[gelss.complex.extra_variables]
 MINMN
 $TEMPLATE[gelss.complex.extra_opt_variables]
 MINMN
 $TEMPLATE[gelss.complex.MINMN.init]
-integer_t minmn = std::min( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
 $TEMPLATE[gelss.complex.min_size_work.args]
 M,N,NRHS,MINMN
 $TEMPLATE[gelss.complex.min_size_work]
-return std::max( 1, 2*minmn + std::max( std::max( m,n ), nrhs ) );
+return std::max< $INTEGER_TYPE >( 1, 2*minmn + std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >( m,n ), nrhs ) );
 $TEMPLATE[gelss.complex.min_size_rwork.args]
 MINMN
 $TEMPLATE[gelss.complex.min_size_rwork]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsy.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsy.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsy.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[gelsy.all.min_size_work.args]
 M,N,NRHS
 $TEMPLATE[gelsy.real.min_size_work]
-integer_t minmn = std::min( m, n );
-return std::max( 1, std::max( minmn+3*n+1, 2*minmn+nrhs ));
+integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+return std::max< $INTEGER_TYPE >( 1, std::max< $INTEGER_TYPE >( minmn+3*n+1, 2*minmn+nrhs ));
 $TEMPLATE[gelsy.complex.min_size_work]
-integer_t minmn = std::min( m, n );
-return std::max( 1, std::max( std::max( 2*minmn, n+1 ), minmn+nrhs ) );
+integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+return std::max< $INTEGER_TYPE >( 1, std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >( 2*minmn, n+1 ), minmn+nrhs ) );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -3,19 +3,19 @@
 $TEMPLATE[gesdd.all.extra_opt_variables]
 MINMN
 $TEMPLATE[gesdd.all.MINMN.init]
-integer_t minmn = std::min( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
 $TEMPLATE[gesdd.all.min_size_work.args]
 M, N, JOBZ, MINMN
 $TEMPLATE[gesdd.real.min_size_work]
 if ( n == 0 ) return 1;
-if ( jobz == 'N' ) return 3*minmn + std::max( std::max(m,n), 7*minmn );
-if ( jobz == 'O' ) return 3*minmn*minmn + std::max( std::max( m,n ), 5*minmn*minmn + 4*minmn );
-return 3*minmn*minmn + std::max( std::max( m,n ), 4*minmn*minmn + 4*minmn );
+if ( jobz == 'N' ) return 3*minmn + std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >(m,n), 7*minmn );
+if ( jobz == 'O' ) return 3*minmn*minmn + std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >( m,n ), 5*minmn*minmn + 4*minmn );
+return 3*minmn*minmn + std::max< $INTEGER_TYPE >( std::max< $INTEGER_TYPE >( m,n ), 4*minmn*minmn + 4*minmn );
 $TEMPLATE[gesdd.complex.min_size_work]
 if ( n == 0 ) return 1;
-if ( jobz == 'N' ) return 2*minmn + std::max( m,n );
-if ( jobz == 'O' ) return 2*(minmn*minmn + minmn) + std::max( m, n );
-return minmn*minmn + 2*minmn + std::max( m, n );
+if ( jobz == 'N' ) return 2*minmn + std::max< $INTEGER_TYPE >( m,n );
+if ( jobz == 'O' ) return 2*(minmn*minmn + minmn) + std::max< $INTEGER_TYPE >( m, n );
+return minmn*minmn + 2*minmn + std::max< $INTEGER_TYPE >( m, n );
 $TEMPLATE[gesdd.all.min_size_iwork.args]
 MINMN
 $TEMPLATE[gesdd.all.min_size_iwork]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,18 +1,18 @@
 $TEMPLATE[gesvd.real.min_size_work.args]
 M,N
 $TEMPLATE[gesvd.real.min_size_work]
-integer_t minmn = std::min( m, n );
-return std::max( 1, std::max( 3*minmn+std::max(m,n), 5*minmn ) );
+integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+return std::max< $INTEGER_TYPE >( 1, std::max< $INTEGER_TYPE >( 3*minmn+std::max< $INTEGER_TYPE >(m,n), 5*minmn ) );
 $TEMPLATE[gesvd.complex.extra_variables]
 MINMN
 $TEMPLATE[gesvd.complex.extra_opt_variables]
 MINMN
 $TEMPLATE[gesvd.complex.MINMN.init]
-integer_t minmn = std::min( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
+integer_t minmn = std::min< $INTEGER_TYPE >( traits::matrix_num_rows(a), traits::matrix_num_columns(a) );
 $TEMPLATE[gesvd.complex.min_size_work.args]
 M,N,MINMN
 $TEMPLATE[gesvd.complex.min_size_work]
-return std::max( 1, 2*minmn+std::max(m,n) );
+return std::max< $INTEGER_TYPE >( 1, 2*minmn+std::max< $INTEGER_TYPE >(m,n) );
 $TEMPLATE[gesvd.complex.min_size_rwork.args]
 MINMN
 $TEMPLATE[gesvd.complex.min_size_rwork]

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 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[gges.all.min_size_work.args]
 N
 $TEMPLATE[gges.real.min_size_work]
-return std::max( 1, 8*n + 16 );
+return std::max< $INTEGER_TYPE >( 1, 8*n + 16 );
 $TEMPLATE[gges.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[gges.all.min_size_bwork.args]
 N, SORT
 $TEMPLATE[gges.all.min_size_bwork]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggesx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggesx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggesx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -4,12 +4,12 @@
 if ( sense == 'N' )
     return 1;
 else
- return std::max( 1, n+6 );
+ return std::max< $INTEGER_TYPE >( 1, n+6 );
 $TEMPLATE[ggesx.complex.min_size_iwork]
 if ( sense == 'N' )
     return 1;
 else
- return std::max( 1, n+2 );
+ return std::max< $INTEGER_TYPE >( 1, n+2 );
 $TEMPLATE[ggesx.all.min_size_bwork.args]
 N, SORT
 $TEMPLATE[ggesx.all.min_size_bwork]
@@ -23,12 +23,12 @@
 if ( n == 0 )
     return 1;
 if ( sense == 'N' )
- return std::max( 8*n, 6*n+16 );
+ return std::max< $INTEGER_TYPE >( 8*n, 6*n+16 );
 else
- return std::max( 8*n, std::max( 6*n+16, n*n/2 ));
+ return std::max< $INTEGER_TYPE >( 8*n, std::max< $INTEGER_TYPE >( 6*n+16, n*n/2 ));
 $TEMPLATE[ggesx.complex.min_size_work]
 if ( sense == 'N' )
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 else
- return std::max( 1, std::max( 2*n, n*n/2 ) );
+ return std::max< $INTEGER_TYPE >( 1, std::max< $INTEGER_TYPE >( 2*n, n*n/2 ) );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggev.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggev.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggev.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[ggev.real.min_size_work.args]
 N
 $TEMPLATE[ggev.real.min_size_work]
-return std::max( 1, 8*n );
+return std::max< $INTEGER_TYPE >( 1, 8*n );
 $TEMPLATE[ggev.complex.min_size_work.args]
 N
 $TEMPLATE[ggev.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggevx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggevx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggevx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -23,28 +23,28 @@
 BALANC, N
 $TEMPLATE[ggevx.complex.min_size_rwork]
 if ( balanc == 'S' || balanc == 'B' )
- return std::max( 1, 6*n );
+ return std::max< $INTEGER_TYPE >( 1, 6*n );
 else
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[ggevx.real.min_size_work.args]
 BALANC,JOBVL,JOBVR,SENSE,N
 $TEMPLATE[ggevx.real.min_size_work]
 if ( balanc == 'S' || balanc == 'B' || jobvl == 'V' || jobvr == 'V' )
- return std::max( 1, 6*n );
+ return std::max< $INTEGER_TYPE >( 1, 6*n );
 if ( sense == 'E' )
- return std::max( 1, 10*n );
+ return std::max< $INTEGER_TYPE >( 1, 10*n );
 if ( sense == 'V' || sense == 'B' )
     return 2*n*n + 8*n + 16;
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[ggevx.complex.min_size_work.args]
 SENSE, N
 $TEMPLATE[ggevx.complex.min_size_work]
 if ( sense == 'N' )
- return std::max( 1, 2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n );
 else {
     if ( sense == 'E' )
- return std::max( 1, 4*n );
+ return std::max< $INTEGER_TYPE >( 1, 4*n );
     else
- return std::max( 1, 2*n*n+2*n );
+ return std::max< $INTEGER_TYPE >( 1, 2*n*n+2*n );
 }
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggglm.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggglm.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/ggglm.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[ggglm.all.min_size_work.args]
 M,N,P
 $TEMPLATE[ggglm.all.min_size_work]
-return std::max( 1, n+m+p );
+return std::max< $INTEGER_TYPE >( 1, n+m+p );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gglse.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gglse.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gglse.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[gglse.all.min_size_work.args]
 M,N,P
 $TEMPLATE[gglse.all.min_size_work]
-return std::max( 1, m+n+p );
+return std::max< $INTEGER_TYPE >( 1, m+n+p );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heev.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heev.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heev.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[heev.complex.min_size_rwork.args]
 N
 $TEMPLATE[heev.complex.min_size_rwork]
-return std::max( 1, 3*n-2 );
+return std::max< $INTEGER_TYPE >( 1, 3*n-2 );
 $TEMPLATE[heev.complex.min_size_work.args]
 N
 $TEMPLATE[heev.complex.min_size_work]
-return std::max( 1, 2*n-1 );
+return std::max< $INTEGER_TYPE >( 1, 2*n-1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,13 +1,13 @@
 $TEMPLATE[heevr.complex.min_size_work.args]
 N
 $TEMPLATE[heevr.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[heevr.complex.min_size_rwork.args]
 N
 $TEMPLATE[heevr.complex.min_size_rwork]
-return std::max( 1, 24*n );
+return std::max< $INTEGER_TYPE >( 1, 24*n );
 $TEMPLATE[heevr.complex.min_size_iwork.args]
 N
 $TEMPLATE[heevr.complex.min_size_iwork]
-return std::max( 1, 10*n );
+return std::max< $INTEGER_TYPE >( 1, 10*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/heevx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[heevx.complex.min_size_work.args]
 N
 $TEMPLATE[heevx.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegv.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegv.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegv.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[hegv.complex.min_size_rwork.args]
 N
 $TEMPLATE[hegv.complex.min_size_rwork]
-return std::max( 1, 3*n-2 );
+return std::max< $INTEGER_TYPE >( 1, 3*n-2 );
 $TEMPLATE[hegv.complex.min_size_work.args]
 N
 $TEMPLATE[hegv.complex.min_size_work]
-return std::max( 1, 2*n-1 );
+return std::max< $INTEGER_TYPE >( 1, 2*n-1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegvx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegvx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hegvx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[hegvx.complex.min_size_work.args]
 N
 $TEMPLATE[hegvx.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hesvx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hesvx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/hesvx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[hesvx.complex.min_size_work.args]
 N
 $TEMPLATE[hesvx.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -15,12 +15,12 @@
 $TEMPLATE[lalsd.all.extra_variables]
 NLVL
 $TEMPLATE[lalsd.complex.NLVL.init]
-integer_t nlvl = std::max( 0, static_cast<integer_t>(
- std::log(static_cast<real_type>(std::min(traits::matrix_size2(b),n))/
+integer_t nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<integer_t>(
+ 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_t nlvl = std::max( 0, static_cast<integer_t>(
+integer_t nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<integer_t>(
     std::log(static_cast<real_type>(n)/static_cast<real_type>(smlsiz+1)) /
     std::log(static_cast<real_type>(2.)) ) + 1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stev.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stev.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stev.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[stev.real.min_size_work.args]
 N
 $TEMPLATE[stev.real.min_size_work]
-return std::max( 1, 2*n-2 );
+return std::max< $INTEGER_TYPE >( 1, 2*n-2 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stevr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stevr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/stevr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[stevr.real.min_size_work.args]
 N
 $TEMPLATE[stevr.real.min_size_work]
-return std::max( 1, 20*n );
+return std::max< $INTEGER_TYPE >( 1, 20*n );
 $TEMPLATE[stevr.real.min_size_iwork.args]
 N
 $TEMPLATE[stevr.real.min_size_iwork]
-return std::max( 1, 10*n );
+return std::max< $INTEGER_TYPE >( 1, 10*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syev.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syev.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syev.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[syev.real.min_size_work.args]
 N
 $TEMPLATE[syev.real.min_size_work]
-return std::max( 1, 3*n-1 );
+return std::max< $INTEGER_TYPE >( 1, 3*n-1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syevr.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syevr.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/syevr.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[syevr.real.min_size_work.args]
 N
 $TEMPLATE[syevr.real.min_size_work]
-return std::max( 1, 26*n );
+return std::max< $INTEGER_TYPE >( 1, 26*n );
 $TEMPLATE[syevr.real.min_size_iwork.args]
 N
 $TEMPLATE[syevr.real.min_size_iwork]
-return std::max( 1, 10*n );
+return std::max< $INTEGER_TYPE >( 1, 10*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygv.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygv.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygv.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[sygv.real.min_size_work.args]
 N
 $TEMPLATE[sygv.real.min_size_work]
-return std::max( 1, 3*n-1 );
+return std::max< $INTEGER_TYPE >( 1, 3*n-1 );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygvx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygvx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sygvx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,5 +1,5 @@
 $TEMPLATE[sygvx.real.min_size_work.args]
 N
 $TEMPLATE[sygvx.real.min_size_work]
-return std::max( 1, 8*n );
+return std::max< $INTEGER_TYPE >( 1, 8*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sysvx.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sysvx.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sysvx.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -1,9 +1,9 @@
 $TEMPLATE[sysvx.real.min_size_work.args]
 N
 $TEMPLATE[sysvx.real.min_size_work]
-return std::max( 1, 3*n );
+return std::max< $INTEGER_TYPE >( 1, 3*n );
 $TEMPLATE[sysvx.complex.min_size_work.args]
 N
 $TEMPLATE[sysvx.complex.min_size_work]
-return std::max( 1, 2*n );
+return std::max< $INTEGER_TYPE >( 1, 2*n );
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -22,9 +22,10 @@
 namespace bindings {
 namespace lapack {
 
-//$DESCRIPTION
-
-// overloaded functions to call lapack
+//
+// The detail namespace contains value-type-overloaded functions that
+// dispatch to the appropriate back-end LAPACK routine.
+//
 namespace detail {
 
 $OVERLOADS} // namespace detail
@@ -73,11 +74,11 @@
 $TEMPLATE[level1_header2]
 // $SPECIALIZATION specialization
 template< typename Value >
-struct $groupname_impl< Value, typename boost::enable_if< traits::is_$SPECIALIZATION<Value> >::type > {
+struct $groupname_impl< Value, typename boost::enable_if< is_$SPECIALIZATION< Value > >::type > {
 
 $TEMPLATE[level1_workspace]
     typedef Value value_type;
- typedef typename traits::type_traits<Value>::real_type real_type;
+ typedef typename remove_imaginary< Value >::type real_type;
 
 $INCLUDE_TEMPLATES
     // user-defined workspace specialization
@@ -118,18 +119,16 @@
 // template function to call $groupname
 template< $TYPES, typename Workspace >
 inline integer_t $groupname( $LEVEL2, Workspace work ) {
- typedef typename traits::$TYPEOF_FIRST_TYPENAME_traits< $FIRST_TYPENAME >::value_type value_type;
     integer_t info(0);
- $groupname_impl< value_type >::invoke( $CALL_LEVEL1, work );
+ $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, work );
     return info;
 }
 
 // template function to call $groupname, default workspace type
 template< $TYPES >
 inline integer_t $groupname( $LEVEL2 ) {
- typedef typename traits::$TYPEOF_FIRST_TYPENAME_traits< $FIRST_TYPENAME >::value_type value_type;
     integer_t info(0);
- $groupname_impl< value_type >::invoke( $CALL_LEVEL1, optimal_workspace() );
+ $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, optimal_workspace() );
     return info;
 }
 $TEMPLATE[setup_min_workspace]
@@ -143,7 +142,7 @@
 
 $TEMPLATE[level1_noworkspace]
     typedef Value value_type;
- typedef typename traits::type_traits<Value>::real_type real_type;
+ typedef typename remove_imaginary< Value >::type real_type;
 
 $INCLUDE_TEMPLATES
     // templated specialization
@@ -159,9 +158,8 @@
 // template function to call $groupname
 template< $TYPES >
 inline integer_t $groupname( $LEVEL2 ) {
- typedef typename traits::$TYPEOF_FIRST_TYPENAME_traits< $FIRST_TYPENAME >::value_type value_type;
     integer_t info(0);
- $groupname_impl< value_type >::invoke( $CALL_LEVEL1 );
+ $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
     return info;
 }
 $TEMPLATE[end]

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.qbk 2009-12-18 04:00:14 EST (Fri, 18 Dec 2009)
@@ -40,10 +40,6 @@
     ]]
 ]
 
-The tensor_traits<>::value_type of A, B, and C should be the same.
-Tensor C should be mutable.
-
-
 
 [heading Complexity]
 


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