[arrayfire] 138/284: Add version guards around allocHost and freeHost

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:27 UTC 2016


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

ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.

commit 7b6eee1385bc9b275e7eb3518ff454ac6faf825c
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Thu Dec 31 18:17:14 2015 -0500

    Add version guards around allocHost and freeHost
---
 include/af/device.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/af/device.h b/include/af/device.h
index d3585c6..ff33b33 100644
--- a/include/af/device.h
+++ b/include/af/device.h
@@ -152,6 +152,7 @@ namespace af
     /// \param[in] ptr the memory to free
     AFAPI void freePinned(const void *ptr);
 
+#if AF_API_VERSION >= 33
     /// \brief Allocate memory on host
     ///
     /// \copydoc device_func_alloc_host
@@ -162,7 +163,9 @@ namespace af
     ///
     /// \ingroup device_func_alloc_host
     AFAPI void *allocHost(const size_t elements, const dtype type);
+#endif
 
+#if AF_API_VERSION >= 33
     /// \brief Allocate memory on host
     ///
     /// \copydoc device_func_alloc_host
@@ -176,7 +179,9 @@ namespace af
     /// \ingroup device_func_alloc_host
     template<typename T>
     AFAPI T* allocHost(const size_t elements);
+#endif
 
+#if AF_API_VERSION >= 33
     /// \brief Free memory allocated internally by ArrayFire
     //
     /// \copydoc device_func_free_host
@@ -185,6 +190,7 @@ namespace af
     ///
     /// \ingroup device_func_free_host
     AFAPI void freeHost(const void *ptr);
+#endif
 
     /// \ingroup device_func_mem
     /// @{
@@ -291,15 +297,19 @@ extern "C" {
     */
     AFAPI af_err af_free_pinned(void *ptr);
 
+#if AF_API_VERSION >= 33
     /**
        \ingroup device_func_alloc_host
     */
     AFAPI af_err af_alloc_host(void **ptr, const dim_t bytes);
+#endif
 
+#if AF_API_VERSION >= 33
     /**
        \ingroup device_func_free_host
     */
     AFAPI af_err af_free_host(void *ptr);
+#endif
 
     /**
        Create array from device memory

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