[arrayfire] 148/284: Fix clang warnings (std::abs, pragma ignores)

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:28 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 c2d7e42cc21cba574b3afa65b6ffc9c3e048c342
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Fri Jan 1 19:19:44 2016 -0500

    Fix clang warnings (std::abs, pragma ignores)
    
    Fix clang warnings for abs in tests
    
    Fix clang warnings for abs in examples
    
    Fix orb maybe-initialized pragma for clang and msvc
    
    Ignore unused function warning in opencl math and ireduce
    
    Ignore missing braces warning from clang in opencl magma_helper
---
 examples/graphics/fractal.cpp                      |  3 +-
 .../image_processing/adaptive_thresholding.cpp     |  1 +
 examples/image_processing/brain_segmentation.cpp   | 10 +++---
 examples/image_processing/filters.cpp              |  2 +-
 src/api/c/assign.cpp                               |  2 +-
 src/api/c/index.cpp                                |  2 +-
 src/backend/opencl/kernel/ireduce.hpp              | 14 ++++++++
 src/backend/opencl/kernel/orb.hpp                  | 37 ++++++++++++++++++++--
 src/backend/opencl/magma/magma_helper.cpp          | 15 +++++++++
 src/backend/opencl/math.hpp                        | 15 +++++++++
 test/approx1.cpp                                   |  1 +
 test/approx2.cpp                                   |  1 +
 test/bilateral.cpp                                 |  1 +
 test/binary.cpp                                    |  1 +
 test/cholesky_dense.cpp                            |  1 +
 test/convolve.cpp                                  |  1 +
 test/diagonal.cpp                                  |  1 +
 test/dot.cpp                                       |  1 +
 test/fast.cpp                                      |  1 +
 test/fft.cpp                                       |  1 +
 test/fft_real.cpp                                  |  1 +
 test/fftconvolve.cpp                               |  1 +
 test/getting_started.cpp                           |  1 +
 test/gloh_nonfree.cpp                              |  1 +
 test/harris.cpp                                    |  1 +
 test/histogram.cpp                                 |  1 +
 test/homography.cpp                                |  1 +
 test/inverse_dense.cpp                             |  1 +
 test/lu_dense.cpp                                  |  1 +
 test/math.cpp                                      |  1 +
 test/meanshift.cpp                                 |  1 +
 test/medfilt.cpp                                   |  1 +
 test/morph.cpp                                     |  1 +
 test/orb.cpp                                       |  1 +
 test/qr_dense.cpp                                  |  1 +
 test/rank_dense.cpp                                |  1 +
 test/resize.cpp                                    |  1 +
 test/rotate.cpp                                    |  1 +
 test/rotate_linear.cpp                             |  1 +
 test/sift_nonfree.cpp                              |  1 +
 test/solve_dense.cpp                               |  1 +
 test/susan.cpp                                     |  1 +
 test/svd_dense.cpp                                 |  1 +
 test/transform.cpp                                 |  1 +
 test/translate.cpp                                 |  1 +
 test/transpose.cpp                                 |  1 +
 test/triangle.cpp                                  |  1 +
 test/wrap.cpp                                      |  1 +
 48 files changed, 128 insertions(+), 11 deletions(-)

diff --git a/examples/graphics/fractal.cpp b/examples/graphics/fractal.cpp
index 9ac5a86..9781b61 100644
--- a/examples/graphics/fractal.cpp
+++ b/examples/graphics/fractal.cpp
@@ -10,13 +10,14 @@
 #include <stdio.h>
 #include <iostream>
 #include <arrayfire.h>
-#include <math.h>
+#include <cmath>
 #include <cstdlib>
 
 #define WIDTH 400 // Width of image
 #define HEIGHT 400 // Width of image
 
 using namespace af;
