|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59085 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates
From: rutger_at_[hidden]
Date: 2010-01-17 03:55:09
Author: rutger
Date: 2010-01-17 03:55:08 EST (Sun, 17 Jan 2010)
New Revision: 59085
URL: http://svn.boost.org/trac/boost/changeset/59085
Log:
generator support for iamax
Text files modified:
sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 3 ++-
sandbox/numeric_bindings/libs/numeric/bindings/tools/cblas.py | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/cublas.py | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/documentation.py | 4 +++-
sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas_grouping.hpp | 24 ++++++++++++++++++++++++
6 files changed, 32 insertions(+), 5 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-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -503,7 +503,8 @@
function_info_map = {}
for lapack_file in os.listdir( lapack_src_path ):
- right_file = re.compile( '^[cdsz].+\.f$' )
+ # right file includes i for iamax
+ right_file = re.compile( '^[cdszi].+\.f$' )
if right_file.match( lapack_file ) != None and lapack_file not in skip_blas_files:
print "Parsing", lapack_file, "..."
key, value = netlib.parse_file( os.path.join( lapack_src_path, lapack_file ), templates )
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/cblas.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/cblas.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/cblas.py 2010-01-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -28,7 +28,7 @@
pp = pprint.PrettyPrinter( indent = 2 )
source = open( filename ).read()
- for match in re.compile( '(void|float|int|double) +' + prefix + '([^\(]+)\(([^\)]+)\)', re.M | re.S ).findall( source ):
+ for match in re.compile( '(void|float|int|double|CBLAS_INDEX) +' + prefix + '([^\(]+)\(([^\)]+)\)', re.M | re.S ).findall( source ):
print "----"
return_type = match[0]
fortran_routine = match[1].split("_sub")[0].upper().strip()
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/cublas.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/cublas.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/cublas.py 2010-01-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -18,7 +18,7 @@
pp = pprint.PrettyPrinter( indent = 2 )
source = open( filename ).read()
- for match in re.compile( '^(cuComplex|cuDoubleComplex|float|double|void) ?CUBLASAPI ?cublas([SDCZ][a-z0-9]+) ?\(([^\)]+)\)', re.M | re.S ).findall( source ):
+ for match in re.compile( '^(cuComplex|cuDoubleComplex|float|double|void|int) ?CUBLASAPI ?cublas([SDCZI][a-z0-9]+) ?\(([^\)]+)\)', re.M | re.S ).findall( source ):
print "----"
return_type = match[0]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/documentation.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/documentation.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/documentation.py 2010-01-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -107,7 +107,9 @@
cublas_routine = 'Unavailable'
result += "[ "
- result += "[`" + routine_value_type[ subroutine[0] ] + "`]"
+ result += "[`" + subroutine_value_type[ ",".join( [
+ info_map[ subroutine ][ 'value_type' ],
+ info_map[ subroutine ][ 'precision' ] ] ) ] + "`]"
result += "[" + subroutine + "]"
result += "[" + cblas_routine + "]"
result += "[" + cublas_routine + "]"
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-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -906,7 +906,7 @@
code_line_nr = 0
while code_line_nr < len(code) and not subroutine_found:
- match_subroutine_name = re.compile( '(DOUBLE\s+COMPLEX\s+FUNCTION|COMPLEX\s+FUNCTION|DOUBLE\s+PRECISION\s+FUNCTION|REAL\s+FUNCTION|SUBROUTINE)[\s]+([A-Z0-9]+)\(([^\)]+)' ).search( code[ code_line_nr ] )
+ match_subroutine_name = re.compile( '(INTEGER\s+FUNCTION|DOUBLE\s+COMPLEX\s+FUNCTION|COMPLEX\s+FUNCTION|DOUBLE\s+PRECISION\s+FUNCTION|REAL\s+FUNCTION|SUBROUTINE)[\s]+([A-Z0-9]+)\(([^\)]+)' ).search( code[ code_line_nr ] )
if match_subroutine_name != None:
subroutine_found = True
subroutine_name = match_subroutine_name.group( 2 )
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas_grouping.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas_grouping.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas_grouping.hpp 2010-01-17 03:55:08 EST (Sun, 17 Jan 2010)
@@ -38,4 +38,28 @@
SCAL
$TEMPLATE[blas.value.CSSCAL]
complex+real
+$TEMPLATE[blas.group.ISAMAX]
+IAMAX
+$TEMPLATE[blas.value.ISAMAX]
+real
+$TEMPLATE[blas.precision.ISAMAX]
+single
+$TEMPLATE[blas.group.IDAMAX]
+IAMAX
+$TEMPLATE[blas.value.IDAMAX]
+real
+$TEMPLATE[blas.precision.IDAMAX]
+double
+$TEMPLATE[blas.group.ICAMAX]
+IAMAX
+$TEMPLATE[blas.value.ICAMAX]
+complex
+$TEMPLATE[blas.precision.ICAMAX]
+single
+$TEMPLATE[blas.group.IZAMAX]
+IAMAX
+$TEMPLATE[blas.value.IZAMAX]
+complex
+$TEMPLATE[blas.precision.IZAMAX]
+double
$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