[arrayfire] 65/84: DOC Add code sample to convert available backends to bool
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Jan 4 23:22:26 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 4e06483a488bcc37496b1dbfa672c36e266146cc
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Tue Dec 29 14:33:52 2015 -0500
DOC Add code sample to convert available backends to bool
---
docs/details/backend.dox | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/details/backend.dox b/docs/details/backend.dox
index fafa453..4d9cdf6 100644
--- a/docs/details/backend.dox
+++ b/docs/details/backend.dox
@@ -45,6 +45,15 @@ Return Value | Backends Available
6 | CUDA and OpenCL
7 | CPU, CUDA and OpenCL
+To convert the integer back into bools for each device, use the following code
+\code
+int backends = af::getAvailableBackends();
+
+bool cpu = backends & AF_BACKEND_CPU;
+bool cuda = backends & AF_BACKEND_CUDA;
+bool opencl = backends & AF_BACKEND_OPENCL;
+\endcode
+
\ingroup unified_func
\ingroup arrayfire_func
--
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