[arrayfire] 133/248: Fix compilation fixes for VS2015

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Nov 17 15:54:16 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 52b63cf40834941eb0fd206d9737002593707fd1
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date:   Mon Oct 19 13:53:31 2015 -0400

    Fix compilation fixes for VS2015
---
 CMakeModules/build_clBLAS.cmake |  2 +-
 test/corrcoef.cpp               | 15 +++++++--------
 test/ireduce.cpp                | 13 ++++++-------
 test/stdev.cpp                  | 14 +++++++-------
 4 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/CMakeModules/build_clBLAS.cmake b/CMakeModules/build_clBLAS.cmake
index faa4151..e0e1a2d 100644
--- a/CMakeModules/build_clBLAS.cmake
+++ b/CMakeModules/build_clBLAS.cmake
@@ -14,7 +14,7 @@ ENDIF()
 ExternalProject_Add(
     clBLAS-external
     GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
-    GIT_TAG 47662a6ac1186c756508109d7fef8827efab4504
+    GIT_TAG f0aca20f2e331e9ee4667e28c27e60a11fe7d483
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""
diff --git a/test/corrcoef.cpp b/test/corrcoef.cpp
index ea537d9..62454d4 100644
--- a/test/corrcoef.cpp
+++ b/test/corrcoef.cpp
@@ -18,7 +18,6 @@
 #include <algorithm>
 #include <testHelpers.hpp>
 
-using namespace std;
 using namespace af;
 
 template<typename T>
@@ -75,21 +74,21 @@ TYPED_TEST(CorrelationCoefficient, All)
     if (noDoubleTests<TypeParam>()) return;
     if (noDoubleTests<outType>()) return;
 
-    vector<af::dim4>      numDims;
-    vector<vector<int> >       in;
-    vector<vector<float> >  tests;
+    std::vector<af::dim4>      numDims;
+    std::vector<std::vector<int> >       in;
+    std::vector<std::vector<float> >  tests;
 
-    readTestsFromFile<int,float>(string(TEST_DIR "/corrcoef/mat_10x10_scalar.test"),
+    readTestsFromFile<int,float>(std::string(TEST_DIR "/corrcoef/mat_10x10_scalar.test"),
                                  numDims, in, tests);
 
-    vector<TypeParam> input1(in[0].begin(), in[0].end());
-    vector<TypeParam> input2(in[1].begin(), in[1].end());
+    std::vector<TypeParam> input1(in[0].begin(), in[0].end());
+    std::vector<TypeParam> input2(in[1].begin(), in[1].end());
 
     array a(numDims[0], &(input1.front()));
     array b(numDims[1], &(input2.front()));
     outType c = corrcoef<outType>(a, b);
 
-    vector<outType> currGoldBar(tests[0].begin(), tests[0].end());
+    std::vector<outType> currGoldBar(tests[0].begin(), tests[0].end());
     ASSERT_NEAR(::real(currGoldBar[0]), ::real(c), 1.0e-3);
     ASSERT_NEAR(::imag(currGoldBar[0]), ::imag(c), 1.0e-3);
 }
diff --git a/test/ireduce.cpp b/test/ireduce.cpp
index aa2b66d..c0536be 100644
--- a/test/ireduce.cpp
+++ b/test/ireduce.cpp
@@ -14,7 +14,6 @@
 #include <testHelpers.hpp>
 #include <algorithm>
 
-using namespace std;
 using namespace af;
 
 
@@ -27,14 +26,14 @@ using namespace af;
         const int ny = 100;                             \
         af::array in = randu(nx, ny, dty);              \
         af::array val, idx;                             \
-        fn(val, idx, in, 0);                            \
+        af::fn(val, idx, in, 0);                        \
                                                         \
         ty *h_in = in.host<ty>();                       \
         ty *h_in_st = h_in;                             \
         ty *h_val = val.host<ty>();                     \
         uint *h_idx = idx.host<uint>();                 \
         for (int i = 0; i < ny; i++) {                  \
-            ty tmp = *fn##_element(h_in, h_in + nx);    \
+            ty tmp = *std::fn##_element(h_in, h_in +nx);\
             ASSERT_EQ(tmp, h_val[i])                    \
                 << "for index" << i;                    \
             ASSERT_EQ(h_in[h_idx[i]], tmp)              \
@@ -53,7 +52,7 @@ using namespace af;
         const int ny = 100;                             \
         af::array in = randu(nx, ny, dty);              \
         af::array val, idx;                             \
-        fn(val, idx, in, 1);                            \
+        af::fn(val, idx, in, 1);                        \
                                                         \
         ty *h_in = in.host<ty>();                       \
         ty *h_val = val.host<ty>();                     \
@@ -61,7 +60,7 @@ using namespace af;
         for (int i = 0; i < nx; i++) {                  \
             ty val = h_val[i];                          \
             for (int j= 0; j < ny; j++) {               \
-                ty tmp = fn(val, h_in[j * nx + i]);     \
+                ty tmp = std::fn(val, h_in[j * nx + i]);\
                 ASSERT_EQ(tmp, val);                    \
             }                                           \
             ASSERT_EQ(val, h_in[h_idx[i] * nx + i]);    \
@@ -78,9 +77,9 @@ using namespace af;
         af::array in = randu(num, dty);                 \
         ty val;                                         \
         uint idx;                                       \
-        fn<ty>(&val, &idx, in);                         \
+        af::fn<ty>(&val, &idx, in);                     \
         ty *h_in = in.host<ty>();                       \
-        ty tmp = *fn##_element(h_in, h_in + num);       \
+        ty tmp = *std::fn##_element(h_in, h_in + num);  \
         ASSERT_EQ(tmp, val);                            \
         ASSERT_EQ(tmp, h_in[idx]);                      \
         delete[] h_in;                                  \
diff --git a/test/stdev.cpp b/test/stdev.cpp
index b52bd72..f33d4e3 100644
--- a/test/stdev.cpp
+++ b/test/stdev.cpp
@@ -85,9 +85,9 @@ void stdevDimTest(string pFileName, dim_t dim=-1)
     af::dim4 dims = numDims[0];
     vector<T> input(in[0].begin(), in[0].end());
 
-    array a(dims, &(input.front()));
+    af::array a(dims, &(input.front()));
 
-    array b = stdev(a, dim);
+    af::array b = stdev(a, dim);
 
     vector<outType> currGoldBar(tests[0].begin(), tests[0].end());
 
@@ -127,7 +127,7 @@ TYPED_TEST(StandardDev, Dim3)
 
 TEST(StandardDev, InvalidDim)
 {
-    ASSERT_THROW(af::stdev(array(), 5), af::exception);
+    ASSERT_THROW(af::stdev(af::array(), 5), af::exception);
 }
 
 TEST(StandardDev, InvalidType)
@@ -151,10 +151,10 @@ void stdevDimIndexTest(string pFileName, dim_t dim=-1)
     af::dim4 dims = numDims[0];
     vector<T> input(in[0].begin(), in[0].end());
 
-    array a(dims, &(input.front()));
-    array b = a(seq(2,6), seq(1,7));
+    af::array a(dims, &(input.front()));
+    af::array b = a(seq(2,6), seq(1,7));
 
-    array c = stdev(b, dim);
+    af::array c = stdev(b, dim);
 
     vector<outType> currGoldBar(tests[0].begin(), tests[0].end());
 
@@ -198,7 +198,7 @@ TYPED_TEST(StandardDev, All)
     af::dim4 dims = numDims[0];
     vector<TypeParam> input(in[0].begin(), in[0].end());
 
-    array a(dims, &(input.front()));
+    af::array a(dims, &(input.front()));
     outType b = stdev<outType>(a);
 
     vector<outType> currGoldBar(tests[0].begin(), tests[0].end());

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