Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58711 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates templates/computational templates/driver
From: rutger_at_[hidden]
Date: 2010-01-05 12:01:49


Author: rutger
Date: 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
New Revision: 58711
URL: http://svn.boost.org/trac/boost/changeset/58711

Log:
Several bug fixes to the BLAS/LAPACK bindings generators, introduced detection of banded matrix types, restated support for fortran integer types

Added:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/trevc.hpp (contents, props changed)
Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py | 29 ++++++++++++++++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 19 ++++++++++++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 13 +++++++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 49 ++++++++++++++++++++++++++++++---------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsd.hpp | 10 ++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelss.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gelsy.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesvd.hpp | 4 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/lalsd.hpp | 8 +++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp | 11 ++++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp | 2
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp | 2
   13 files changed, 108 insertions(+), 49 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -9,6 +9,7 @@
 #
 
 import re
+import netlib
 
 #
 # Desired order of routines in C++ code: float, double, single complex, double complex
@@ -128,6 +129,7 @@
 
   result = template_map[ parsermode + '_names.h' ]
   result = result.replace( "$CONTENT", content )
+ result = result.replace( "$LIBRARY_INT_TYPE", "fortran_int_t" )
   #//result = result.replace( "$PARSERMODE", template_map[ "PARSERMODE" ] )
 
   open( dest_file, 'wb' ).write( result )
@@ -155,6 +157,7 @@
       template = template.replace( "$ARGUMENTS", ", ".join( arg_list ) )
       template = template.replace( '$RETURN_TYPE', global_info_map[ k ][ 'return_value_type' ] )
       template = template.replace( '$RETURN_STATEMENT', global_info_map[ k ][ 'return_statement' ] )
+ template = template.replace( "$LIBRARY_INT_TYPE", "fortran_int_t" )
       content += proper_indent( template )
 
     content += '\n'
@@ -240,12 +243,18 @@
 # Generate const-overloads
 #
 
-def generate_const_variants( argument_list ):
+def generate_const_variants( prefix, argument_list, template_map ):
+ print "Const variant generation prefix: ", prefix
     print "Generating const variants for ", argument_list
     permute_indices = []
     result = []
     comments = []
 
+ # use this arg list may contain a modified version of the
+ # argument list, where in some overruled cases the 'const '
+ # will be removed from the argument (force permutation)
+ use_this_arg_list = []
+
     for i in range( 0, len(argument_list) ):
         argument = argument_list[i]
         if 'const' not in argument and \
@@ -254,18 +263,25 @@
            'typename' not in argument and \
            '&' in argument:
             permute_indices.append( i )
+ else:
+ arg_name = argument.split( ' ' )[ -1 ].upper()
+ my_key = prefix + '.' + arg_name + '.level2_permute'
+ if netlib.my_has_key( my_key, template_map ):
+ permute_indices.append( i )
+ argument = argument.replace( 'const ', '' )
+ use_this_arg_list.append( argument )
 
     print " To be permuted: ", permute_indices
 
     for i in range( 0, pow( 2, len( permute_indices ) ) ):
         #print "i: ", i
         new_arg_list = []
- new_arg_list += argument_list
+ new_arg_list += use_this_arg_list
         new_comments = []
         for j in range( 0, len( permute_indices ) ):
             if ( i & (1<<j) ):
- #print permute_indices[j], ": const " + argument_list[ permute_indices[ j ] ]
- new_arg_list[ permute_indices[ j ] ] = "const " + argument_list[ permute_indices[ j ] ]
+ #print permute_indices[j], ": const " + use_this_arg_list[ permute_indices[ j ] ]
+ new_arg_list[ permute_indices[ j ] ] = "const " + use_this_arg_list[ permute_indices[ j ] ]
                 arg = new_arg_list[ permute_indices[ j ] ]
                 new_comments.append( "// * " +
                     arg[ :arg.find("&" ) ] + "&" )
@@ -276,8 +292,9 @@
 
            # else:
                 #print permute_indices[j], "don't add const"
- result.append( new_arg_list )
- comments.append( new_comments )
+ if new_arg_list not in result:
+ result.append( new_arg_list )
+ comments.append( new_comments )
         #new_arg_list = []
 
     #print "result: ", result

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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -110,6 +110,12 @@
         sub_template = sub_template.replace( "$SPECIALIZATION", documentation.routine_value_type[ subroutine[0] ] )
         sub_template = sub_template.replace( '$STATIC_ASSERTS', "\n ".join( level0_static_asserts ) )
 
