[arrayfire] 31/84: Add function to check LAPACK availability

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 4145a040be0c79fb9283c750f31213ab1b56bd0a
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Wed Dec 16 14:12:34 2015 -0500

    Add function to check LAPACK availability
---
 test/testHelpers.hpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/test/testHelpers.hpp b/test/testHelpers.hpp
index a4eff2d..758bf98 100644
--- a/test/testHelpers.hpp
+++ b/test/testHelpers.hpp
@@ -401,6 +401,26 @@ bool noImageIOTests()
         return false;   // No, let test continue
 }
 
+bool noLAPACKTests()
+{
+    // Run LU
+    af::dim4 dims(5, 5);
+    af_array in = 0, l = 0, u = 0, p= 0;
+    af_randu(&in, dims.ndims(), dims.get(), (af_dtype) af::dtype_traits<float>::af_type);
+
+    af_err err = af_lu(&l, &u, &p, in);
+
+    if(in != 0) af_release_array(in);
+    if(l  != 0) af_release_array(l);
+    if(u  != 0) af_release_array(u);
+    if(p  != 0) af_release_array(p);
+
+    if(err == AF_ERR_NOT_CONFIGURED)
+        return true;    // Yes, disable test
+    else
+        return false;   // No, let test continue
+}
+
 // TODO: perform conversion on device for CUDA and OpenCL
 template<typename T>
 af_err conv_image(af_array *out, af_array in)

-- 
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