|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64403 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/driver libs/numeric/bindings/doc/lapack/driver libs/numeric/bindings/tools/templates/driver
From: thomas.klimpel_at_[hidden]
Date: 2010-07-27 20:58:47
Author: klimpel
Date: 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
New Revision: 64403
URL: http://svn.boost.org/trac/boost/changeset/64403
Log:
The mistake in the documentation of ssbevd.f is now overridden by the corresponding template. Just use LIWORK.trait=size,IWORK (LIWORK.trait_of=IWORK is not enough, as should have been obvious...)
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp | 142 +--------------------------------------
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp | 56 ++++++---------
sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/hbevd.qbk | 7 -
sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sbevd.qbk | 3
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sbevd.hpp | 2
5 files changed, 33 insertions(+), 177 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/hbevd.hpp 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
@@ -149,8 +149,7 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ,
typename WORK, typename IWORK >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, detail::workspace2<
- WORK, IWORK > work ) {
+ MatrixZ& z, detail::workspace2< WORK, IWORK > work ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
@@ -186,7 +185,7 @@
bindings::begin_value(work.select(real_type())),
bindings::size(work.select(real_type())),
bindings::begin_value(work.select(fortran_int_t())),
- liwork );
+ bindings::size(work.select(fortran_int_t())) );
}
//
@@ -198,15 +197,14 @@
//
template< typename MatrixAB, typename VectorW, typename MatrixZ >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, minimal_workspace ) {
+ MatrixZ& z, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
bindings::detail::array< real_type > tmp_work( min_size_work( jobz,
bindings::size_column(ab) ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
min_size_iwork( jobz, bindings::size_column(ab) ) );
- return invoke( jobz, ab, w, z, liwork, workspace( tmp_work,
- tmp_iwork ) );
+ return invoke( jobz, ab, w, z, workspace( tmp_work, tmp_iwork ) );
}
//
@@ -218,7 +216,7 @@
//
template< typename MatrixAB, typename VectorW, typename MatrixZ >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, optimal_workspace ) {
+ MatrixZ& z, optimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
real_type opt_size_work;
@@ -232,8 +230,7 @@
traits::detail::to_int( opt_size_work ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
opt_size_iwork );
- return invoke( jobz, ab, w, z, liwork, workspace( tmp_work,
- tmp_iwork ) );
+ return invoke( jobz, ab, w, z, workspace( tmp_work, tmp_iwork ) );
}
//
@@ -439,133 +436,6 @@
inline typename boost::enable_if< detail::is_workspace< Workspace >,
std::ptrdiff_t >::type
hbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * MatrixAB&
-// * MatrixZ&
-// * Default workspace-type (optimal)
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ >
-inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * const MatrixAB&
-// * MatrixZ&
-// * User-defined workspace
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ,
- typename Workspace >
-inline typename boost::enable_if< detail::is_workspace< Workspace >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, const MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * const MatrixAB&
-// * MatrixZ&
-// * Default workspace-type (optimal)
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ >
-inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, const MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * MatrixAB&
-// * const MatrixZ&
-// * User-defined workspace
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ,
- typename Workspace >
-inline typename boost::enable_if< detail::is_workspace< Workspace >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * MatrixAB&
-// * const MatrixZ&
-// * Default workspace-type (optimal)
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ >
-inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * const MatrixAB&
-// * const MatrixZ&
-// * User-defined workspace
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ,
- typename Workspace >
-inline typename boost::enable_if< detail::is_workspace< Workspace >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, const MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
-}
-
-//
-// Overloaded function for hbevd. Its overload differs for
-// * const MatrixAB&
-// * const MatrixZ&
-// * Default workspace-type (optimal)
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ >
-inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, const MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork ) {
- return hbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
-}
-//
-// Overloaded function for hbevd. Its overload differs for
-// * MatrixAB&
-// * MatrixZ&
-// * User-defined workspace
-//
-template< typename MatrixAB, typename VectorW, typename MatrixZ,
- typename Workspace >
-inline typename boost::enable_if< detail::is_workspace< Workspace >,
- std::ptrdiff_t >::type
-hbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
Workspace work ) {
return hbevd_impl< typename bindings::value_type<
MatrixAB >::type >::invoke( jobz, ab, w, z, work );
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/sbevd.hpp 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
@@ -102,8 +102,7 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ,
typename WORK, typename IWORK >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, detail::workspace2<
- WORK, IWORK > work ) {
+ MatrixZ& z, detail::workspace2< WORK, IWORK > work ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );
@@ -139,7 +138,7 @@
bindings::begin_value(work.select(real_type())),
bindings::size(work.select(real_type())),
bindings::begin_value(work.select(fortran_int_t())),
- liwork );
+ bindings::size(work.select(fortran_int_t())) );
}
//
@@ -151,15 +150,14 @@
//
template< typename MatrixAB, typename VectorW, typename MatrixZ >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, minimal_workspace ) {
+ MatrixZ& z, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
bindings::detail::array< real_type > tmp_work( min_size_work( jobz,
bindings::size_column(ab) ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
min_size_iwork( jobz, bindings::size_column(ab) ) );
- return invoke( jobz, ab, w, z, liwork, workspace( tmp_work,
- tmp_iwork ) );
+ return invoke( jobz, ab, w, z, workspace( tmp_work, tmp_iwork ) );
}
//
@@ -171,7 +169,7 @@
//
template< typename MatrixAB, typename VectorW, typename MatrixZ >
static std::ptrdiff_t invoke( const char jobz, MatrixAB& ab, VectorW& w,
- MatrixZ& z, const fortran_int_t liwork, optimal_workspace ) {
+ MatrixZ& z, optimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
typedef typename result_of::uplo_tag< MatrixAB >::type uplo;
real_type opt_size_work;
@@ -185,8 +183,7 @@
traits::detail::to_int( opt_size_work ) );
bindings::detail::array< fortran_int_t > tmp_iwork(
opt_size_iwork );
- return invoke( jobz, ab, w, z, liwork, workspace( tmp_work,
- tmp_iwork ) );
+ return invoke( jobz, ab, w, z, workspace( tmp_work, tmp_iwork ) );
}
//
@@ -239,9 +236,9 @@
inline typename boost::enable_if< detail::is_workspace< Workspace >,
std::ptrdiff_t >::type
sbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
+ Workspace work ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, work );
}
//
@@ -253,11 +250,9 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ >
inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
std::ptrdiff_t >::type
-sbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork ) {
+sbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, optimal_workspace() );
}
//
@@ -271,9 +266,9 @@
inline typename boost::enable_if< detail::is_workspace< Workspace >,
std::ptrdiff_t >::type
sbevd( const char jobz, const MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
+ Workspace work ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, work );
}
//
@@ -285,11 +280,9 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ >
inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
std::ptrdiff_t >::type
-sbevd( const char jobz, const MatrixAB& ab, VectorW& w, MatrixZ& z,
- const fortran_int_t liwork ) {
+sbevd( const char jobz, const MatrixAB& ab, VectorW& w, MatrixZ& z ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, optimal_workspace() );
}
//
@@ -303,9 +296,9 @@
inline typename boost::enable_if< detail::is_workspace< Workspace >,
std::ptrdiff_t >::type
sbevd( const char jobz, MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
+ Workspace work ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, work );
}
//
@@ -317,11 +310,9 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ >
inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
std::ptrdiff_t >::type
-sbevd( const char jobz, MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork ) {
+sbevd( const char jobz, MatrixAB& ab, VectorW& w, const MatrixZ& z ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, optimal_workspace() );
}
//
@@ -335,9 +326,9 @@
inline typename boost::enable_if< detail::is_workspace< Workspace >,
std::ptrdiff_t >::type
sbevd( const char jobz, const MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork, Workspace work ) {
+ Workspace work ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork, work );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, work );
}
//
@@ -349,11 +340,10 @@
template< typename MatrixAB, typename VectorW, typename MatrixZ >
inline typename boost::disable_if< detail::is_workspace< MatrixZ >,
std::ptrdiff_t >::type
-sbevd( const char jobz, const MatrixAB& ab, VectorW& w, const MatrixZ& z,
- const fortran_int_t liwork ) {
+sbevd( const char jobz, const MatrixAB& ab, VectorW& w,
+ const MatrixZ& z ) {
return sbevd_impl< typename bindings::value_type<
- MatrixAB >::type >::invoke( jobz, ab, w, z, liwork,
- optimal_workspace() );
+ MatrixAB >::type >::invoke( jobz, ab, w, z, optimal_workspace() );
}
} // namespace lapack
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/hbevd.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/hbevd.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/hbevd.qbk 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
@@ -7,12 +7,7 @@
[section hbevd]
[heading Prototype]
-There are two prototypes of `hbevd` available, please see below.
-``
-hbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const int_t liwork );
-``
-
+There is one prototype of `hbevd` available, please see below.
``
hbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z );
``
Modified: sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sbevd.qbk
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sbevd.qbk (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/doc/lapack/driver/sbevd.qbk 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
@@ -9,8 +9,7 @@
[heading Prototype]
There is one prototype of `sbevd` available, please see below.
``
-sbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z,
- const int_t liwork );
+sbevd( const char jobz, MatrixAB& ab, VectorW& w, MatrixZ& z );
``
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sbevd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sbevd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/sbevd.hpp 2010-07-27 20:58:45 EDT (Tue, 27 Jul 2010)
@@ -18,4 +18,6 @@
}
$TEMPLATE[sbevd.all.UPLO.trait_of]
AB
+$TEMPLATE[sbevd.all.LIWORK.trait]
+size,IWORK
$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