+ if select_backend == 'blas_overloads':
+ sub_template = sub_template.replace( '$LIBRARY_INT_TYPE', "fortran_int_t" )
+ else:
+ # the C integer-type defaults to 'int'
+ sub_template = sub_template.replace( '$LIBRARY_INT_TYPE', "int" )
+
         # CBLAS stuff
         if 'cblas_routine' in info_map[ subroutine ]:
             cblas_routine = info_map[ subroutine ][ 'cblas_routine' ]
@@ -267,7 +273,7 @@
         for arg in info_map[ subroutine ][ 'grouped_arguments' ][ 'by_io' ][ 'output' ]:
           if info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_type' ] != None:
             assert_line = 'BOOST_STATIC_ASSERT( (is_mutable< ' + \
- info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_static_assert' ] + ' >::value ) );'
+ info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_static_assert' ] + ' >::value) );'
             level1_static_assert_list += [ assert_line ]
 
       # import the code by argument
@@ -286,6 +292,8 @@
           typedef_list += [ info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'typedef' ] ]
         if info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_2' ] != None:
           level2_arg_list += [ info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_2' ] ]
+ if 'banded' in info_map[ subroutine ][ 'argument_map' ][ arg ]:
+ includes += [ '#include <boost/numeric/bindings/bandwidth.hpp' ]
 
       # Insert the order_type() if appropriate
       if info_map[ subroutine ][ "has_cblas_order_arg" ]:
@@ -297,7 +305,7 @@
       level1_template = level1_template.replace( "$CALL_LEVEL1", ", ".join( call_level1_arg_list ) )
       level1_template = level1_template.replace( "$LEVEL1", ", ".join( level1_arg_list ) )
       level1_template = level1_template.replace( "$TYPES", ", ".join( level1_type_arg_list ) )
- level1_template = level1_template.replace( "$ASSERTS", "\n ".join( level1_assert_list ) )
+ level1_template = level1_template.replace( "$ASSERTS", "\n ".join( sorted( level1_assert_list ) ) )
       level1_template = level1_template.replace( '$RETURN_TYPE', info_map[ subroutine ][ 'level1_return_type' ] )
       level1_template = level1_template.replace( '$RETURN_STATEMENT', info_map[ subroutine ][ 'return_statement' ] )
       level1_template = level1_template.replace( "$KEYWORDS", ", ".join( keyword_type_list ) )
@@ -312,7 +320,9 @@
       # type-traits deduction, etc..
       # more important: all non-const and const variants of functions are written here
       level2_functions = []
- level2_arg_lists, level2_comments = bindings.generate_const_variants( level2_arg_list )
+ level2_arg_lists, level2_comments = \
+ bindings.generate_const_variants( group_name.lower() + '.' + value_type, \
+ level2_arg_list, template_map )
       for level2_idx in range( 0, len( level2_arg_lists ) ):
         level2_function = level2_template.replace( "$LEVEL2", \
                 ", ".join( level2_arg_lists[ level2_idx ] ) )
@@ -390,7 +400,8 @@
     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 )
+ result = result.replace( '$INTEGER_TYPE', netlib.generic_integer_type )
+ result = result.replace( '$LIBRARY_INT_TYPE', netlib.generic_integer_type )
     result = result.replace( 'template< >', '' )
     result = result.replace( '\n\n\n', '\n\n' )
     result = result.replace( "\n \n", "\n" )

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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -99,6 +99,7 @@
       sub_template = sub_template.replace( "$SUBROUTINE", subroutine )
       sub_template = sub_template.replace( '$groupname', group_name.lower() )
       sub_template = sub_template.replace( "$SPECIALIZATION", documentation.routine_value_type[ subroutine[0] ] )
+ sub_template = sub_template.replace( '$LIBRARY_INT_TYPE', "fortran_int_t" )
       
       overloads += bindings.proper_indent( sub_template )
   
@@ -215,7 +216,7 @@
         for arg in info_map[ subroutine ][ 'grouped_arguments' ][ 'by_io' ][ 'output' ]:
           if info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_type' ] != None:
             assert_line = 'BOOST_STATIC_ASSERT( (is_mutable< ' + \
- info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_static_assert' ] + ' >::value ) );'
+ info_map[ subroutine ][ 'argument_map' ][ arg ][ 'code' ][ 'level_1_static_assert' ] + ' >::value) );'
             level1_static_assert_list += [ assert_line ]
 
       # import the code, by argument
@@ -257,7 +258,7 @@
       level1_template = level1_template.replace( "$CALL_LEVEL1", ", ".join( call_level1_arg_list ) )
       level1_template = level1_template.replace( "$LEVEL1", ", ".join( level1_arg_list ) )
       level1_template = level1_template.replace( "$TYPES", ", ".join( level1_type_arg_list ) )
