[arrayfire] 76/248: Corrections in unified backend doc

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:05 UTC 2015


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

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

commit 5b82ff11a267c1893c5187ffd0caecbd1d479ca9
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Wed Sep 23 14:43:46 2015 -0400

    Corrections in unified backend doc
---
 docs/pages/unified_backend.md | 83 +++++++++++++++++++++----------------------
 include/arrayfire.h           |  1 +
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/docs/pages/unified_backend.md b/docs/pages/unified_backend.md
index cfbb7b0..c4e54c0 100644
--- a/docs/pages/unified_backend.md
+++ b/docs/pages/unified_backend.md
@@ -36,19 +36,19 @@ fail to load and the backend will be marked as unavailable.
 
 # Switching Backends
 
-The \ref af_backend enum stores the possible backends.
-To select a backend, call the \ref setBackend function as shown below.
+The af_backend enum stores the possible backends.
+To select a backend, call the af::setBackend function as shown below.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 af::setBackend(AF_BACKEND_OPENCL);    // Sets CUDA as current backend
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 To get the count of the number of backends available (the number of `libaf*`
-backend libraries loaded successfully), call the \ref getBackendCount function.
+backend libraries loaded successfully), call the af::getBackendCount function.
 
 # Example
 
-This example is shortened form of \ref examples/basic.cpp
+This example is shortened form of [basic.cpp](\ref basic.cpp).
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
 #include <arrayfire.h>
@@ -93,49 +93,48 @@ int main()
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 This output would be:
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Trying CPU Backend
-ArrayFire v3.2.0 (CPU, 64-bit Linux, build fc7630f)
-[0] Intel: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz Max threads(8)
-af::randu(5, 4)
-[5 4 1 1]
-    0.0000     0.2190     0.3835     0.5297
-    0.1315     0.0470     0.5194     0.6711
-    0.7556     0.6789     0.8310     0.0077
-    0.4587     0.6793     0.0346     0.3834
-    0.5328     0.9347     0.0535     0.0668
-
-Trying CUDA Backend
-ArrayFire v3.2.0 (CUDA, 64-bit Linux, build fc7630f)
-Platform: CUDA Toolkit 7.5, Driver: 355.11
-[0] Quadro K5000, 4093 MB, CUDA Compute 3.0
-af::randu(5, 4)
-[5 4 1 1]
-    0.7402     0.4464     0.7762     0.2920
-    0.9210     0.6673     0.2948     0.3194
-    0.0390     0.1099     0.7140     0.8109
-    0.9690     0.4702     0.3585     0.1541
-    0.9251     0.5132     0.6814     0.4452
-
-Trying OpenCL Backend
-ArrayFire v3.2.0 (OpenCL, 64-bit Linux, build fc7630f)
-[0] NVIDIA  : Quadro K5000
--1- INTEL   : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
-af::randu(5, 4)
-[5 4 1 1]
-    0.4107     0.0081     0.6600     0.1046
-    0.8224     0.3775     0.0764     0.8827
-    0.9518     0.3027     0.0901     0.1647
-    0.1794     0.6456     0.5933     0.8060
-    0.4198     0.5591     0.1098     0.5938
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Trying CPU Backend
+    ArrayFire v3.2.0 (CPU, 64-bit Linux, build fc7630f)
+    [0] Intel: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz Max threads(8)
+    af::randu(5, 4)
+    [5 4 1 1]
+        0.0000     0.2190     0.3835     0.5297
+        0.1315     0.0470     0.5194     0.6711
+        0.7556     0.6789     0.8310     0.0077
+        0.4587     0.6793     0.0346     0.3834
+        0.5328     0.9347     0.0535     0.0668
+
+    Trying CUDA Backend
+    ArrayFire v3.2.0 (CUDA, 64-bit Linux, build fc7630f)
+    Platform: CUDA Toolkit 7.5, Driver: 355.11
+    [0] Quadro K5000, 4093 MB, CUDA Compute 3.0
+    af::randu(5, 4)
+    [5 4 1 1]
+        0.7402     0.4464     0.7762     0.2920
+        0.9210     0.6673     0.2948     0.3194
+        0.0390     0.1099     0.7140     0.8109
+        0.9690     0.4702     0.3585     0.1541
+        0.9251     0.5132     0.6814     0.4452
+
+    Trying OpenCL Backend
+    ArrayFire v3.2.0 (OpenCL, 64-bit Linux, build fc7630f)
+    [0] NVIDIA  : Quadro K5000
+    -1- INTEL   : Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
+    af::randu(5, 4)
+    [5 4 1 1]
+        0.4107     0.0081     0.6600     0.1046
+        0.8224     0.3775     0.0764     0.8827
+        0.9518     0.3027     0.0901     0.1647
+        0.1794     0.6456     0.5933     0.8060
+        0.4198     0.5591     0.1098     0.5938
 
 # Dos and Don'ts
 
 It is very easy to run into exceptions if you are not careful with the
 switching of backends.
 
-### Don't: Do not arrays between different backends
+### Don't: Do not use arrays between different backends
 
 ArrayFire does not track associations between array objects and the backends
 they were created on. Hence, there will be no compiler errors when an array
@@ -171,7 +170,7 @@ suggested technique would be to use a suffix of `_cpu`, `_cuda`, `_opencl`
 with the array names. So an array created on the CUDA backend would be named
 `myarray_cuda`.
 
-If you have not used the \ref setBackend function anywhere in your code, then
+If you have not used the af::setBackend function anywhere in your code, then
 you do not have to worry about this as all the arrays will be created on the
 same default backend.
 
diff --git a/include/arrayfire.h b/include/arrayfire.h
index ec38d68..bdaa0e1 100644
--- a/include/arrayfire.h
+++ b/include/arrayfire.h
@@ -271,6 +271,7 @@
 \example optical_flow.cpp
 \example pyramids.cpp
 \example edge.cpp
+\example basic.cpp
 */
 
 #include "af/compatible.h"

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