Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58937 - sandbox/numeric_bindings/libs/numeric/bindings/tools
From: rutger_at_[hidden]
Date: 2010-01-12 08:08:25


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

Log:
support for detection of bandwidth of upper/lower parts selected by uplo tag

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 10 +++++++++-
   1 files changed, 9 insertions(+), 1 deletions(-)

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-12 08:08:25 EST (Tue, 12 Jan 2010)
@@ -216,6 +216,10 @@
         result = "bandwidth_upper_op(" + properties[ 'trait_of' ][ 0 ].lower() + \
             ", " + arg_map[ properties[ 'trait_of' ][ 0 ] ][ 'ref_trans' ].lower() + "())"
 
+ if properties[ 'trait_type' ] == 'num_super_uplo':
+ result = "bandwidth(" + properties[ 'trait_of' ][ 0 ].lower() + \
+ ", uplo())"
+
     #
     # The number of columns of op( A )
     #
@@ -1178,6 +1182,7 @@
         #
         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 )
+ match_banded_uplo = re.compile( '(number|of|sub|super|diagonals|if|UPLO)', re.M | re.S ).findall( comment_block )
         if len( match_matrix_traits ) == 1:
           print "Matched trait:", match_matrix_traits
           if match_matrix_traits[0][0] == 'order':
@@ -1210,7 +1215,10 @@
               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]
+ if len( match_banded_uplo ) == 0:
+ argument_properties[ 'trait_type' ] = 'num_' + match_matrix_traits[0][0]
+ else:
+ argument_properties[ 'trait_type' ] = 'num_' + match_matrix_traits[0][0] + '_uplo'
                   argument_properties[ 'trait_of' ] = [ try_name.strip() ]
 
         #


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