[arrayfire] 353/408: Added missing 3.1 version gaurds
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.
commit 8755004a7bc7a5e9491d00c69723c17cb21a3f88
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Tue Aug 25 18:01:57 2015 -0400
Added missing 3.1 version gaurds
---
include/af/array.h | 4 ++++
include/af/graphics.h | 2 ++
include/af/image.h | 12 ++++++++++++
include/af/index.h | 4 ++++
include/af/signal.h | 2 ++
include/af/util.h | 8 ++++++++
include/af/vision.h | 4 ++++
7 files changed, 36 insertions(+)
diff --git a/include/af/array.h b/include/af/array.h
index f763a75..b652d04 100644
--- a/include/af/array.h
+++ b/include/af/array.h
@@ -116,7 +116,9 @@ namespace af
template<typename T> T scalar() const;
template<typename T> T* device() const;
void unlock() const;
+#if AF_API_VERSION >= 31
void lock() const;
+#endif
array::array_proxy row(int index);
const array::array_proxy row(int index) const;
@@ -1258,6 +1260,7 @@ extern "C" {
*/
AFAPI af_err af_retain_array(af_array *out, const af_array in);
+#if AF_API_VERSION >= 31
/**
\ingroup method_mat
@{
@@ -1265,6 +1268,7 @@ extern "C" {
Get the use count of `af_array`
*/
AFAPI af_err af_get_data_ref_count(int *use_count, const af_array in);
+#endif
/**
diff --git a/include/af/graphics.h b/include/af/graphics.h
index 5b83e6b..1fd9108 100644
--- a/include/af/graphics.h
+++ b/include/af/graphics.h
@@ -103,6 +103,7 @@ class AFAPI Window {
*/
void setTitle(const char* const title);
+#if AF_API_VERSION >= 31
/**
Set the window size
@@ -110,6 +111,7 @@ class AFAPI Window {
\param[in] h is target height of the window
*/
void setSize(const unsigned w, const unsigned h);
+#endif
/**
Set the colormap to be used for subsequent rendering calls
diff --git a/include/af/image.h b/include/af/image.h
index 84dd7ac..1c16280 100644
--- a/include/af/image.h
+++ b/include/af/image.h
@@ -48,6 +48,7 @@ AFAPI array loadImage(const char* filename, const bool is_color=false);
*/
AFAPI void saveImage(const char* filename, const array& in);
+#if AF_API_VERSION >= 31
/**
C++ Interface for loading an image from memory
@@ -62,7 +63,9 @@ AFAPI void saveImage(const char* filename, const array& in);
\ingroup imagemem_func_load
*/
AFAPI array loadImageMem(const void *ptr);
+#endif
+#if AF_API_VERSION >= 31
/**
C++ Interface for saving an image to memory
@@ -79,7 +82,9 @@ AFAPI array loadImageMem(const void *ptr);
\ingroup imagemem_func_save
*/
AFAPI void* saveImageMem(const array& in, const imageFormat format = AF_FIF_PNG);
+#endif
+#if AF_API_VERSION >= 31
/**
C++ Interface for deleting memory created by \ref saveImageMem or
\ref af_save_image_memory
@@ -89,6 +94,7 @@ AFAPI void* saveImageMem(const array& in, const imageFormat format = AF_FIF_PNG)
\ingroup imagemem_func_delete
*/
AFAPI void deleteImageMem(void *ptr);
+#endif
/**
C++ Interface for resizing an image to specified dimensions
@@ -640,6 +646,7 @@ extern "C" {
*/
AFAPI af_err af_save_image(const char* filename, const af_array in);
+#if AF_API_VERSION >= 31
/**
C Interface for loading an image from memory
@@ -651,7 +658,9 @@ extern "C" {
\ingroup imagemem_func_load
*/
AFAPI af_err af_load_image_memory(af_array *out, const void* ptr);
+#endif
+#if AF_API_VERSION >= 31
/**
C Interface for saving an image to memory using FreeImage
@@ -665,7 +674,9 @@ extern "C" {
\ingroup imagemem_func_save
*/
AFAPI af_err af_save_image_memory(void** ptr, const af_array in, const af_image_format format);
+#endif
+#if AF_API_VERSION >= 31
/**
C Interface for deleting an image from memory
@@ -676,6 +687,7 @@ extern "C" {
\ingroup imagemem_func_delete
*/
AFAPI af_err af_delete_image_memory(void* ptr);
+#endif
/**
C Interface for resizing an image to specified dimensions
diff --git a/include/af/index.h b/include/af/index.h
index 4dd5b9a..986e1a3 100644
--- a/include/af/index.h
+++ b/include/af/index.h
@@ -103,6 +103,7 @@ class AFAPI index {
///
index(const af::array& idx0);
+#if AF_API_VERSION >= 31
///
/// \brief Copy constructor
///
@@ -111,6 +112,7 @@ class AFAPI index {
/// \sa indexing
///
index(const index& idx0);
+#endif
///
/// \brief Returns true if the \ref af::index represents a af::span object
@@ -126,6 +128,7 @@ class AFAPI index {
///
const af_index_t& get() const;
+#if AF_API_VERSION >= 31
///
/// \brief Assigns idx0 to this index
///
@@ -150,6 +153,7 @@ class AFAPI index {
///
index& operator=(index &&idx0);
#endif
+#endif // AF_API_VERSION
};
///
diff --git a/include/af/signal.h b/include/af/signal.h
index efaa124..f2dccb8 100644
--- a/include/af/signal.h
+++ b/include/af/signal.h
@@ -418,6 +418,7 @@ array fftR2C(const array &in,
const double norm_factor = 0);
#endif
+#if AF_API_VERSION >= 31
/**
C++ Interface for complex to real fast fourier transform
@@ -433,6 +434,7 @@ array fftR2C(const array &in,
template<int rank>
array fftC2R(const array &in, bool is_odd = false,
const double norm_factor = 0);
+#endif
/**
C++ Interface for convolution any(one through three) dimensional signals
diff --git a/include/af/util.h b/include/af/util.h
index 9e10733..95cc145 100644
--- a/include/af/util.h
+++ b/include/af/util.h
@@ -112,6 +112,8 @@ namespace af
AFAPI array exampleFunction(const array& in, const af_someenum_t param);
}
+#if AF_API_VERSION >= 31
+
#define AF_PRINT1(exp) af::print(#exp, exp);
#define AF_PRINT2(exp, precision) af::print(#exp, exp, precision);
@@ -150,6 +152,12 @@ namespace af
*/
#define af_print(...) GET_PRINT_MACRO(__VA_ARGS__, AF_PRINT2, AF_PRINT1)(__VA_ARGS__)
+#else
+
+#define af_print(exp) af::print(#exp, exp);
+
+#endif
+
#endif //__cplusplus
#ifdef __cplusplus
diff --git a/include/af/vision.h b/include/af/vision.h
index 5449856..5070d8c 100644
--- a/include/af/vision.h
+++ b/include/af/vision.h
@@ -95,6 +95,7 @@ AFAPI features harris(const array& in, const unsigned max_corners=500, const flo
*/
AFAPI void orb(features& feat, array& desc, const array& image, const float fast_thr=20.f, const unsigned max_feat=400, const float scl_fctr=1.5f, const unsigned levels=4, const bool blur_img=false);
+#if AF_API_VERSION >= 31
/**
C++ Interface for SIFT feature detector and descriptor
@@ -127,6 +128,7 @@ AFAPI void orb(features& feat, array& desc, const array& image, const float fast
\ingroup cv_func_sift
*/
AFAPI void sift(features& feat, array& desc, const array& in, const unsigned n_layers=3, const float contrast_thr=0.04f, const float edge_thr=10.f, const float init_sigma=1.6f, const bool double_input=true, const float img_scale=0.00390625f, const float feature_ratio=0.05f);
+#endif
/**
C++ Interface wrapper for Hamming matcher
@@ -331,6 +333,7 @@ extern "C" {
*/
AFAPI af_err af_orb(af_features *feat, af_array *desc, const af_array in, const float fast_thr, const unsigned max_feat, const float scl_fctr, const unsigned levels, const bool blur_img);
+#if AF_API_VERSION >= 31
/**
C++ Interface for SIFT feature detector and descriptor
@@ -363,6 +366,7 @@ extern "C" {
\ingroup cv_func_sift
*/
AFAPI af_err af_sift(af_features *feat, af_array *desc, const af_array in, const unsigned n_layers, const float contrast_thr, const float edge_thr, const float init_sigma, const bool double_input, const float img_scale, const float feature_ratio);
+#endif
/**
C Interface wrapper for Hamming matcher
--
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