[arrayfire] 32/84: Added noLAPACKTests() to relevant tests

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository arrayfire.

commit 12378200d3bcb8aaf30fa7c0c5c5a01afe8f8efa
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Wed Dec 16 14:12:59 2015 -0500

    Added noLAPACKTests() to relevant tests
---
 test/cholesky_dense.cpp | 1 +
 test/inverse_dense.cpp  | 1 +
 test/lu_dense.cpp       | 3 +++
 test/qr_dense.cpp       | 2 ++
 test/rank_dense.cpp     | 7 +++++++
 test/solve_dense.cpp    | 6 ++++++
 test/svd_dense.cpp      | 1 +
 7 files changed, 21 insertions(+)

diff --git a/test/cholesky_dense.cpp b/test/cholesky_dense.cpp
index 93d1331..70548d8 100644
--- a/test/cholesky_dense.cpp
+++ b/test/cholesky_dense.cpp
@@ -29,6 +29,7 @@ template<typename T>
 void choleskyTester(const int n, double eps, bool is_upper)
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
 
     af::dtype ty = (af::dtype)af::dtype_traits<T>::af_type;
 
diff --git a/test/inverse_dense.cpp b/test/inverse_dense.cpp
index ea6c222..b0568eb 100644
--- a/test/inverse_dense.cpp
+++ b/test/inverse_dense.cpp
@@ -32,6 +32,7 @@ template<typename T>
 void inverseTester(const int m, const int n, const int k, double eps)
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
 #if 1
     af::array A  = cpu_randu<T>(af::dim4(m, n));
 #else
diff --git a/test/lu_dense.cpp b/test/lu_dense.cpp
index 7399759..cdb23ef 100644
--- a/test/lu_dense.cpp
+++ b/test/lu_dense.cpp
@@ -30,6 +30,7 @@ using af::cdouble;
 TEST(LU, InPlaceSmall)
 {
     if (noDoubleTests<float>()) return;
+    if (noLAPACKTests()) return;
 
     int resultIdx = 0;
 
@@ -67,6 +68,7 @@ TEST(LU, InPlaceSmall)
 TEST(LU, SplitSmall)
 {
     if (noDoubleTests<float>()) return;
+    if (noLAPACKTests()) return;
 
     int resultIdx = 0;
 
@@ -117,6 +119,7 @@ template<typename T>
 void luTester(const int m, const int n, double eps)
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
 
 #if 1
     af::array a_orig = cpu_randu<T>(af::dim4(m, n));
diff --git a/test/qr_dense.cpp b/test/qr_dense.cpp
index a0a954c..708eb5d 100644
--- a/test/qr_dense.cpp
+++ b/test/qr_dense.cpp
@@ -29,6 +29,7 @@ using af::cdouble;
 TEST(QRFactorized, CPP)
 {
     if (noDoubleTests<float>()) return;
+    if (noLAPACKTests()) return;
 
     int resultIdx = 0;
 
@@ -82,6 +83,7 @@ void qrTester(const int m, const int n, double eps)
 {
     try {
         if (noDoubleTests<T>()) return;
+        if (noLAPACKTests()) return;
 
 #if 1
         af::array in = cpu_randu<T>(af::dim4(m, n));
diff --git a/test/rank_dense.cpp b/test/rank_dense.cpp
index 96b4449..d0a19af 100644
--- a/test/rank_dense.cpp
+++ b/test/rank_dense.cpp
@@ -43,6 +43,7 @@ template<typename T>
 void rankSmall()
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
 
     T ha[] = {1, 4, 7, 2, 5, 8, 3, 6, 20};
     af::array a(3, 3, ha);
@@ -54,6 +55,8 @@ template<typename T>
 void rankBig(const int num)
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
     af::dtype dt = (af::dtype)af::dtype_traits<T>::af_type;
     af::array a = af::randu(num, num, dt);
     ASSERT_EQ(num, (int)af::rank(a));
@@ -67,6 +70,8 @@ template<typename T>
 void rankLow(const int num)
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
     af::dtype dt = (af::dtype)af::dtype_traits<T>::af_type;
 
     af::array a = af::randu(3 * num, num, dt);
@@ -97,6 +102,8 @@ template<typename T>
 void detTest()
 {
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
     af::dtype dt = (af::dtype)af::dtype_traits<T>::af_type;
 
     vector<af::dim4> numDims;
diff --git a/test/solve_dense.cpp b/test/solve_dense.cpp
index d78ceb9..bbb6740 100644
--- a/test/solve_dense.cpp
+++ b/test/solve_dense.cpp
@@ -34,6 +34,8 @@ void solveTester(const int m, const int n, const int k, double eps)
     af::deviceGC();
 
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
 #if 1
     af::array A  = cpu_randu<T>(af::dim4(m, n));
     af::array X0 = cpu_randu<T>(af::dim4(n, k));
@@ -61,6 +63,8 @@ void solveLUTester(const int n, const int k, double eps)
     af::deviceGC();
 
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
 #if 1
     af::array A  = cpu_randu<T>(af::dim4(n, n));
     af::array X0 = cpu_randu<T>(af::dim4(n, k));
@@ -88,6 +92,8 @@ void solveTriangleTester(const int n, const int k, bool is_upper, double eps)
     af::deviceGC();
 
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
+
 #if 1
     af::array A  = cpu_randu<T>(af::dim4(n, n));
     af::array X0 = cpu_randu<T>(af::dim4(n, k));
diff --git a/test/svd_dense.cpp b/test/svd_dense.cpp
index a5bf2dd..f7ef295 100644
--- a/test/svd_dense.cpp
+++ b/test/svd_dense.cpp
@@ -54,6 +54,7 @@ void svdTest(const int M, const int N)
 {
 
     if (noDoubleTests<T>()) return;
+    if (noLAPACKTests()) return;
 
     af::dtype ty = (af::dtype)af::dtype_traits<T>::af_type;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list