[arrayfire] 83/248: Documentation fixes

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:06 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 c32937d2345e2786a60b6258b409d4a577c6190b
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Sep 28 13:32:57 2015 -0400

    Documentation fixes
---
 docs/pages/unified_backend.md  | 43 ++++++++++++++++++++++++++++++++++++------
 docs/pages/using_on_windows.md |  8 ++++----
 include/af/macros.h            |  2 +-
 3 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/docs/pages/unified_backend.md b/docs/pages/unified_backend.md
index c4e54c0..89fe0b5 100644
--- a/docs/pages/unified_backend.md
+++ b/docs/pages/unified_backend.md
@@ -27,19 +27,50 @@ The Unified backend will try to dynamically load the backend libraries. The
 priority of backends is __CUDA -> OpenCL -> CPU__
 
 The most important aspect to note here is that all the libraries the ArrayFire
-libs depend on need to be in the environment paths (`LD_LIBRARY_PATH` /
-`DYLD_LIBRARY_PATH` / `PATH`). If any of the libs are missing, then the library will
-fail to load and the backend will be marked as unavailable.
+libs depend on need to be in the environment paths
 
-> Note: For the CUDA backend, ensure that the CUDA NVVM libs/dlls are in the path.
-> These can be easily missed since CUDA installation does not add the paths by default.
+* `LD_LIBRARY_PATH` -> Linux, Unix, OSX
+* `DYLD_LIBRARY_PATH` -> OSX
+* `PATH` -> Windows
+
+If any of the libs are missing, then the library will fail to load and the
+backend will be marked as unavailable.
+
+Optionally, The ArrayFire libs may be present in `AF_PATH` or `AF_BUILD_PATH`
+environment variables if the path is not in the system paths. These are
+treated as fallback paths in case the files are not found in the system paths.
+However, all the other upstream libraries for ArrayFire libs must be present
+in the system path variables shown above.
+
+### Special Mention: CUDA NVVM
+For the CUDA backend, ensure that the CUDA NVVM libs/dlls are in the path.
+These can be easily missed since CUDA installation does not add the paths by default.
+
+On Linux and OSX, add `/usr/local/cuda/nvvm/(lib or lib64)` to LD_LIBRARY_PATH or
+DYLD_LIBRARY_PATH.
+
+On Windows, you can set up a post build event that copys the NVVM dlls to
+the executable directory by using the following commands:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
+echo copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
+copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
+if errorlevel 1 (
+    echo "CUDA NVVM DLLs copy failed due to missing files."
+    exit /B 0
+)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+This ensures that the NVVM DLLs are copied if present, but does not fail the
+build if the copy fails. This is how ArrayFire ships it's examples.
+
+The other option is to set `%%CUDA_PATH%/nvvm/bin` in the PATH environment
+variable.
 
 # Switching Backends
 
 The af_backend enum stores the possible backends.
 To select a backend, call the af::setBackend function as shown below.
 
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
 af::setBackend(AF_BACKEND_OPENCL);    // Sets CUDA as current backend
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/docs/pages/using_on_windows.md b/docs/pages/using_on_windows.md
index 491e493..452853e 100644
--- a/docs/pages/using_on_windows.md
+++ b/docs/pages/using_on_windows.md
@@ -96,10 +96,10 @@ different:
    _Project Properties -> Build Events -> Post Build Events_
    dialog:
 
-     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-     echo copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
-     copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
-     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c}
+echo copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
+copy "$(CUDA_PATH)\nvvm\bin\nvvm64*.dll" "$(OutDir)"
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 4. Ensure that you use x64 based configurations.
 
diff --git a/include/af/macros.h b/include/af/macros.h
index 6c816c7..42a4219 100644
--- a/include/af/macros.h
+++ b/include/af/macros.h
@@ -13,7 +13,7 @@
 ///
 /// Print a line on screen using printf syntax.
 /// Usage: Uses same syntax and semantics as printf.
-/// Output: <filename>:<line number>: <message>
+/// Output: \<filename\>:\<line number\>: \<message\>
 ///
 #ifndef AF_MSG
 #define AF_MSG(fmt,...) do {            \

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