|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58516 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates/computational
From: rutger_at_[hidden]
Date: 2009-12-23 10:38:34
Author: rutger
Date: 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
New Revision: 58516
URL: http://svn.boost.org/trac/boost/changeset/58516
Log:
lapack_generator back to functional state
Added:
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp (contents, props changed)
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp (contents, props changed)
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp (contents, props changed)
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sfrk.hpp (contents, props changed)
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbtrs.hpp (contents, props changed)
Text files modified:
sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 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-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -433,22 +433,22 @@
def typedef_type( name, properties, arg_map ):
result = None
if 'trait_type' in properties:
- if properties[ 'trait_type' ] == 'trans':
- matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
- arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
- result = 'typedef typename result_of::trans_tag< ' + \
- matrix_type + ', order >::type ' + name.lower() + ';'
- if properties[ 'trait_type' ] == 'uplo':
- matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
- arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
- result = 'typedef typename result_of::data_side< ' + \
- matrix_type + ' >::type ' + name.lower() + ';'
- if properties[ 'trait_type' ] == 'diag':
- matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
- arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
- result = 'typedef typename result_of::diag_tag< ' + \
- matrix_type + ' >::type ' + name.lower() + ';'
-
+ if properties[ 'trait_of' ][ 0 ] in arg_map:
+ if properties[ 'trait_type' ] == 'trans':
+ matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
+ arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
+ result = 'typedef typename result_of::trans_tag< ' + \
+ matrix_type + ', order >::type ' + name.lower() + ';'
+ if properties[ 'trait_type' ] == 'uplo':
+ matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
+ arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
+ result = 'typedef typename result_of::data_side< ' + \
+ matrix_type + ' >::type ' + name.lower() + ';'
+ if properties[ 'trait_type' ] == 'diag':
+ matrix_type = level1_typename( properties[ 'trait_of' ][ 0 ],
+ arg_map[ properties[ 'trait_of' ][ 0 ] ] ).replace( "typename ", "" )
+ result = 'typedef typename result_of::diag_tag< ' + \
+ matrix_type + ' >::type ' + name.lower() + ';'
return result
@@ -1260,13 +1260,16 @@
# Diag character detection
if argument_name[0:4] == 'DIAG':
argument_properties[ 'trait_type' ] = 'diag'
- match_diag = re.compile( ' ([A-Z]+)(\s|is|)+unit\s+triangular', re.M ).findall( comment_block )
+ match_diag = re.compile( ' ([A-Z]+)(\s|is|has)+unit\s+(triangular|diagonal)', re.M ).findall( comment_block )
if len( match_diag ) > 0:
ref_arg = match_diag[ 0 ][ 0 ]
if ref_arg in argument_map:
argument_properties[ 'trait_of' ] = [ ref_arg ]
if ref_arg + 'P' in argument_map:
argument_properties[ 'trait_of' ] = [ ref_arg + 'P' ]
+ if ref_arg + 'B' in argument_map:
+ argument_properties[ 'trait_of' ] = [ ref_arg + 'B' ]
+
# check for existance of trait_of definition in template file(s)
traits_key = subroutine_group_name.lower() + '.' + subroutine_value_type + '.' + argument_name + '.trait_of'
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lanhf.hpp 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -0,0 +1,3 @@
+$TEMPLATE[lanhf.all.UPLO.trait_of]
+A
+$TEMPLATE[end]
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/lantr.hpp 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -0,0 +1,3 @@
+$TEMPLATE[lantr.all.UPLO.trait_of]
+A
+$TEMPLATE[end]
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/laqhe.hpp 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -0,0 +1,3 @@
+$TEMPLATE[laqhe.all.UPLO.trait_of]
+A
+$TEMPLATE[end]
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sfrk.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sfrk.hpp 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -0,0 +1,3 @@
+$TEMPLATE[sfrk.all.UPLO.trait_of]
+A
+$TEMPLATE[end]
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbtrs.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/tbtrs.hpp 2009-12-23 10:38:32 EST (Wed, 23 Dec 2009)
@@ -0,0 +1,3 @@
+$TEMPLATE[tbtrs.all.TRANS.trait_of]
+AB
+$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