- level1_template = level1_template.replace( "$ASSERTS", "\n ".join( level1_assert_list ) )
+ level1_template = level1_template.replace( "$ASSERTS", "\n ".join( sorted( level1_assert_list ) ) )
       level1_template = level1_template.replace( "$KEYWORDS", ", ".join( keyword_type_list ) )
       
       if len( level1_static_assert_list ) > 0:
@@ -275,7 +276,9 @@
       # type-traits deduction, etc..
       # more important: all non-const and const variants of functions are written here
       level2_functions = []
- level2_arg_lists, level2_comments = bindings.generate_const_variants( level2_arg_list )
+ level2_arg_lists, level2_comments = \
+ bindings.generate_const_variants( \
+ group_name.lower() + '.' + value_type, level2_arg_list, template_map )
       for level2_idx in range( 0, len( level2_arg_lists ) ):
         level2_function = level2_template.replace( "$LEVEL2", \
                 ", ".join( level2_arg_lists[ level2_idx ] ) )
@@ -457,10 +460,12 @@
     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 )
+ result = result.replace( '$INTEGER_TYPE', netlib.generic_integer_type )
+ result = result.replace( '$LIBRARY_INT_TYPE', "fortran_int_t" )
     result = result.replace( '\n\n\n', '\n\n' )
     result = result.replace( "\n \n", "\n" )
     result = result.replace( "\n \n", "\n" )
+ result = result.replace( "\n \n", "\n" )
 
     # 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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -14,7 +14,8 @@
 # for debugging purposes
 import pprint
 
-fortran_integer_type = 'std::ptrdiff_t'
+library_integer_type = '$LIBRARY_INT_TYPE'
+generic_integer_type = 'std::ptrdiff_t'
 
 complex_float_type = 'std::complex<float>'
 complex_double_type = 'std::complex<double>'
@@ -25,7 +26,7 @@
 global_type_map = {
   'CHARACTER': 'char',
   'LOGICAL': 'logical_t',
- 'INTEGER': fortran_integer_type,
+ 'INTEGER': library_integer_type,
   'REAL': 'float',
   'DOUBLE PRECISION': 'double' }
 
@@ -111,6 +112,8 @@
     if 'trait_type' in properties:
         if properties[ 'trait_type' ] in [ 'trans', 'uplo', 'diag' ]:
             result = level0_types[ name ]
+ if '*' not in result and '&' not in result and 'const ' in result:
+ result = result.replace( 'const ', '' )
     return result
 
 def level0_typename( name, properties ):
@@ -184,7 +187,6 @@
       else:
         result = "size_column_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
             ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
-
     #
     # number of rows is only valid if there's no option to transposing
     #
@@ -195,8 +197,26 @@
         result = "size_row_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
             ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
 
+
+ if properties[ 'trait_type' ] == 'num_sub':
+ if 'ref_trans' not in arg_map[ properties[ 'trait_of' ][ 0 ] ]:
+ result = "bandwidth_lower(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ ")"
+ else:
+ result = "bandwidth_lower_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
+
+
+ if properties[ 'trait_type' ] == 'num_super':
+ if 'ref_trans' not in arg_map[ properties[ 'trait_of' ][ 0 ] ]:
+ result = "bandwidth_upper(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ ")"
+ else:
+ result = "bandwidth_upper_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
+
     #
- #
+ # The number of columns of op( A )
     #
     if properties[ 'trait_type' ] == 'trans_num_columns':
       result = "size_column(" + properties[ 'trait_of' ][1].lower() + ")"
@@ -436,8 +456,8 @@
 
   if properties[ 'type' ] == 'matrix' and call_level1_type( name, properties ) != None:
     result += [ "BOOST_ASSERT( " + \
- "size_minor( " + call_level1_type( name, properties ) +" ) == 1 || " + \
- "stride_minor( " + call_level1_type( name, properties ) +" ) == 1 );"
+ "size_minor(" + call_level1_type( name, properties ) +") == 1 || " + \
+ "stride_minor(" + call_level1_type( name, properties ) +") == 1 );"
     ]
 
   return result
@@ -477,7 +497,7 @@
   result = None
   if 'workspace' in properties[ 'io' ]:
     if properties[ 'value_type' ] == 'INTEGER':
- result = fortran_integer_type
+ result = library_integer_type
     elif properties[ 'value_type' ] == 'LOGICAL':
       result = 'bool'
     elif properties[ 'value_type' ] == 'REAL' or properties[ 'value_type' ] == 'DOUBLE PRECISION':
