Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63070 - in sandbox/numeric_bindings/libs/numeric/bindings: doc/lapack doc/lapack/driver tools tools/templates tools/templates/driver
From: thomas.klimpel_at_[hidden]
Date: 2010-06-17 20:00:48


Author: klimpel
Date: 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
New Revision: 63070
URL: http://svn.boost.org/trac/boost/changeset/63070

Log:
improved code generation for dsgesv, dsposv, zcgesv and zcposv (swork still has the wrong precision type, so it's not yet functional)
Added:
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_gesv.qbk (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_posv.qbk (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/iter_sv.hpp (contents, props changed)
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_grouping.hpp (contents, props changed)
Removed:
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cgesv.qbk
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cposv.qbk
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sgesv.qbk
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sposv.qbk
   sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp
Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver.qbk | 6 ++----
   sandbox/numeric_bindings/libs/numeric/bindings/tools/blas_generator.py | 4 ++--
   sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py | 30 ++++++++++++++++++------------
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 13 ++++++++++++-
   4 files changed, 34 insertions(+), 19 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -32,8 +32,6 @@
 [include driver/sygvx.qbk]
 [include driver/ggglm.qbk]
 [include driver/gglse.qbk]
-[include driver/cgesv.qbk]
-[include driver/cposv.qbk]
 [include driver/gbsv.qbk]
 [include driver/gbsvx.qbk]
 [include driver/gejsv.qbk]
@@ -45,6 +43,8 @@
 [include driver/hesvx.qbk]
 [include driver/hpsv.qbk]
 [include driver/hpsvx.qbk]
+[include driver/iter_gesv.qbk]
+[include driver/iter_posv.qbk]
 [include driver/pbsv.qbk]
 [include driver/pbsvx.qbk]
 [include driver/posv.qbk]
@@ -53,8 +53,6 @@
 [include driver/ppsvx.qbk]
 [include driver/ptsv.qbk]
 [include driver/ptsvx.qbk]
-[include driver/sgesv.qbk]
-[include driver/sposv.qbk]
 [include driver/spsv.qbk]
 [include driver/spsvx.qbk]
 [include driver/sysv.qbk]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cgesv.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cgesv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
+++ (empty file)
@@ -1,110 +0,0 @@
-[/
-
-THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
-
-]
-
-[section cgesv]
-
-[heading Prototype]
-There is one prototype of `cgesv` available, please see below.
-``
-cgesv( MatrixA& a, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
- int_t& iter );
-``
-
-
-[heading Description]
-
-`cgesv` (short for $FRIENDLY_NAME) provides a C++
-interface to LAPACK routines ZCGESV.
-`cgesv` computes the solution to a complex system of linear equations
-A * X = B,
-where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-
-`cgesv` first attempts to factorize the matrix in COMPLEX and use this
-factorization within an iterative refinement procedure to produce a
-solution with COMPLEX*16 normwise backward error quality (see below).
-If the approach fails the method switches to a COMPLEX*16
-factorization and solve.
-
-The iterative refinement is not going to be a winning strategy if
-the ratio COMPLEX performance over COMPLEX*16 performance is too
-small. A reasonable strategy should take the number of right-hand
-sides and the size of the matrix into account. This might be done
-with a call to ILAENV in the future. Up to now, we always try
-iterative refinement.
-
-The iterative refinement process is stopped if
-ITER > ITERMAX
-or for all the RHS we have:
-RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-where
-o ITER is the number of the current iteration in the iterative
-refinement process
-o RNRM is the infinity-norm of the residual
-o XNRM is the infinity-norm of the solution
-o ANRM is the infinity-operator-norm of the matrix A
-o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-respectively.
-
-The selection of the LAPACK routine is done during compile-time,
-and is determined by the type of values contained in type `MatrixA`.
-The type of values is obtained through the `value_type` meta-function
- `typename value_type<MatrixA>::type`.
-The dispatching table below illustrates to which specific routine
-the code path will be generated.
-
-[table Dispatching of cgesv
-[ [ Value type of MatrixA ] [LAPACK routine] ]
-[ [`complex<double>`][ZCGESV] ]
-
-]
-
-
-[heading Definition]
-Defined in header [headerref boost/numeric/bindings/lapack/cgesv.hpp].
-
-
-[heading Parameters or Requirements on Types]
-
-[variablelist Parameters
- [[MatrixA] [The definition of term 1]]
- [[MatrixB] [The definition of term 2]]
- [[MatrixC] [
- The definition of term 3.
-
- Definitions may contain paragraphs.
- ]]
-]
-
-
-[heading Complexity]
-
-
-[heading Example]
-``
-#include <boost/numeric/bindings/lapack/cgesv.hpp>
-using namespace boost::numeric::bindings;
-
-lapack::cgesv( x, y, z );
-
-``
-
-this will output
-
-``
-[5] 0 1 2 3 4 5
-``
-
-
-
-[heading Notes]
-
-
-[heading See Also]
-
-* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/zcgesv.f.html zcgesv.f] at Netlib.
-
-[endsect]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cposv.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/cposv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
+++ (empty file)
@@ -1,111 +0,0 @@
-[/
-
-THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
-
-]
-
-[section cposv]
-
-[heading Prototype]
-There is one prototype of `cposv` available, please see below.
-``
-cposv( MatrixA& a, const MatrixB& b, MatrixX& x,
- int_t& iter );
-``
-
-
-[heading Description]
-
-`cposv` (short for $FRIENDLY_NAME) provides a C++
-interface to LAPACK routines ZCPOSV.
-`cposv` computes the solution to a complex system of linear equations
-A * X = B,
-where A is an N-by-N Hermitian positive definite matrix and X and B
-are N-by-NRHS matrices.
-
-`cposv` first attempts to factorize the matrix in COMPLEX and use this
-factorization within an iterative refinement procedure to produce a
-solution with COMPLEX*16 normwise backward error quality (see below).
-If the approach fails the method switches to a COMPLEX*16
-factorization and solve.
-
-The iterative refinement is not going to be a winning strategy if
-the ratio COMPLEX performance over COMPLEX*16 performance is too
-small. A reasonable strategy should take the number of right-hand
-sides and the size of the matrix into account. This might be done
-with a call to ILAENV in the future. Up to now, we always try
-iterative refinement.
-
-The iterative refinement process is stopped if
-ITER > ITERMAX
-or for all the RHS we have:
-RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-where
-o ITER is the number of the current iteration in the iterative
-refinement process
-o RNRM is the infinity-norm of the residual
-o XNRM is the infinity-norm of the solution
-o ANRM is the infinity-operator-norm of the matrix A
-o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-respectively.
-
-The selection of the LAPACK routine is done during compile-time,
-and is determined by the type of values contained in type `MatrixA`.
-The type of values is obtained through the `value_type` meta-function
- `typename value_type<MatrixA>::type`.
-The dispatching table below illustrates to which specific routine
-the code path will be generated.
-
-[table Dispatching of cposv
-[ [ Value type of MatrixA ] [LAPACK routine] ]
-[ [`complex<double>`][ZCPOSV] ]
-
-]
-
-
-[heading Definition]
-Defined in header [headerref boost/numeric/bindings/lapack/cposv.hpp].
-
-
-[heading Parameters or Requirements on Types]
-
-[variablelist Parameters
- [[MatrixA] [The definition of term 1]]
- [[MatrixB] [The definition of term 2]]
- [[MatrixC] [
- The definition of term 3.
-
- Definitions may contain paragraphs.
- ]]
-]
-
-
-[heading Complexity]
-
-
-[heading Example]
-``
-#include <boost/numeric/bindings/lapack/cposv.hpp>
-using namespace boost::numeric::bindings;
-
-lapack::cposv( x, y, z );
-
-``
-
-this will output
-
-``
-[5] 0 1 2 3 4 5
-``
-
-
-
-[heading Notes]
-
-
-[heading See Also]
-
-* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/zcposv.f.html zcposv.f] at Netlib.
-
-[endsect]

Added: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_gesv.qbk
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_gesv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -0,0 +1,111 @@
+[/
+
+THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
+
+]
+
+[section iter_gesv]
+
+[heading Prototype]
+There is one prototype of `iter_gesv` available, please see below.
+``
+iter_gesv( MatrixA& a, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
+ int_t& iter );
+``
+
+
+[heading Description]
+
+`iter_gesv` (short for $FRIENDLY_NAME) provides a C++
+interface to LAPACK routines DSGESV and ZCGESV.
+`iter_gesv` computes the solution to a complex system of linear equations
+A * X = B,
+where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+
+`iter_gesv` first attempts to factorize the matrix in COMPLEX and use this
+factorization within an iterative refinement procedure to produce a
+solution with COMPLEX*16 normwise backward error quality (see below).
+If the approach fails the method switches to a COMPLEX*16
+factorization and solve.
+
+The iterative refinement is not going to be a winning strategy if
+the ratio COMPLEX performance over COMPLEX*16 performance is too
+small. A reasonable strategy should take the number of right-hand
+sides and the size of the matrix into account. This might be done
+with a call to ILAENV in the future. Up to now, we always try
+iterative refinement.
+
+The iterative refinement process is stopped if
+ITER > ITERMAX
+or for all the RHS we have:
+RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+where
+o ITER is the number of the current iteration in the iterative
+refinement process
+o RNRM is the infinity-norm of the residual
+o XNRM is the infinity-norm of the solution
+o ANRM is the infinity-operator-norm of the matrix A
+o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+respectively.
+
+The selection of the LAPACK routine is done during compile-time,
+and is determined by the type of values contained in type `MatrixA`.
+The type of values is obtained through the `value_type` meta-function
+ `typename value_type<MatrixA>::type`.
+The dispatching table below illustrates to which specific routine
+the code path will be generated.
+
+[table Dispatching of iter_gesv
+[ [ Value type of MatrixA ] [LAPACK routine] ]
+[ [`double`][DSGESV] ]
+[ [`complex<double>`][ZCGESV] ]
+
+]
+
+
+[heading Definition]
+Defined in header [headerref boost/numeric/bindings/lapack/driver/iter_gesv.hpp].
+
+
+[heading Parameters or Requirements on Types]
+
+[variablelist Parameters
+ [[MatrixA] [The definition of term 1]]
+ [[MatrixB] [The definition of term 2]]
+ [[MatrixC] [
+ The definition of term 3.
+
+ Definitions may contain paragraphs.
+ ]]
+]
+
+
+[heading Complexity]
+
+
+[heading Example]
+``
+#include <boost/numeric/bindings/lapack/driver/iter_gesv.hpp>
+using namespace boost::numeric::bindings;
+
+lapack::iter_gesv( x, y, z );
+
+``
+
+this will output
+
+``
+[5] 0 1 2 3 4 5
+``
+
+
+
+[heading Notes]
+
+
+[heading See Also]
+
+* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/dsgesv.f.html dsgesv.f] and [@http://www.netlib.org/lapack/explore-html/zcgesv.f.html zcgesv.f] at Netlib.
+
+[endsect]

Added: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_posv.qbk
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/iter_posv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -0,0 +1,112 @@
+[/
+
+THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
+
+]
+
+[section iter_posv]
+
+[heading Prototype]
+There is one prototype of `iter_posv` available, please see below.
+``
+iter_posv( MatrixA& a, const MatrixB& b, MatrixX& x,
+ int_t& iter );
+``
+
+
+[heading Description]
+
+`iter_posv` (short for $FRIENDLY_NAME) provides a C++
+interface to LAPACK routines DSPOSV and ZCPOSV.
+`iter_posv` computes the solution to a complex system of linear equations
+A * X = B,
+where A is an N-by-N Hermitian positive definite matrix and X and B
+are N-by-NRHS matrices.
+
+`iter_posv` first attempts to factorize the matrix in COMPLEX and use this
+factorization within an iterative refinement procedure to produce a
+solution with COMPLEX*16 normwise backward error quality (see below).
+If the approach fails the method switches to a COMPLEX*16
+factorization and solve.
+
+The iterative refinement is not going to be a winning strategy if
+the ratio COMPLEX performance over COMPLEX*16 performance is too
+small. A reasonable strategy should take the number of right-hand
+sides and the size of the matrix into account. This might be done
+with a call to ILAENV in the future. Up to now, we always try
+iterative refinement.
+
+The iterative refinement process is stopped if
+ITER > ITERMAX
+or for all the RHS we have:
+RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
+where
+o ITER is the number of the current iteration in the iterative
+refinement process
+o RNRM is the infinity-norm of the residual
+o XNRM is the infinity-norm of the solution
+o ANRM is the infinity-operator-norm of the matrix A
+o EPS is the machine epsilon returned by DLAMCH('Epsilon')
+The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
+respectively.
+
+The selection of the LAPACK routine is done during compile-time,
+and is determined by the type of values contained in type `MatrixA`.
+The type of values is obtained through the `value_type` meta-function
+ `typename value_type<MatrixA>::type`.
+The dispatching table below illustrates to which specific routine
+the code path will be generated.
+
+[table Dispatching of iter_posv
+[ [ Value type of MatrixA ] [LAPACK routine] ]
+[ [`double`][DSPOSV] ]
+[ [`complex<double>`][ZCPOSV] ]
+
+]
+
+
+[heading Definition]
+Defined in header [headerref boost/numeric/bindings/lapack/driver/iter_posv.hpp].
+
+
+[heading Parameters or Requirements on Types]
+
+[variablelist Parameters
+ [[MatrixA] [The definition of term 1]]
+ [[MatrixB] [The definition of term 2]]
+ [[MatrixC] [
+ The definition of term 3.
+
+ Definitions may contain paragraphs.
+ ]]
+]
+
+
+[heading Complexity]
+
+
+[heading Example]
+``
+#include <boost/numeric/bindings/lapack/driver/iter_posv.hpp>
+using namespace boost::numeric::bindings;
+
+lapack::iter_posv( x, y, z );
+
+``
+
+this will output
+
+``
+[5] 0 1 2 3 4 5
+``
+
+
+
+[heading Notes]
+
+
+[heading See Also]
+
+* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/dsposv.f.html dsposv.f] and [@http://www.netlib.org/lapack/explore-html/zcposv.f.html zcposv.f] at Netlib.
+
+[endsect]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sgesv.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sgesv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
+++ (empty file)
@@ -1,110 +0,0 @@
-[/
-
-THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
-
-]
-
-[section sgesv]
-
-[heading Prototype]
-There is one prototype of `sgesv` available, please see below.
-``
-sgesv( MatrixA& a, VectorIPIV& ipiv, const MatrixB& b, MatrixX& x,
- int_t& iter );
-``
-
-
-[heading Description]
-
-`sgesv` (short for $FRIENDLY_NAME) provides a C++
-interface to LAPACK routines DSGESV.
-`sgesv` computes the solution to a real system of linear equations
-A * X = B,
-where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-
-`sgesv` first attempts to factorize the matrix in SINGLE PRECISION
-and use this factorization within an iterative refinement procedure
-to produce a solution with DOUBLE PRECISION normwise backward error
-quality (see below). If the approach fails the method switches to a
-DOUBLE PRECISION factorization and solve.
-
-The iterative refinement is not going to be a winning strategy if
-the ratio SINGLE PRECISION performance over DOUBLE PRECISION
-performance is too small. A reasonable strategy should take the
-number of right-hand sides and the size of the matrix into account.
-This might be done with a call to ILAENV in the future. Up to now, we
-always try iterative refinement.
-
-The iterative refinement process is stopped if
-ITER > ITERMAX
-or for all the RHS we have:
-RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-where
-o ITER is the number of the current iteration in the iterative
-refinement process
-o RNRM is the infinity-norm of the residual
-o XNRM is the infinity-norm of the solution
-o ANRM is the infinity-operator-norm of the matrix A
-o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-respectively.
-
-The selection of the LAPACK routine is done during compile-time,
-and is determined by the type of values contained in type `MatrixA`.
-The type of values is obtained through the `value_type` meta-function
- `typename value_type<MatrixA>::type`.
-The dispatching table below illustrates to which specific routine
-the code path will be generated.
-
-[table Dispatching of sgesv
-[ [ Value type of MatrixA ] [LAPACK routine] ]
-[ [`double`][DSGESV] ]
-
-]
-
-
-[heading Definition]
-Defined in header [headerref boost/numeric/bindings/lapack/sgesv.hpp].
-
-
-[heading Parameters or Requirements on Types]
-
-[variablelist Parameters
- [[MatrixA] [The definition of term 1]]
- [[MatrixB] [The definition of term 2]]
- [[MatrixC] [
- The definition of term 3.
-
- Definitions may contain paragraphs.
- ]]
-]
-
-
-[heading Complexity]
-
-
-[heading Example]
-``
-#include <boost/numeric/bindings/lapack/sgesv.hpp>
-using namespace boost::numeric::bindings;
-
-lapack::sgesv( x, y, z );
-
-``
-
-this will output
-
-``
-[5] 0 1 2 3 4 5
-``
-
-
-
-[heading Notes]
-
-
-[heading See Also]
-
-* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/dsgesv.f.html dsgesv.f] at Netlib.
-
-[endsect]

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sposv.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sposv.qbk 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
+++ (empty file)
@@ -1,111 +0,0 @@
-[/
-
-THIS FILE IS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT!
-
-]
-
-[section sposv]
-
-[heading Prototype]
-There is one prototype of `sposv` available, please see below.
-``
-sposv( MatrixA& a, const MatrixB& b, MatrixX& x,
- int_t& iter );
-``
-
-
-[heading Description]
-
-`sposv` (short for $FRIENDLY_NAME) provides a C++
-interface to LAPACK routines DSPOSV.
-`sposv` computes the solution to a real system of linear equations
-A * X = B,
-where A is an N-by-N symmetric positive definite matrix and X and B
-are N-by-NRHS matrices.
-
-`sposv` first attempts to factorize the matrix in SINGLE PRECISION
-and use this factorization within an iterative refinement procedure
-to produce a solution with DOUBLE PRECISION normwise backward error
-quality (see below). If the approach fails the method switches to a
-DOUBLE PRECISION factorization and solve.
-
-The iterative refinement is not going to be a winning strategy if
-the ratio SINGLE PRECISION performance over DOUBLE PRECISION
-performance is too small. A reasonable strategy should take the
-number of right-hand sides and the size of the matrix into account.
-This might be done with a call to ILAENV in the future. Up to now, we
-always try iterative refinement.
-
-The iterative refinement process is stopped if
-ITER > ITERMAX
-or for all the RHS we have:
-RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
-where
-o ITER is the number of the current iteration in the iterative
-refinement process
-o RNRM is the infinity-norm of the residual
-o XNRM is the infinity-norm of the solution
-o ANRM is the infinity-operator-norm of the matrix A
-o EPS is the machine epsilon returned by DLAMCH('Epsilon')
-The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00
-respectively.
-
-The selection of the LAPACK routine is done during compile-time,
-and is determined by the type of values contained in type `MatrixA`.
-The type of values is obtained through the `value_type` meta-function
- `typename value_type<MatrixA>::type`.
-The dispatching table below illustrates to which specific routine
-the code path will be generated.
-
-[table Dispatching of sposv
-[ [ Value type of MatrixA ] [LAPACK routine] ]
-[ [`double`][DSPOSV] ]
-
-]
-
-
-[heading Definition]
-Defined in header [headerref boost/numeric/bindings/lapack/sposv.hpp].
-
-
-[heading Parameters or Requirements on Types]
-
-[variablelist Parameters
- [[MatrixA] [The definition of term 1]]
- [[MatrixB] [The definition of term 2]]
- [[MatrixC] [
- The definition of term 3.
-
- Definitions may contain paragraphs.
- ]]
-]
-
-
-[heading Complexity]
-
-
-[heading Example]
-``
-#include <boost/numeric/bindings/lapack/sposv.hpp>
-using namespace boost::numeric::bindings;
-
-lapack::sposv( x, y, z );
-
-``
-
-this will output
-
-``
-[5] 0 1 2 3 4 5
-``
-
-
-
-[heading Notes]
-
-
-[heading See Also]
-
-* Originating Fortran source files [@http://www.netlib.org/lapack/explore-html/dsposv.f.html dsposv.f] at Netlib.
-
-[endsect]

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-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -21,7 +21,7 @@
 # Sort these subroutines based on
 # subroutine_less in the bindings file.
 #
-def group_by_value_type( global_info_map, template_map ):
+def group_by_value_type( global_info_map ):
   group_map = {}
   for subroutine_name in global_info_map.keys():
     subroutine_group_name = global_info_map[ subroutine_name ][ 'group_name' ]
@@ -530,7 +530,7 @@
 print "Grouping subroutines..."
 
 value_type_groups = {}
-value_type_groups = group_by_value_type( function_info_map, templates )
+value_type_groups = group_by_value_type( function_info_map )
 
 routines = {}
 routines[ 'level1' ] = {}

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/lapack_generator.py 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -19,24 +19,30 @@
 
 
 #
-# Group subroutines on their name, with the first character removed. This will
-# group them in the same .hpp file as well. Sort these subroutines based on
-# routine_cmp above.
+# Group subroutines on their value and precision types.
+# Sort these subroutines based on
+# subroutine_less in the bindings file.
 #
 def group_by_value_type( global_info_map ):
   group_map = {}
- for i in global_info_map.keys():
- short_name = i[ 1: ]
- if not group_map.has_key( short_name ):
- group_map[ short_name ] = []
- group_map[ short_name ] += [ i ]
- for value in group_map.values():
- value.sort( bindings.routine_cmp )
+ for subroutine_name in global_info_map.keys():
+ subroutine_group_name = global_info_map[ subroutine_name ][ 'group_name' ]
+ if not group_map.has_key( subroutine_group_name ):
+ group_map[ subroutine_group_name ] = []
+ group_map[ subroutine_group_name ].append( subroutine_name )
+ else:
+ insert_at = 0
+ for i in range( 0, len(group_map[ subroutine_group_name ]) ):
+ if bindings.subroutine_less( subroutine_name,
+ group_map[ subroutine_group_name ][ i ],
+ global_info_map ):
+ insert_at = i+1
+ group_map[ subroutine_group_name ].insert( insert_at, subroutine_name )
+
   return group_map
-
 
 
-
+
 def indent_lines( source_text, indent_size = 8 ):
   indent_string = '\n'
   for i in range(indent_size):

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-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -995,7 +995,18 @@
           argument_map[ argument_name ] = {}
           argument_map[ argument_name ][ 'value_type' ] = match_argument_declaration.group( 1 )
           argument_map[ argument_name ][ 'value_type_variant' ] = global_type_variant_map[ argument_map[ argument_name ][ 'value_type' ] ]
- if len(argument_description) == 1:
+
+ # See if the type of the argument (scalar, vector, matrix) gets overridden by the templating system
+ type_key = subroutine_group_name.lower() + '.' + subroutine_value_type + '.' + \
+ argument_name + '.type'
+ if my_has_key( type_key, template_map ):
+ data = template_map[ my_has_key( type_key, template_map ) ].split(",")
+ argument_map[ argument_name ][ 'type' ] = data[0].strip()
+ if len(data)==2 and data[0].strip() == 'matrix':
+ argument_map[ argument_name ][ 'leading_dimension' ] = data[1].strip()
+
+ # if the type was not overridden, proceed with parsing the type
+ elif len(argument_description) == 1:
             argument_map[ argument_name ][ 'type' ] = 'scalar'
           else:
             if argument_description[1].find( "," ) == -1:

Deleted: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/cgesv.hpp 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
+++ (empty file)
@@ -1,7 +0,0 @@
-$TEMPLATE[cgesv.complex.WORK.type]
-vector
-$TEMPLATE[cgesv.complex.min_size_work.args]
-N, NRHS
-$TEMPLATE[cgesv.complex.min_size_work]
-return n*nrhs;
-$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/iter_sv.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/iter_sv.hpp 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -0,0 +1,6 @@
+$TEMPLATE[iter_gesv.all.WORK.type]
+vector
+$TEMPLATE[end]
+$TEMPLATE[iter_posv.all.WORK.type]
+vector
+$TEMPLATE[end]

Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_grouping.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_grouping.hpp 2010-06-17 20:00:46 EDT (Thu, 17 Jun 2010)
@@ -0,0 +1,9 @@
+$TEMPLATE[lapack.group.DSGESV]
+ITER_GESV
+$TEMPLATE[lapack.group.ZCGESV]
+ITER_GESV
+$TEMPLATE[lapack.group.DSPOSV]
+ITER_POSV
+$TEMPLATE[lapack.group.ZCPOSV]
+ITER_POSV
+$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