|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58580 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates
From: rutger_at_[hidden]
Date: 2009-12-30 04:30:57
Author: rutger
Date: 2009-12-30 04:30:56 EST (Wed, 30 Dec 2009)
New Revision: 58580
URL: http://svn.boost.org/trac/boost/changeset/58580
Log:
fixed rotg, sync of blas bindings, lapack main templates
Text files modified:
sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 15 ++++++++++++---
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack.hpp | 14 +++++++-------
2 files changed, 19 insertions(+), 10 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 2009-12-30 04:30:56 EST (Wed, 30 Dec 2009)
@@ -328,8 +328,11 @@
first_typename = level1_type_arg_list[0].split(" ")[-1]
first_typename_datatype = first_typename[0:6].lower() # 'matrix' or 'vector'
else:
- first_typename = 'TODO'
- first_typename_datatype = 'TODO'
+ level1_type_arg_list.insert( 0, 'typename Value' )
+ first_typename = 'Value'
+ first_typename_datatype = 'typename Value'
+
+
level2_template = level2_template.replace( "$FIRST_TYPENAME", first_typename )
level2_template = level2_template.replace( "$TYPEOF_FIRST_TYPENAME", first_typename_datatype )
level2_template = level2_template.replace( "$CALL_LEVEL1", ", ".join( call_level1_arg_list ) )
@@ -337,6 +340,10 @@
level2_template = level2_template.replace( '$RETURN_STATEMENT', info_map[ subroutine ][ 'return_statement' ] )
level2_template = level2_template.replace( ' $STATIC_ASSERTS\n', '' )
+ if first_typename == 'Value':
+ level2_template = level2_template.replace( 'typename value< Value >::type', 'Value' )
+ level2_template = level2_template.replace( 'typename remove_imaginary< Value >::type', 'Value' )
+
level1_map[ value_type ] = bindings.proper_indent( level1_template )
level2_map[ value_type ] = bindings.proper_indent( level2_template )
@@ -382,9 +389,11 @@
result = result.replace( '$DIRNAME', base_dir.split("/")[-1].upper() )
result = result.replace( '$dirname', base_dir.split("/")[-1].lower() )
result = result.replace( '$INTEGER_TYPE', netlib.fortran_integer_type )
+ result = result.replace( 'template< >', '' )
result = result.replace( '\n\n\n', '\n\n' )
result = result.replace( "\n \n", "\n" )
- result = result.replace( "\n \n", "\n" )
+ result = result.replace( '\n \n', '\n' )
+ result = result.replace( '\n \n', '\n' )
# replace the global variables as last (this is convenient)
#result = result.replace( '$INDENT', ' ' )
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 2009-12-30 04:30:56 EST (Wed, 30 Dec 2009)
@@ -163,8 +163,8 @@
// * User-defined workspace
//
template< $TYPES, typename Workspace >
-inline integer_t $groupname( $LEVEL2, Workspace work ) {
- integer_t info(0);
+inline std::ptrdiff_t $groupname( $LEVEL2, Workspace work ) {
+ std::ptrdiff_t info(0);
$groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, work );
return info;
}
@@ -175,8 +175,8 @@
// * Default workspace-type (optimal)
//
template< $TYPES >
-inline integer_t $groupname( $LEVEL2 ) {
- integer_t info(0);
+inline std::ptrdiff_t $groupname( $LEVEL2 ) {
+ std::ptrdiff_t info(0);
$groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1, optimal_workspace() );
return info;
}
@@ -189,7 +189,7 @@
// Static member function that returns the minimum size of
// workspace-array $NAME.
//
- static integer_t min_size_$NAME( $ARGUMENTS ) {
+ static std::ptrdiff_t min_size_$NAME( $ARGUMENTS ) {
$MIN_SIZE
}
@@ -219,8 +219,8 @@
$COMMENTS
//
template< $TYPES >
-inline integer_t $groupname( $LEVEL2 ) {
- integer_t info(0);
+inline std::ptrdiff_t $groupname( $LEVEL2 ) {
+ std::ptrdiff_t info(0);
$groupname_impl< typename value< $FIRST_TYPENAME >::type >::invoke( $CALL_LEVEL1 );
return info;
}
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