[arrayfire] 84/284: Removed obselete fn of evalArray from all backends
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun Feb 7 18:59:21 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 5f2f155f01a714017e190ed9e3564c036889360d
Author: pradeep <pradeep at arrayfire.com>
Date: Thu Dec 17 19:07:37 2015 -0500
Removed obselete fn of evalArray from all backends
Array::eval is already available, thus making this function
redundant
---
src/api/c/data.cpp | 2 +-
src/api/c/moddims.cpp | 2 +-
src/backend/cpu/Array.cpp | 10 ----------
src/backend/cpu/Array.hpp | 4 ----
src/backend/cpu/where.cpp | 2 +-
src/backend/cuda/Array.cpp | 7 -------
src/backend/cuda/Array.hpp | 4 ----
src/backend/cuda/copy.cu | 2 +-
src/backend/opencl/Array.cpp | 7 -------
src/backend/opencl/Array.hpp | 4 ----
10 files changed, 4 insertions(+), 40 deletions(-)
diff --git a/src/api/c/data.cpp b/src/api/c/data.cpp
index 4d77fb2..2de2f13 100644
--- a/src/api/c/data.cpp
+++ b/src/api/c/data.cpp
@@ -594,7 +594,7 @@ af_err af_get_numdims(unsigned *nd, const af_array in)
template<typename T>
static inline void eval(af_array arr)
{
- evalArray(getArray<T>(arr));
+ getArray<T>(arr).eval();
return;
}
diff --git a/src/api/c/moddims.cpp b/src/api/c/moddims.cpp
index bb156ff..4b7a179 100644
--- a/src/api/c/moddims.cpp
+++ b/src/api/c/moddims.cpp
@@ -23,7 +23,7 @@ template<typename T>
Array<T> modDims(const Array<T>& in, const af::dim4 &newDims)
{
//FIXME: Figure out a better way
- evalArray<T>(in);
+ in.eval();
Array<T> Out = in;
diff --git a/src/backend/cpu/Array.cpp b/src/backend/cpu/Array.cpp
index 9c15bc4..64fca1a 100644
--- a/src/backend/cpu/Array.cpp
+++ b/src/backend/cpu/Array.cpp
@@ -181,7 +181,6 @@ createEmptyArray(const dim4 &size)
template<typename T>
Array<T> *initArray() { return new Array<T>(dim4(0, 0, 0, 0)); }
-
template<typename T>
Array<T>
createNodeArray(const dim4 &dims, Node_ptr node)
@@ -203,7 +202,6 @@ createNodeArray(const dim4 &dims, Node_ptr node)
return out;
}
-
template<typename T>
Array<T> createSubArray(const Array<T>& parent,
const std::vector<af_seq> &index,
@@ -240,13 +238,6 @@ destroyArray(Array<T> *A)
delete A;
}
-
-template<typename T>
-void evalArray(const Array<T> &A)
-{
- A.eval();
-}
-
template<typename T>
void
writeHostDataArray(Array<T> &arr, const T * const data, const size_t bytes)
@@ -277,7 +268,6 @@ writeDeviceDataArray(Array<T> &arr, const void * const data, const size_t bytes)
const std::vector<af_seq> &index, \
bool copy); \
template void destroyArray<T> (Array<T> *A); \
- template void evalArray<T> (const Array<T> &A); \
template Array<T> createNodeArray<T> (const dim4 &size, TNJ::Node_ptr node); \
template void Array<T>::eval(); \
template void Array<T>::eval() const; \
diff --git a/src/backend/cpu/Array.hpp b/src/backend/cpu/Array.hpp
index 2b9cbb4..ece989e 100644
--- a/src/backend/cpu/Array.hpp
+++ b/src/backend/cpu/Array.hpp
@@ -65,9 +65,6 @@ namespace cpu
const std::vector<af_seq> &index,
bool copy=true);
- template<typename T>
- void evalArray(const Array<T> &A);
-
// Creates a new Array object on the heap and returns a reference to it.
template<typename T>
void destroyArray(Array<T> *A);
@@ -208,7 +205,6 @@ namespace cpu
bool copy);
friend void destroyArray<T>(Array<T> *arr);
- friend void evalArray<T>(const Array<T> &arr);
friend void *getDevicePtr<T>(const Array<T>& arr);
};
diff --git a/src/backend/cpu/where.cpp b/src/backend/cpu/where.cpp
index 441c7ff..018cbdf 100644
--- a/src/backend/cpu/where.cpp
+++ b/src/backend/cpu/where.cpp
@@ -27,7 +27,7 @@ namespace cpu
template<typename T>
Array<uint> where(const Array<T> &in)
{
- evalArray(in);
+ in.eval();
getQueue().sync();
const dim_t *dims = in.dims().get();
diff --git a/src/backend/cuda/Array.cpp b/src/backend/cuda/Array.cpp
index 275ea13..39cd06c 100644
--- a/src/backend/cuda/Array.cpp
+++ b/src/backend/cuda/Array.cpp
@@ -229,12 +229,6 @@ namespace cuda
}
template<typename T>
- void evalArray(const Array<T> &A)
- {
- A.eval();
- }
-
- template<typename T>
void
writeHostDataArray(Array<T> &arr, const T * const data, const size_t bytes)
{
@@ -279,7 +273,6 @@ namespace cuda
const std::vector<af_seq> &index, \
bool copy); \
template void destroyArray<T> (Array<T> *A); \
- template void evalArray<T> (const Array<T> &A); \
template Array<T> createNodeArray<T> (const dim4 &size, JIT::Node_ptr node); \
template Array<T>::Array(af::dim4 dims, const T * const in_data, \
bool is_device, bool copy_device); \
diff --git a/src/backend/cuda/Array.hpp b/src/backend/cuda/Array.hpp
index 598fdfd..638b745 100644
--- a/src/backend/cuda/Array.hpp
+++ b/src/backend/cuda/Array.hpp
@@ -78,9 +78,6 @@ namespace cuda
const std::vector<af_seq> &index,
bool copy=true);
- template<typename T>
- void evalArray(const Array<T> &A);
-
// Creates a new Array object on the heap and returns a reference to it.
template<typename T>
void destroyArray(Array<T> *A);
@@ -234,7 +231,6 @@ namespace cuda
bool copy);
friend void destroyArray<T>(Array<T> *arr);
- friend void evalArray<T>(const Array<T> &arr);
friend void *getDevicePtr<T>(const Array<T>& arr);
};
diff --git a/src/backend/cuda/copy.cu b/src/backend/cuda/copy.cu
index 90f9970..71893b8 100644
--- a/src/backend/cuda/copy.cu
+++ b/src/backend/cuda/copy.cu
@@ -23,7 +23,7 @@ namespace cuda
void copyData(T *data, const Array<T> &A)
{
// FIXME: Merge this with copyArray
- evalArray(A);
+ A.eval();
Array<T> out = A;
const T *ptr = NULL;
diff --git a/src/backend/opencl/Array.cpp b/src/backend/opencl/Array.cpp
index 0860098..207a4b0 100644
--- a/src/backend/opencl/Array.cpp
+++ b/src/backend/opencl/Array.cpp
@@ -259,12 +259,6 @@ namespace opencl
}
template<typename T>
- void evalArray(const Array<T> &A)
- {
- A.eval();
- }
-
- template<typename T>
void
writeHostDataArray(Array<T> &arr, const T * const data, const size_t bytes)
{
@@ -312,7 +306,6 @@ namespace opencl
const std::vector<af_seq> &index, \
bool copy); \
template void destroyArray<T> (Array<T> *A); \
- template void evalArray<T> (const Array<T> &A); \
template Array<T> createNodeArray<T> (const dim4 &size, JIT::Node_ptr node); \
template Array<T>::Array(af::dim4 dims, cl_mem mem, size_t src_offset, bool copy); \
template Array<T>::~Array (); \
diff --git a/src/backend/opencl/Array.hpp b/src/backend/opencl/Array.hpp
index 1db0ab6..5f86d6d 100644
--- a/src/backend/opencl/Array.hpp
+++ b/src/backend/opencl/Array.hpp
@@ -69,9 +69,6 @@ namespace opencl
const std::vector<af_seq> &index,
bool copy=true);
- template<typename T>
- void evalArray(const Array<T> &A);
-
// Creates a new Array object on the heap and returns a reference to it.
template<typename T>
void destroyArray(Array<T> *A);
@@ -226,7 +223,6 @@ namespace opencl
bool copy);
friend void destroyArray<T>(Array<T> *arr);
- friend void evalArray<T>(const Array<T> &arr);
friend void *getDevicePtr<T>(const Array<T>& arr);
};
--
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