@@ -544,7 +564,9 @@
     code_result = []
     for arg in properties[ 'assert_size_args' ]:
       if arg_map.has_key( arg ):
- code_result += [ cpp_type( arg, arg_map[ arg ] ) ]
+ cpp_type_code = cpp_type( arg, arg_map[ arg ] ).replace( library_integer_type,
+ "$INTEGER_TYPE" )
+ code_result += [ cpp_type_code ]
       else:
         if type( properties[ 'assert_size' ] ) == StringType:
           code_result += [ '?' + properties[ 'assert_size' ] ]
@@ -1130,9 +1152,10 @@
         #
         # Try to detect fastest cases first (cheapest traits)
         #
- match_matrix_traits = re.compile( '(rows|columns|order)(in|of|the|input|\s)+(matrix|matrices|\s)+' + \
+ match_matrix_traits = re.compile( '(sub|super|rows|columns|order)([\-]?diagonals|with|in|of|the|band|input|\s)+(matrix|matrices|\s)+' + \
             '([A-Z]+\s+and\s+[A-Z]+|[A-Z]+)', re.M | re.S ).findall( comment_block )
         if len( match_matrix_traits ) == 1:
+ print "Matched trait:", match_matrix_traits[0][0]
           if match_matrix_traits[0][0] == 'order':
             #
             # see if the traits are overruled through the template system
@@ -1160,9 +1183,11 @@
           else:
             references = match_matrix_traits[0][3].split( 'and' )
             for matrix_name in references:
- if matrix_name.strip() in grouped_arguments[ 'by_type' ][ 'matrix' ]:
- argument_properties[ 'trait_type' ] = 'num_' + match_matrix_traits[0][0]
- argument_properties[ 'trait_of' ] = [ matrix_name.strip() ]
+ try_names = [ matrix_name.strip(), matrix_name.strip() + 'B' ]
+ for try_name in try_names:
+ if try_name in grouped_arguments[ 'by_type' ][ 'matrix' ]:
+ argument_properties[ 'trait_type' ] = 'num_' + match_matrix_traits[0][0]
+ argument_properties[ 'trait_of' ] = [ try_name.strip() ]
 
         #
         # Matrix traits detection, continued

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -1,6 +1,6 @@
 $TEMPLATE[blas.hpp]
 //
-// Copyright (c) 2003--2009
+// Copyright (c) 2002--2010
 // Toon Knapen, Karl Meerbergen, Kresimir Fresl,
 // Thomas Klimpel and Rutger ter Borg
 //

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/trevc.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/trevc.hpp 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -0,0 +1,3 @@
+$TEMPLATE[trevc.real.T.level2_permute]
+$TEMPLATE[trevc.complex.SELECT.level2_permute]
+$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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -5,13 +5,13 @@
 $TEMPLATE[gelsd.all.extra_variables]
 MINMN,SMLSIZ,NLVL
 $TEMPLATE[gelsd.all.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
+$INTEGER_TYPE minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gelsd.all.SMLSIZ.init]
-integer_t smlsiz = ilaenv(9, "GELSD", "");
+$INTEGER_TYPE 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);
+$INTEGER_TYPE nlvl = static_cast<$INTEGER_TYPE>(((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;
+$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
 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
@@ -24,6 +24,6 @@
 $TEMPLATE[gelsd.real.min_size_work.args]
 MINMN,SMLSIZ, NLVL, NRHS
 $TEMPLATE[gelsd.real.min_size_work]
-integer_t smlsiz_plus_one = smlsiz + 1;
+$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
 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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -1,14 +1,14 @@
 $TEMPLATE[gelss.real.min_size_work.args]
 M,N,NRHS
 $TEMPLATE[gelss.real.min_size_work]
-integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+$INTEGER_TYPE 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< $INTEGER_TYPE >( size_row(a), size_column(a) );
+$INTEGER_TYPE minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gelss.complex.min_size_work.args]
 M,N,NRHS,MINMN
 $TEMPLATE[gelss.complex.min_size_work]

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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -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< $INTEGER_TYPE >( m, n );
+$INTEGER_TYPE 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< $INTEGER_TYPE >( m, n );
+$INTEGER_TYPE 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/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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -1,14 +1,14 @@
 $TEMPLATE[gesvd.real.min_size_work.args]
 M,N
 $TEMPLATE[gesvd.real.min_size_work]
-integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+$INTEGER_TYPE 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< $INTEGER_TYPE >( size_row(a), size_column(a) );
+$INTEGER_TYPE minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
 $TEMPLATE[gesvd.complex.min_size_work.args]
 M,N,MINMN
 $TEMPLATE[gesvd.complex.min_size_work]

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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -1,7 +1,7 @@
 $TEMPLATE[lalsd.real.min_size_work.args]
 N,SMLSIZ, NLVL, NRHS
 $TEMPLATE[lalsd.real.min_size_work]
-integer_t smlsiz_plus_one = smlsiz + 1;
+$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
 return 9*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + smlsiz_plus_one * smlsiz_plus_one;
 $TEMPLATE[lalsd.real.min_size_iwork.args]
 N,NLVL
@@ -10,17 +10,17 @@
 $TEMPLATE[lalsd.complex.min_size_rwork.args]
 N,SMLSIZ, NLVL, NRHS
 $TEMPLATE[lalsd.complex.min_size_rwork]
-integer_t smlsiz_plus_one = smlsiz + 1;
+$INTEGER_TYPE smlsiz_plus_one = smlsiz + 1;
 return 9*n + 2*n*smlsiz + 8*n*nlvl + 3*smlsiz*nrhs + smlsiz_plus_one * smlsiz_plus_one;
 $TEMPLATE[lalsd.all.extra_variables]
 NLVL
 $TEMPLATE[lalsd.complex.NLVL.init]
-integer_t nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<integer_t>(
+$INTEGER_TYPE nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<$INTEGER_TYPE>(
     std::log(static_cast<real_type>(std::min< $INTEGER_TYPE >(traits::matrix_size2(b),n))/
     static_cast<real_type>(smlsiz+1)) /
     std::log(static_cast<real_type>(2.))) + 1 );
 $TEMPLATE[lalsd.real.NLVL.init]
-integer_t nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<integer_t>(
+$INTEGER_TYPE nlvl = std::max< $INTEGER_TYPE >( 0, static_cast<$INTEGER_TYPE>(
     std::log(static_cast<real_type>(n)/static_cast<real_type>(smlsiz+1)) /
     std::log(static_cast<real_type>(2.)) ) + 1 );
 $TEMPLATE[end]

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 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -1,6 +1,6 @@
 $TEMPLATE[lapack.hpp]
 //
-// Copyright (c) 2003--2009
+// Copyright (c) 2002--2010
 // Toon Knapen, Karl Meerbergen, Kresimir Fresl,
 // Thomas Klimpel and Rutger ter Borg
 //
@@ -59,7 +59,7 @@
 
 $TEMPLATE[lapack_include_hierarchy]
 //
-// Copyright (c) 2003--2009
+// Copyright (c) 2002--2010
 // Toon Knapen, Karl Meerbergen, Kresimir Fresl,
 // Thomas Klimpel and Rutger ter Borg
 //
@@ -164,7 +164,7 @@
 //
 template< $TYPES, typename Workspace >
 inline std::ptrdiff_t $groupname( $LEVEL2, Workspace work ) {
- std::ptrdiff_t info(0);
+ fortran_int_t info(0);
     $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, work );
     return info;
 }
@@ -176,7 +176,7 @@
 //
 template< $TYPES >
 inline std::ptrdiff_t $groupname( $LEVEL2 ) {
- std::ptrdiff_t info(0);
+ fortran_int_t info(0);
     $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, optimal_workspace() );
     return info;
 }
@@ -211,6 +211,7 @@
         $ASSERTS
         detail::$groupname( $CALL_LEVEL0 );
     }
+
 };
 
 $TEMPLATE[level2_noworkspace]
@@ -220,7 +221,7 @@
 //
 template< $TYPES >
 inline std::ptrdiff_t $groupname( $LEVEL2 ) {
- std::ptrdiff_t info(0);
+ fortran_int_t info(0);
     $groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
     return info;
 }

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -42,7 +42,7 @@
 #ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_NAMES_H
 #define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_NAMES_H
 
-#include <boost/numeric/bindings/detail/fortran.h>
+#include <boost/numeric/bindings/detail/config/fortran.hpp>
 
 $CONTENT
 

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_lapack.hpp 2010-01-05 12:01:46 EST (Tue, 05 Jan 2010)
@@ -55,7 +55,7 @@
 #define BOOST_NUMERIC_BINDINGS_LAPACK_DETAIL_LAPACK_NAMES_H
 
 #ifndef BOOST_NUMERIC_BINDINGS_USE_CLAPACK
-# include <boost/numeric/bindings/detail/fortran.h>
+# include <boost/numeric/bindings/detail/config/fortran.hpp>
 #else
 # define FORTRAN_ID( id ) id##_
 #endif


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