|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51819 - sandbox/numeric_bindings/libs/numeric/bindings/tools
From: rutger_at_[hidden]
Date: 2009-03-17 13:05:37
Author: rutger
Date: 2009-03-17 13:05:37 EDT (Tue, 17 Mar 2009)
New Revision: 51819
URL: http://svn.boost.org/trac/boost/changeset/51819
Log:
Added support for detection of band matrices for keyword tagging
Text files modified:
sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 19 ++++++++++++++++++-
1 files changed, 18 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 2009-03-17 13:05:37 EDT (Tue, 17 Mar 2009)
@@ -179,10 +179,16 @@
if properties.has_key( 'packed' ):
if name == 'AP':
result = namespace + 'A'
+ if name == 'BP':
+ result = namespace + 'B'
+ if properties.has_key( 'banded' ):
+ if name == 'AB':
+ result = namespace + 'A'
+ if name == 'BB':
+ result = namespace + 'B'
if properties[ 'type' ] == 'vector':
if name == 'IPIV':
result = namespace + 'pivot'
-
return result
@@ -1113,6 +1119,17 @@
argument_properties[ 'type' ] = 'matrix'
argument_properties[ 'packed' ] = True
+ #
+ # Matrix related detection code
+ #
+ if argument_properties[ 'type' ] == 'matrix':
+ #
+ # try to detect whether the matrix in question is a band matrix
+ #
+ banded_keywords = re.compile( '(/s|band|matrix)+', re.M ).findall( comment_block )
+ if 'matrix' in banded_keywords and 'band' in banded_keywords:
+ argument_properties[ 'banded' ] = True
+
#
# Add user-defined arguments to the argument_map
#
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