|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58487 - in sandbox/numeric_bindings: boost/numeric/bindings/lapack/computational libs/numeric/bindings/lapack/test libs/numeric/bindings/tools/templates/computational
From: thomas.klimpel_at_[hidden]
Date: 2009-12-22 09:01:08
Author: klimpel
Date: 2009-12-22 09:01:08 EST (Tue, 22 Dec 2009)
New Revision: 58487
URL: http://svn.boost.org/trac/boost/changeset/58487
Log:
Continue of regression tests update
Added:
sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sytr.hpp (contents, props changed)
Text files modified:
sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp | 18 ++++++++----------
sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_sytrf_sytrs.cc | 33 ++++++++++++++++++++++++---------
2 files changed, 32 insertions(+), 19 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp (original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/lapack/computational/sytrf.hpp 2009-12-22 09:01:08 EST (Tue, 22 Dec 2009)
@@ -83,7 +83,7 @@
BOOST_ASSERT( traits::leading_dimension(a) >= std::max<
std::ptrdiff_t >(1,traits::matrix_num_columns(a)) );
BOOST_ASSERT( traits::vector_size(work.select(real_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work());
detail::sytrf( traits::matrix_uplo_tag(a),
traits::matrix_num_columns(a), traits::matrix_storage(a),
traits::leading_dimension(a), traits::vector_storage(ipiv),
@@ -95,8 +95,7 @@
template< typename MatrixA, typename VectorIPIV >
static void invoke( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
minimal_workspace work ) {
- traits::detail::array< real_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ traits::detail::array< real_type > tmp_work( min_size_work() );
invoke( a, ipiv, info, workspace( tmp_work ) );
}
@@ -114,8 +113,8 @@
invoke( a, ipiv, info, workspace( tmp_work ) );
}
- static integer_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_work() {
+ return 1;
}
};
@@ -136,7 +135,7 @@
BOOST_ASSERT( traits::leading_dimension(a) >= std::max<
std::ptrdiff_t >(1,traits::matrix_num_columns(a)) );
BOOST_ASSERT( traits::vector_size(work.select(value_type())) >=
- min_size_work( $CALL_MIN_SIZE ));
+ min_size_work());
detail::sytrf( traits::matrix_uplo_tag(a),
traits::matrix_num_columns(a), traits::matrix_storage(a),
traits::leading_dimension(a), traits::vector_storage(ipiv),
@@ -148,8 +147,7 @@
template< typename MatrixA, typename VectorIPIV >
static void invoke( MatrixA& a, VectorIPIV& ipiv, integer_t& info,
minimal_workspace work ) {
- traits::detail::array< value_type > tmp_work( min_size_work(
- $CALL_MIN_SIZE ) );
+ traits::detail::array< value_type > tmp_work( min_size_work() );
invoke( a, ipiv, info, workspace( tmp_work ) );
}
@@ -167,8 +165,8 @@
invoke( a, ipiv, info, workspace( tmp_work ) );
}
- static integer_t min_size_work( $ARGUMENTS ) {
- $MIN_SIZE
+ static integer_t min_size_work() {
+ return 1;
}
};
Modified: sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_sytrf_sytrs.cc
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_sytrf_sytrs.cc (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/lapack/test/ublas_sytrf_sytrs.cc 2009-12-22 09:01:08 EST (Tue, 22 Dec 2009)
@@ -6,7 +6,10 @@
#include <cstddef>
#include <iostream>
#include <complex>
-#include <boost/numeric/bindings/lapack/sysv.hpp>
+#include <boost/numeric/bindings/lapack/computational/sytrf.hpp>
+#include <boost/numeric/bindings/lapack/computational/sytri.hpp>
+#include <boost/numeric/bindings/lapack/computational/sytrs.hpp>
+#include <boost/numeric/bindings/traits/ublas_vector.hpp>
#include <boost/numeric/bindings/traits/ublas_matrix.hpp>
#include <boost/numeric/bindings/traits/ublas_symmetric.hpp>
#include <boost/numeric/bindings/traits/std_vector.hpp>
@@ -15,6 +18,7 @@
namespace ublas = boost::numeric::ublas;
namespace lapack = boost::numeric::bindings::lapack;
+namespace traits = boost::numeric::bindings::traits;
using std::size_t;
using std::cin;
@@ -98,9 +102,9 @@
int err = lapack::sytrf (sal, ipiv);
if (err == 0) {
symml_t isal (sal);
- lapack::sytrs (sal, ipiv, bl);
+ lapack::sytrs (traits::matrix_uplo_tag(sal), sal, ipiv, bl);
print_m (bl, "xl");
- lapack::sytri (isal, ipiv);
+ lapack::sytri (traits::matrix_uplo_tag(isal), isal, ipiv);
print_m (isal, "isal");
}
cout << endl;
@@ -108,9 +112,9 @@
err = lapack::sytrf (sau, ipiv);
if (err == 0) {
symmu_t isau (sau);
- lapack::sytrs (sau, ipiv, bu);
+ lapack::sytrs (traits::matrix_uplo_tag(sau), sau, ipiv, bu);
print_m (bu, "xu");
- lapack::sytri (isau, ipiv);
+ lapack::sytri (traits::matrix_uplo_tag(isau), isau, ipiv);
print_m (isau, "isau");
}
else
@@ -121,6 +125,7 @@
cout << endl << "part 2" << endl << endl;
+/*
int lw = lapack::sytrf_block ('O', 'L', al1);
cout << "nb = " << lw << endl;
lw *= n;
@@ -132,6 +137,9 @@
cout << "mb = " << mb << endl << endl;
err = lapack::sytrf ('L', al1, ipiv, work);
+*/
+ symml_t sal1 (al1);
+ err = lapack::sytrf (sal1, ipiv);
if (err == 0) {
lapack::sytrs ('L', al1, ipiv, bl1);
print_m (al1, "al1 factored");
@@ -144,6 +152,7 @@
cout << "?" << endl;
cout << endl;
+/*
lw = lapack::sytrf_block ('O', 'U', au1);
cout << "nb = " << lw << endl;
lw *= n;
@@ -156,6 +165,9 @@
cout << "mb = " << mb << endl << endl;
err = lapack::sytrf ('U', au1, ipiv, work);
+*/
+ symmu_t sau1 (au1);
+ err = lapack::sytrf (sau1, ipiv);
if (err == 0) {
lapack::sytrs ('U', au1, ipiv, bu1);
print_m (au1, "au1 factored");
@@ -203,15 +215,16 @@
int ierr = lapack::sytrf (scal, ipiv);
if (ierr == 0) {
csymml_t iscal (scal);
- lapack::sytrs (scal, ipiv, cbl);
+ lapack::sytrs (traits::matrix_uplo_tag(scal), scal, ipiv, cbl);
print_m (cbl, "cxl");
- lapack::sytri (iscal, ipiv);
+ lapack::sytri (traits::matrix_uplo_tag(iscal), iscal, ipiv);
print_m (iscal, "iscal");
}
else
cout << "?" << endl;
cout << endl;
+/*
lw = lapack::sytrf_block ('O', scau);
cout << "nb = " << lw << endl;
lw *= n;
@@ -223,13 +236,15 @@
cout << "mb = " << mb << endl << endl;
ierr = lapack::sytrf (scau, ipiv, cwork);
+*/
+ ierr = lapack::sytrf (scau, ipiv);
if (ierr == 0) {
csymmu_t iscau (scau);
- lapack::sytrs (scau, ipiv, cbu);
+ lapack::sytrs (traits::matrix_uplo_tag(scau), scau, ipiv, cbu);
print_v (ipiv, "ipiv");
cout << endl;
print_m (cbu, "cxu");
- lapack::sytri (iscau, ipiv);
+ lapack::sytri (traits::matrix_uplo_tag(iscau), iscau, ipiv);
print_m (iscau, "iscau");
}
else
Added: sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sytr.hpp
==============================================================================
--- (empty file)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/templates/computational/sytr.hpp 2009-12-22 09:01:08 EST (Tue, 22 Dec 2009)
@@ -0,0 +1,7 @@
+$TEMPLATE[sytrd.all.min_size_work.args]
+$TEMPLATE[sytrd.all.min_size_work]
+return 1;
+$TEMPLATE[sytrf.all.min_size_work.args]
+$TEMPLATE[sytrf.all.min_size_work]
+return 1;
+$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