Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59117 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates
From: rutger_at_[hidden]
Date: 2010-01-18 04:25:00


Author: rutger
Date: 2010-01-18 04:24:58 EST (Mon, 18 Jan 2010)
New Revision: 59117
URL: http://svn.boost.org/trac/boost/changeset/59117

Log:
updated generators and main templates to have a single point of definition for namespaces

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 2 +-
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 4 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp | 4 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp | 14 +++++++-------
   4 files changed, 12 insertions(+), 12 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 2010-01-18 04:24:58 EST (Mon, 18 Jan 2010)
@@ -381,7 +381,7 @@
       level2_template = level2_template.replace( ' $STATIC_ASSERTS\n', '' )
 
       if first_typename == 'Value':
- level2_template = level2_template.replace( 'typename bindings::value_type< Value >::type', 'Value' )
+ level2_template = level2_template.replace( 'typename $NAMESPACEvalue_type< Value >::type', 'Value' )
           level2_template = level2_template.replace( 'typename remove_imaginary< Value >::type', 'Value' )
 
       level1_map[ value_type ] = bindings.proper_indent( level1_template )

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-18 04:24:58 EST (Mon, 18 Jan 2010)
@@ -402,7 +402,7 @@
         for name in info_map[ subroutine ][ 'grouped_arguments' ][ 'by_io' ][ 'workspace' ]:
           # minimal case
           sub_min_template = template_map[ 'setup_min_workspace' ]
- sub_min_template = sub_min_template.replace( '$NAME', name.lower() )
+ sub_min_template = sub_min_template.replace( '$WORKSPACE_FUNC', name.lower() )
           sub_min_template = sub_min_template.replace( '$WORKSPACE_TYPE', info_map[ subroutine ][ 'argument_map' ][ name ][ 'code' ][ 'workspace_type' ] )
           if info_map[ subroutine ][ 'argument_map' ][ name ][ 'code' ][ 'min_workspace_call' ] != None:
             sub_min_template = sub_min_template.replace( "$CALL_MIN_SIZE", info_map[ subroutine ][ 'argument_map' ][ name ][ 'code' ][ 'min_workspace_call' ] )
@@ -449,7 +449,7 @@
         min_size_funcs = ''
         for name in info_map[ subroutine ][ 'grouped_arguments' ][ 'by_io' ][ 'workspace' ]:
           sub_template = template_map[ 'min_size_func' ]
- sub_template = sub_template.replace( "$NAME", name.lower() )
+ sub_template = sub_template.replace( "$WORKSPACE_FUNC", name.lower() )
 
           # first: user-defined stuff (overrules any auto-detected stuff)
 

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-18 04:24:58 EST (Mon, 18 Jan 2010)
@@ -142,8 +142,8 @@
 $COMMENTS
 //
 template< $TYPES >
-inline typename $groupname_impl< typename bindings::value_type< $FIRST_TYPENAME >::type >::return_type
+inline typename $groupname_impl< typename $NAMESPACEvalue_type< $FIRST_TYPENAME >::type >::return_type
 $groupname( $LEVEL2 ) {
- $RETURN_STATEMENT$groupname_impl< typename bindings::value_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
+ $RETURN_STATEMENT$groupname_impl< typename $NAMESPACEvalue_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
 }
 $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-18 04:24:58 EST (Mon, 18 Jan 2010)
@@ -216,7 +216,7 @@
 template< $TYPES, typename Workspace >
 inline typename boost::enable_if< detail::is_workspace< Workspace >, $INTEGER_TYPE >::type
 $groupname( $LEVEL2, Workspace work ) {
- return $groupname_impl< typename bindings::value_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, work );
+ return $groupname_impl< typename $NAMESPACEvalue_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, work );
 }
 
 //
@@ -227,18 +227,18 @@
 template< $TYPES >
 inline typename boost::disable_if< detail::is_workspace< $LAST_TYPENAME >, $INTEGER_TYPE >::type
 $groupname( $LEVEL2 ) {
- return $groupname_impl< typename bindings::value_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, optimal_workspace() );
+ return $groupname_impl< typename $NAMESPACEvalue_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, optimal_workspace() );
 }
 $TEMPLATE[setup_min_workspace]
- bindings::detail::array< $WORKSPACE_TYPE > tmp_$NAME( min_size_$NAME( $CALL_MIN_SIZE ) );
+ $NAMESPACEdetail::array< $WORKSPACE_TYPE > tmp_$WORKSPACE_FUNC( min_size_$WORKSPACE_FUNC( $CALL_MIN_SIZE ) );
 $TEMPLATE[setup_opt_workspace]
- bindings::detail::array< $WORKSPACE_TYPE > tmp_$NAME( $TMP_SIZE );
+ $NAMESPACEdetail::array< $WORKSPACE_TYPE > tmp_$WORKSPACE_FUNC( $TMP_SIZE );
 $TEMPLATE[min_size_func]
     //
     // Static member function that returns the minimum size of
- // workspace-array $NAME.
+ // workspace-array $WORKSPACE_FUNC.
     //
- static $INTEGER_TYPE min_size_$NAME( $ARGUMENTS ) {
+ static $INTEGER_TYPE min_size_$WORKSPACE_FUNC( $ARGUMENTS ) {
         $MIN_SIZE
     }
 
@@ -270,6 +270,6 @@
 //
 template< $TYPES >
 inline $INTEGER_TYPE $groupname( $LEVEL2 ) {
- return $groupname_impl< typename bindings::value_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
+ return $groupname_impl< typename $NAMESPACEvalue_type< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
 }
 $TEMPLATE[end]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk