summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Arteaga <andyspiros@gmail.com>2011-08-07 01:55:21 +0200
committerAndrea Arteaga <andyspiros@gmail.com>2011-08-07 01:55:21 +0200
commit13b03bd8fceb7b3f575a77d5ec95be91d47814ea (patch)
treeb83c85874e1bf2b58395f59ed1885ac750aedc2d
parentAdded eigensolver tests (syev, stev) to lapack_accuracy (diff)
downloadauto-numerical-bench-13b03bd8fceb7b3f575a77d5ec95be91d47814ea.tar.gz
auto-numerical-bench-13b03bd8fceb7b3f575a77d5ec95be91d47814ea.tar.bz2
auto-numerical-bench-13b03bd8fceb7b3f575a77d5ec95be91d47814ea.zip
Added some LAPACK tests.
-rw-r--r--accuracy/lapack/lapack_STEV.hh2
-rw-r--r--lapack.py5
-rw-r--r--testdescr.py2
3 files changed, 6 insertions, 3 deletions
diff --git a/accuracy/lapack/lapack_STEV.hh b/accuracy/lapack/lapack_STEV.hh
index 0c9dea3..ab020ae 100644
--- a/accuracy/lapack/lapack_STEV.hh
+++ b/accuracy/lapack/lapack_STEV.hh
@@ -7,7 +7,7 @@
double test_STEV(const int& N, const unsigned& seed = 0)
{
LinearCongruential lc(seed);
- vector<double> A(N*N), D(N), E(N-1), Z(N*N), DD(N*N), work(2*N-2), tmp(N*N);
+ vector<double> A(N*N), D(N), E(N-1), Z(N*N), DD(N*N), work(max(1, 2*N-2)), tmp(N*N);
/* Fill D, E and A */
for (int i = 0; i < N-1; ++i) {
diff --git a/lapack.py b/lapack.py
index e618380..677603e 100644
--- a/lapack.py
+++ b/lapack.py
@@ -6,7 +6,7 @@ class Module(btlbase.BTLBase):
def _initialize(self):
self.libname = "lapack"
self.avail = ['general_solve', 'least_squares', 'lu_decomp', \
- 'cholesky', 'symm_ev']
+ 'cholesky', 'qr_decomp', 'svd_decomp', 'syev', 'stev', 'symm_ev']
def _parse_args(self, args):
# Parse arguments
@@ -22,7 +22,8 @@ class Module(btlbase.BTLBase):
# If no test is specified, run everything
if len(self.tests) == 0:
- self.tests = self.avail
+ self.tests = ['lu_decomp', 'cholesky', 'qr_decomp', 'svd_decomp',\
+ 'syev', 'stev']
btlbase.BTLBase._parse_args(self, args)
diff --git a/testdescr.py b/testdescr.py
index 51ad714..edadd06 100644
--- a/testdescr.py
+++ b/testdescr.py
@@ -21,6 +21,8 @@ testdescr = {
'cholesky': 'Cholesky decomposition',
'svd_decomp': 'SVD-decomposition',
'qr_decomp': 'QR-decomposition',
+'syev': 'Diagonalization of a symmetric matrix',
+'stev': 'Diagonalization of a tridiagonal matrix',
'symm_ev': 'Symmetric Eigenvalue computation',
# FFTW