|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64027 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/driver boost/numeric/bindings/traits/detail libs/numeric/bindings/tools/templates libs/numeric/bindings/tools/templates/driver
From: thomas.klimpel_at_[hidden]
Date: 2010-07-14 19:50:06
Author: klimpel
Date: 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
New Revision: 64027
URL: http://svn.boost.org/trac/boost/changeset/64027
Log:
fixed min_size_work formula for gges.hpp.
Since integer_t is obsolete, used fortran_int_t instead.
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp | 4 ++--
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp | 10 +++++-----
sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp | 2 +-
sandbox/numeric_bindings/boost/numeric/bindings/traits/detail/utils.hpp | 14 +++++++-------
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp | 2 +-
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp | 8 ++++----
8 files changed, 22 insertions(+), 22 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gels.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -223,7 +223,7 @@
//
static std::ptrdiff_t min_size_work( const std::ptrdiff_t m,
const std::ptrdiff_t n, const std::ptrdiff_t nrhs ) {
- integer_t minmn = std::min< std::ptrdiff_t >( m, n );
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( m, n );
return std::max< std::ptrdiff_t >( 1, minmn + std::max<
std::ptrdiff_t >( minmn, nrhs ) );
}
@@ -327,7 +327,7 @@
//
static std::ptrdiff_t min_size_work( const std::ptrdiff_t m,
const std::ptrdiff_t n, const std::ptrdiff_t nrhs ) {
- integer_t minmn = std::min< std::ptrdiff_t >( m, n );
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( m, n );
return std::max< std::ptrdiff_t >( 1, minmn + std::max<
std::ptrdiff_t >( minmn, nrhs ) );
}
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gesdd.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -163,7 +163,7 @@
BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorS >::value) );
BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixU >::value) );
BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixVT >::value) );
- integer_t minmn = std::min< std::ptrdiff_t >( size_row(a),
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
BOOST_ASSERT( bindings::size(s) >= std::min<
std::ptrdiff_t >(bindings::size_row(a),
@@ -207,7 +207,7 @@
static std::ptrdiff_t invoke( const char jobz, MatrixA& a, VectorS& s,
MatrixU& u, MatrixVT& vt, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
- integer_t minmn = std::min< std::ptrdiff_t >( size_row(a),
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
bindings::detail::array< real_type > tmp_work( min_size_work(
bindings::size_row(a), bindings::size_column(a), jobz,
@@ -293,7 +293,7 @@
BOOST_STATIC_ASSERT( (bindings::is_mutable< VectorS >::value) );
BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixU >::value) );
BOOST_STATIC_ASSERT( (bindings::is_mutable< MatrixVT >::value) );
- integer_t minmn = std::min< std::ptrdiff_t >( size_row(a),
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
BOOST_ASSERT( bindings::size(s) >= std::min<
std::ptrdiff_t >(bindings::size_row(a),
@@ -340,7 +340,7 @@
static std::ptrdiff_t invoke( const char jobz, MatrixA& a, VectorS& s,
MatrixU& u, MatrixVT& vt, minimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
- integer_t minmn = std::min< std::ptrdiff_t >( size_row(a),
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
bindings::detail::array< value_type > tmp_work( min_size_work(
bindings::size_row(a), bindings::size_column(a), jobz,
@@ -365,7 +365,7 @@
static std::ptrdiff_t invoke( const char jobz, MatrixA& a, VectorS& s,
MatrixU& u, MatrixVT& vt, optimal_workspace ) {
namespace bindings = ::boost::numeric::bindings;
- integer_t minmn = std::min< std::ptrdiff_t >( size_row(a),
+ std::ptrdiff_t minmn = std::min< std::ptrdiff_t >( size_row(a),
size_column(a) );
value_type opt_size_work;
bindings::detail::array< real_type > tmp_rwork( min_size_rwork( minmn,
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/driver/gges.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -294,7 +294,7 @@
// workspace-array work.
//
static std::ptrdiff_t min_size_work( const std::ptrdiff_t n ) {
- return std::max< std::ptrdiff_t >( 1, 8*n + 16 );
+ return std::max< std::ptrdiff_t >( 8*n, 6*n + 16 );
}
//
Modified: sandbox/numeric_bindings/boost/numeric/bindings/traits/detail/utils.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/traits/detail/utils.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/traits/detail/utils.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -48,14 +48,14 @@
}
- // converts real/complex to integer_t
- inline integer_t to_int (float f) { return static_cast<integer_t> (f); }
- inline integer_t to_int (double d) { return static_cast<integer_t> (d); }
- inline integer_t to_int (traits::complex_f const& cf) {
- return static_cast<integer_t> (traits::real (cf));
+ // converts real/complex to std::ptrdiff_t
+ inline std::ptrdiff_t to_int (float f) { return static_cast<std::ptrdiff_t> (f); }
+ inline std::ptrdiff_t to_int (double d) { return static_cast<std::ptrdiff_t> (d); }
+ inline std::ptrdiff_t to_int (traits::complex_f const& cf) {
+ return static_cast<std::ptrdiff_t> (traits::real (cf));
}
- inline integer_t to_int (traits::complex_d const& cd) {
- return static_cast<integer_t> (traits::real (cd));
+ inline std::ptrdiff_t to_int (traits::complex_d const& cd) {
+ return static_cast<std::ptrdiff_t> (traits::real (cd));
}
}
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gels.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -1,6 +1,6 @@
$TEMPLATE[gels.all.min_size_work.args]
M,N,NRHS
$TEMPLATE[gels.all.min_size_work]
-integer_t minmn = std::min< $INTEGER_TYPE >( m, n );
+$INTEGER_TYPE minmn = std::min< $INTEGER_TYPE >( m, n );
return std::max< $INTEGER_TYPE >( 1, minmn + std::max< $INTEGER_TYPE >( minmn, nrhs ) );
$TEMPLATE[end]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gesdd.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -3,7 +3,7 @@
$TEMPLATE[gesdd.all.extra_opt_variables]
MINMN
$TEMPLATE[gesdd.all.MINMN.init]
-integer_t minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
+$INTEGER_TYPE minmn = std::min< $INTEGER_TYPE >( size_row(a), size_column(a) );
$TEMPLATE[gesdd.all.min_size_work.args]
M, N, JOBZ, MINMN
$TEMPLATE[gesdd.real.min_size_work]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/driver/gges.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -1,7 +1,7 @@
$TEMPLATE[gges.all.min_size_work.args]
N
$TEMPLATE[gges.real.min_size_work]
-return std::max< $INTEGER_TYPE >( 1, 8*n + 16 );
+return std::max< $INTEGER_TYPE >( 8*n, 6*n + 16 );
$TEMPLATE[gges.complex.min_size_work]
return std::max< $INTEGER_TYPE >( 1, 2*n );
$TEMPLATE[gges.all.min_size_bwork.args]
Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/lapack_solve.hpp 2010-07-14 19:50:05 EDT (Wed, 14 Jul 2010)
@@ -3,7 +3,7 @@
typedef boost::mpl::bool_<false> has_pivot;
template< typename MatrixA, typename MatrixB, typename VectorP >
- static void solve( MatrixA& A, MatrixB& B, VectorP const&, integer_t& info ) {
+ static void solve( MatrixA& A, MatrixB& B, VectorP const&, fortran_int_t& info ) {
invoke( $KEYWORDS );
}
$TEMPLATE[template_lapack_solve_pivot1]
@@ -11,13 +11,13 @@
typedef boost::mpl::bool_<true> has_pivot;
template< typename MatrixA, typename MatrixB, typename VectorP >
- static void solve( MatrixA& A, MatrixB& B, VectorP& pivot, integer_t& info ) {
+ static void solve( MatrixA& A, MatrixB& B, VectorP& pivot, fortran_int_t& info ) {
invoke( $KEYWORDS );
}
template< typename MatrixA, typename MatrixB, typename VectorP >
- static void solve( MatrixA& A, MatrixB& B, VectorP const&, integer_t& info ) {
- traits::detail::array< integer_t > pivot( size_column(A) );
+ static void solve( MatrixA& A, MatrixB& B, VectorP const&, fortran_int_t& info ) {
+ traits::detail::array< fortran_int_t > pivot( size_column(A) );
invoke( $KEYWORDS );
}
$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