[arrayfire] 29/84: Add function to check Image IO availability

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:19 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 59c98201b29a40352a8cf0c85a9e7eabdb4e84aa
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Wed Dec 16 13:42:11 2015 -0500

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

diff --git a/test/testHelpers.hpp b/test/testHelpers.hpp
index cd725fe..a4eff2d 100644
--- a/test/testHelpers.hpp
+++ b/test/testHelpers.hpp
@@ -388,6 +388,19 @@ bool noDoubleTests()
     return ((isTypeDouble && !isDoubleSupported) ? true : false);
 }
 
+bool noImageIOTests()
+{
+    af_array arr = 0;
+    const af_err err = af_load_image(&arr, TEST_DIR"/imageio/color_small.png", true);
+
+    if(arr != 0) af_release_array(arr);
+
+    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