+using std::abs;
 
 array complex_grid(int width, int height, float zoom, float center[2])
 {
diff --git a/examples/image_processing/adaptive_thresholding.cpp b/examples/image_processing/adaptive_thresholding.cpp
index 5ce34e7..1004285 100644
--- a/examples/image_processing/adaptive_thresholding.cpp
+++ b/examples/image_processing/adaptive_thresholding.cpp
@@ -13,6 +13,7 @@
 #include <arrayfire.h>
 
 using namespace af;
+using std::abs;
 
 typedef enum {
     MEAN = 0,
diff --git a/examples/image_processing/brain_segmentation.cpp b/examples/image_processing/brain_segmentation.cpp
index 7349bf2..253d37e 100644
--- a/examples/image_processing/brain_segmentation.cpp
+++ b/examples/image_processing/brain_segmentation.cpp
@@ -23,10 +23,12 @@ const float h_sy_kernel[] = { -1, 0, 1,
     -2, 0, 2,
     -1, 0, 1
 };
-const float h_lp_kernel[] = { -0.5f, -1.0f, -0.5f,
-    -1.0f,  6.0f, -1.0f,
-    -0.5f, -1.0f, -0.5f
-};
+
+// Unused
+//const float h_lp_kernel[] = { -0.5f, -1.0f, -0.5f,
+//    -1.0f,  6.0f, -1.0f,
+//    -0.5f, -1.0f, -0.5f
+//};
 
 array edges_slice(array x)
 {
diff --git a/examples/image_processing/filters.cpp b/examples/image_processing/filters.cpp
index 8b75acf..ae1d7c1 100644
--- a/examples/image_processing/filters.cpp
+++ b/examples/image_processing/filters.cpp
@@ -151,7 +151,7 @@ array medianfilter(const array &in, int window_width, int window_height)
     return ret_val;
 }
 
-array gaussianblur(const array &in, int window_width, int window_height, int sigma)
+array gaussianblur(const array &in, int window_width, int window_height, double sigma)
 {
     array g = gaussianKernel(window_width, window_height, sigma, sigma);
     return convolve(in, g);
diff --git a/src/api/c/assign.cpp b/src/api/c/assign.cpp
index b8fcb12..50224d3 100644
--- a/src/api/c/assign.cpp
+++ b/src/api/c/assign.cpp
@@ -125,7 +125,7 @@ af_err af_assign_seq(af_array *out,
 
         ArrayInfo lInfo = getInfo(lhs);
 
-        if (ndims == 1 && ndims != (dim_t)lInfo.ndims()) {
+        if (ndims == 1 && ndims != lInfo.ndims()) {
             af_array tmp_in, tmp_out;
             AF_CHECK(af_flat(&tmp_in, lhs));
             AF_CHECK(af_assign_seq(&tmp_out, tmp_in, ndims, index, rhs));
diff --git a/src/api/c/index.cpp b/src/api/c/index.cpp
index b6eb8ab..2f5b06a 100644
--- a/src/api/c/index.cpp
+++ b/src/api/c/index.cpp
@@ -42,7 +42,7 @@ af_err af_index(af_array *result, const af_array in, const unsigned ndims, const
     try {
 
         ArrayInfo iInfo = getInfo(in);
-        if (ndims == 1 && ndims != (dim_t)iInfo.ndims()) {
+        if (ndims == 1 && ndims != iInfo.ndims()) {
             af_array tmp_in;
             AF_CHECK(af_flat(&tmp_in, in));
             AF_CHECK(af_index(result, tmp_in, ndims, index));
diff --git a/src/backend/opencl/kernel/ireduce.hpp b/src/backend/opencl/kernel/ireduce.hpp
index 0adc0c8..17fc460 100644
--- a/src/backend/opencl/kernel/ireduce.hpp
+++ b/src/backend/opencl/kernel/ireduce.hpp
@@ -281,6 +281,14 @@ namespace kernel
         }
     }
 
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wunused-function"
+#else
+    /* Other */
+#endif
+
     template<typename T> double cabs(const T in) { return (double)in; }
     static double cabs(const cfloat in) { return (double)abs(in); }
     static double cabs(const cdouble in) { return (double)abs(in); }
@@ -327,6 +335,12 @@ namespace kernel
         }
     };
 
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic pop
+#else
+    /* Other */
+#endif
 
     template<typename T, af_op_t op>
     T ireduce_all(uint *loc, Param in)
diff --git a/src/backend/opencl/kernel/orb.hpp b/src/backend/opencl/kernel/orb.hpp
index 871370d..69c1176 100644
--- a/src/backend/opencl/kernel/orb.hpp
+++ b/src/backend/opencl/kernel/orb.hpp
@@ -29,8 +29,24 @@ using cl::LocalSpaceArg;
 using cl::NDRange;
 using std::vector;
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#if defined(__clang__)
+    /* Clang/LLVM */
+    #pragma clang diagnostic push
+    #pragma clang diagnostic ignored "-Wsometimes-uninitialized"
+#elif defined(__ICC) || defined(__INTEL_COMPILER)
+    /* Intel ICC/ICPC */
+    // Fix the warning code here, if any
+#elif defined(__GNUC__) || defined(__GNUG__)
+    /* GNU GCC/G++ */
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#elif defined(_MSC_VER)
+    /* Microsoft Visual Studio */
+    #pragma warning( push )
+    #pragma warning( disable : 4700 )
+#else
+    /* Other */
+#endif
 
 namespace opencl
 {
@@ -505,4 +521,19 @@ void orb(unsigned* out_feat,
 } //namespace kernel
 
 } //namespace opencl
-#pragma GCC diagnostic pop
+
+#if defined(__clang__)
+    /* Clang/LLVM */
+    #pragma clang diagnostic pop
+#elif defined(__ICC) || defined(__INTEL_COMPILER)
+    /* Intel ICC/ICPC */
+    // Fix the warning code here, if any
+#elif defined(__GNUC__) || defined(__GNUG__)
+    /* GNU GCC/G++ */
+    #pragma GCC diagnostic pop
+#elif defined(_MSC_VER)
+    /* Microsoft Visual Studio */
+    #pragma warning( pop )
+#else
+    /* Other */
+#endif
diff --git a/src/backend/opencl/magma/magma_helper.cpp b/src/backend/opencl/magma/magma_helper.cpp
index 584a412..481f08c 100644
--- a/src/backend/opencl/magma/magma_helper.cpp
+++ b/src/backend/opencl/magma/magma_helper.cpp
@@ -159,6 +159,14 @@ magma_int_t magma_get_geqrf_nb<magmaDoubleComplex>( magma_int_t m )
     else                return 128;
 }
 
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wmissing-braces"
+#else
+    /* Other */
+#endif
+
 template<typename T> T magma_make(double r, double i) { return (T) r; }
 template float magma_make<float>(double r, double i);
 template double magma_make<double>(double r, double i);
@@ -172,3 +180,10 @@ template<> magmaDoubleComplex magma_make<magmaDoubleComplex>(double r, double i)
     magmaDoubleComplex tmp = {r, i};
     return tmp;
 }
+
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic pop
+#else
+    /* Other */
+#endif
diff --git a/src/backend/opencl/math.hpp b/src/backend/opencl/math.hpp
index 9292d39..f090062 100644
--- a/src/backend/opencl/math.hpp
+++ b/src/backend/opencl/math.hpp
@@ -17,6 +17,14 @@
 #include "backend.hpp"
 #include "types.hpp"
 
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic push
+    #pragma GCC diagnostic ignored "-Wunused-function"
+#else
+    /* Other */
+#endif
+
 namespace opencl
 {
 
@@ -123,3 +131,10 @@ namespace opencl
     cfloat operator *(cfloat a, cfloat b);
     cdouble operator *(cdouble a, cdouble b);
 }
+
+#if defined(__GNUC__) || defined(__GNUG__)
+    /* GCC/G++, Clang/LLVM, Intel ICC */
+    #pragma GCC diagnostic pop
+#else
+    /* Other */
+#endif
diff --git a/test/approx1.cpp b/test/approx1.cpp
index 7a6b66f..e7ea94e 100644
--- a/test/approx1.cpp
+++ b/test/approx1.cpp
@@ -23,6 +23,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/approx2.cpp b/test/approx2.cpp
index f1a1acc..75a6506 100644
--- a/test/approx2.cpp
+++ b/test/approx2.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/bilateral.cpp b/test/bilateral.cpp
index f0825e4..cde330d 100644
--- a/test/bilateral.cpp
+++ b/test/bilateral.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 template<typename T, bool isColor>
diff --git a/test/binary.cpp b/test/binary.cpp
index 4777487..91ebcbc 100644
--- a/test/binary.cpp
+++ b/test/binary.cpp
@@ -14,6 +14,7 @@
 #include <testHelpers.hpp>
 
 using namespace std;
+using std::abs;
 using namespace af;
 
 const int num = 10000;
diff --git a/test/cholesky_dense.cpp b/test/cholesky_dense.cpp
index 70548d8..7fd238d 100644
--- a/test/cholesky_dense.cpp
+++ b/test/cholesky_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/convolve.cpp b/test/convolve.cpp
index f3ff9fd..fff5ebf 100644
--- a/test/convolve.cpp
+++ b/test/convolve.cpp
@@ -17,6 +17,7 @@
 
 using std::vector;
 using std::string;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/diagonal.cpp b/test/diagonal.cpp
index c88f0fb..c4becab 100644
--- a/test/diagonal.cpp
+++ b/test/diagonal.cpp
@@ -14,6 +14,7 @@
 
 using namespace af;
 using std::vector;
+using std::abs;
 
 template<typename T>
 class Diagonal : public ::testing::Test
diff --git a/test/dot.cpp b/test/dot.cpp
index a25f59f..58cfbb2 100644
--- a/test/dot.cpp
+++ b/test/dot.cpp
@@ -18,6 +18,7 @@
 
 using std::vector;
 using std::string;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/fast.cpp b/test/fast.cpp
index a114a8f..e7df638 100644
--- a/test/fast.cpp
+++ b/test/fast.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/fft.cpp b/test/fft.cpp
index 84f0e23..48ff865 100644
--- a/test/fft.cpp
+++ b/test/fft.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/fft_real.cpp b/test/fft_real.cpp
index c8d9a55..8cd6612 100644
--- a/test/fft_real.cpp
+++ b/test/fft_real.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/fftconvolve.cpp b/test/fftconvolve.cpp
index cd82ab2..ec6a3f3 100644
--- a/test/fftconvolve.cpp
+++ b/test/fftconvolve.cpp
@@ -17,6 +17,7 @@
 
 using std::vector;
 using std::string;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/getting_started.cpp b/test/getting_started.cpp
index 12d0b6b..9d77af2 100644
--- a/test/getting_started.cpp
+++ b/test/getting_started.cpp
@@ -15,6 +15,7 @@
 
 using namespace af;
 using std::vector;
+using std::abs;
 
 TEST(GettingStarted, SNIPPET_getting_started_gen)
 {
diff --git a/test/gloh_nonfree.cpp b/test/gloh_nonfree.cpp
index a65d52a..052351a 100644
--- a/test/gloh_nonfree.cpp
+++ b/test/gloh_nonfree.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/harris.cpp b/test/harris.cpp
index 276a3e3..604e73d 100644
--- a/test/harris.cpp
+++ b/test/harris.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/histogram.cpp b/test/histogram.cpp
index f1d7af5..c83ba04 100644
--- a/test/histogram.cpp
+++ b/test/histogram.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 
 template<typename T>
 class Histogram : public ::testing::Test
diff --git a/test/homography.cpp b/test/homography.cpp
index 662b7a2..1bd2442 100644
--- a/test/homography.cpp
+++ b/test/homography.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 template<typename T>
diff --git a/test/inverse_dense.cpp b/test/inverse_dense.cpp
index b0568eb..1b990b6 100644
--- a/test/inverse_dense.cpp
+++ b/test/inverse_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/lu_dense.cpp b/test/lu_dense.cpp
index cdb23ef..0783fb3 100644
--- a/test/lu_dense.cpp
+++ b/test/lu_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/math.cpp b/test/math.cpp
index 035ca25..e286e2a 100644
--- a/test/math.cpp
+++ b/test/math.cpp
@@ -14,6 +14,7 @@
 
 using namespace std;
 using namespace af;
+using std::abs;
 
 const int num = 10000;
 const float flt_err = 1e-3;
diff --git a/test/meanshift.cpp b/test/meanshift.cpp
index 0116a5e..34b622b 100644
--- a/test/meanshift.cpp
+++ b/test/meanshift.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 template<typename T>
diff --git a/test/medfilt.cpp b/test/medfilt.cpp
index 9b45908..2e3a1fc 100644
--- a/test/medfilt.cpp
+++ b/test/medfilt.cpp
@@ -17,6 +17,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 
 template<typename T>
 class MedianFilter : public ::testing::Test
diff --git a/test/morph.cpp b/test/morph.cpp
index d9c5282..c42ddf0 100644
--- a/test/morph.cpp
+++ b/test/morph.cpp
@@ -18,6 +18,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 
 template<typename T>
 class Morph : public ::testing::Test
diff --git a/test/orb.cpp b/test/orb.cpp
index 5259366..b499fb3 100644
--- a/test/orb.cpp
+++ b/test/orb.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/qr_dense.cpp b/test/qr_dense.cpp
index 708eb5d..e380954 100644
--- a/test/qr_dense.cpp
+++ b/test/qr_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/rank_dense.cpp b/test/rank_dense.cpp
index d0a19af..7f2e76d 100644
--- a/test/rank_dense.cpp
+++ b/test/rank_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/resize.cpp b/test/resize.cpp
index 6ec4e55..e0f1ea0 100644
--- a/test/resize.cpp
+++ b/test/resize.cpp
@@ -20,6 +20,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/rotate.cpp b/test/rotate.cpp
index f97cd3a..0d4b460 100644
--- a/test/rotate.cpp
+++ b/test/rotate.cpp
@@ -20,6 +20,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/rotate_linear.cpp b/test/rotate_linear.cpp
index 29a9107..ce7a921 100644
--- a/test/rotate_linear.cpp
+++ b/test/rotate_linear.cpp
@@ -20,6 +20,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/sift_nonfree.cpp b/test/sift_nonfree.cpp
index cf1683f..45c9462 100644
--- a/test/sift_nonfree.cpp
+++ b/test/sift_nonfree.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/solve_dense.cpp b/test/solve_dense.cpp
index bbb6740..09addc7 100644
--- a/test/solve_dense.cpp
+++ b/test/solve_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/susan.cpp b/test/susan.cpp
index df806c0..591c2f0 100644
--- a/test/susan.cpp
+++ b/test/susan.cpp
@@ -20,6 +20,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::dim4;
 
 typedef struct
diff --git a/test/svd_dense.cpp b/test/svd_dense.cpp
index f7ef295..9d4060b 100644
--- a/test/svd_dense.cpp
+++ b/test/svd_dense.cpp
@@ -22,6 +22,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/transform.cpp b/test/transform.cpp
index fa0006c..1950284 100644
--- a/test/transform.cpp
+++ b/test/transform.cpp
@@ -18,6 +18,7 @@
 
 using std::vector;
 using std::string;
+using std::abs;
 using std::cout;
 using std::endl;
 
diff --git a/test/translate.cpp b/test/translate.cpp
index 5b00c04..355d30a 100644
--- a/test/translate.cpp
+++ b/test/translate.cpp
@@ -20,6 +20,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/transpose.cpp b/test/transpose.cpp
index 6be1ba4..8437a12 100644
--- a/test/transpose.cpp
+++ b/test/transpose.cpp
@@ -17,6 +17,7 @@
 
 using std::string;
 using std::vector;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 
diff --git a/test/triangle.cpp b/test/triangle.cpp
index e0b609b..6322070 100644
--- a/test/triangle.cpp
+++ b/test/triangle.cpp
@@ -23,6 +23,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 using af::dim4;
diff --git a/test/wrap.cpp b/test/wrap.cpp
index 0cc6fab..7552400 100644
--- a/test/wrap.cpp
+++ b/test/wrap.cpp
@@ -23,6 +23,7 @@ using std::vector;
 using std::string;
 using std::cout;
 using std::endl;
+using std::abs;
 using af::cfloat;
 using af::cdouble;
 

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