Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51717 - in sandbox/numeric_bindings/libs/numeric/bindings/tools: . templates
From: rutger_at_[hidden]
Date: 2009-03-11 16:39:45


Author: rutger
Date: 2009-03-11 16:39:44 EDT (Wed, 11 Mar 2009)
New Revision: 51717
URL: http://svn.boost.org/trac/boost/changeset/51717

Log:
Updated generators for reorganized blas binding structure

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 8 +++++---
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp | 11 +++++------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp | 10 +++++-----
   3 files changed, 15 insertions(+), 14 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-03-11 16:39:44 EDT (Wed, 11 Mar 2009)
@@ -50,7 +50,7 @@
     includes = [
       '#include <boost/numeric/bindings/traits/traits.hpp>',
       '#include <boost/numeric/bindings/traits/type_traits.hpp>',
- '#include <boost/numeric/bindings/blas/blas.h>',
+ '#include <boost/numeric/bindings/blas/detail/blas.h>',
       '#include <boost/type_traits/is_same.hpp>',
       '#include <boost/static_assert.hpp>' ]
       
@@ -220,6 +220,8 @@
     result = result.replace( '$LEVEL2', level2 )
     result = result.replace( '$GROUPNAME', group_name )
     result = result.replace( '$groupname', group_name.lower() )
+ result = result.replace( '$DIRNAME', base_dir.split("/")[-1].upper() )
+ result = result.replace( '$dirname', base_dir.split("/")[-1].lower() )
 
     # replace the global variables as last (this is convenient)
     #result = result.replace( '$INDENT', ' ' )
@@ -327,8 +329,8 @@
 print routines
 
 
-bindings.write_names_header( function_info_map, routines, templates, bindings_target_path + 'blas_names.h' )
-bindings.write_header( function_info_map, routines, templates, bindings_target_path + 'blas.h' )
+bindings.write_names_header( function_info_map, routines, templates, bindings_target_path + 'detail/blas_names.h' )
+bindings.write_header( function_info_map, routines, templates, bindings_target_path + 'detail/blas.h' )
 
 for level, level_properties in routines.iteritems():
   target_path = bindings_target_path + level

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/blas.hpp 2009-03-11 16:39:44 EDT (Wed, 11 Mar 2009)
@@ -12,8 +12,8 @@
 // PLEASE DO NOT EDIT!
 //
 
-#ifndef BOOST_NUMERIC_BINDINGS_BLAS_$GROUPNAME_HPP
-#define BOOST_NUMERIC_BINDINGS_BLAS_$GROUPNAME_HPP
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_$DIRNAME_$GROUPNAME_HPP
+#define BOOST_NUMERIC_BINDINGS_BLAS_$DIRNAME_$GROUPNAME_HPP
 
 $INCLUDES
 
@@ -21,8 +21,7 @@
 namespace numeric {
 namespace bindings {
 namespace blas {
-
-//$DESCRIPTION
+namespace $dirname {
 
 // overloaded functions to call blas
 namespace detail {
@@ -30,7 +29,7 @@
 
 $LEVEL1
 $LEVEL2
-}}}} // namespace boost::numeric::bindings::blas
+}}}}} // namespace boost::numeric::bindings::blas::$dirname
 
 #endif
 $TEMPLATE[blas_overloads]
@@ -53,7 +52,7 @@
     }
 };
 $TEMPLATE[blas_level2]
-// template function to call $groupname
+// low-level template function for direct calls to $dirname::$groupname
 template< $TYPES >
 inline typename $groupname_impl< typename traits::$TYPEOF_FIRST_TYPENAME_traits< $FIRST_TYPENAME >::value_type >::return_type
 $groupname( $LEVEL2 ) {

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/singleton_blas.hpp 2009-03-11 16:39:44 EDT (Wed, 11 Mar 2009)
@@ -12,11 +12,11 @@
 // PLEASE DO NOT EDIT!
 //
 
-#ifndef BOOST_NUMERIC_BINDINGS_BLAS_BLAS_H
-#define BOOST_NUMERIC_BINDINGS_BLAS_BLAS_H
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_H
+#define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_H
 
 #include <boost/numeric/bindings/traits/type.h>
-#include <boost/numeric/bindings/blas/blas_names.h>
+#include <boost/numeric/bindings/blas/detail/blas_names.h>
 
 extern "C" {
 
@@ -40,8 +40,8 @@
 // PLEASE DO NOT EDIT!
 //
 
-#ifndef BOOST_NUMERIC_BINDINGS_BLAS_BLAS_NAMES_H
-#define BOOST_NUMERIC_BINDINGS_BLAS_BLAS_NAMES_H
+#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_NAMES_H
+#define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_BLAS_NAMES_H
 
 #include <boost/numeric/bindings/traits/fortran.h>
 


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