Add OCL copy functions

This commit is contained in:
Tom Deakin 2016-04-28 15:11:02 +01:00
parent b514969193
commit 088778977b

View File

@ -123,14 +123,17 @@ void OCLStream<T>::triad()
template <class T> template <class T>
void OCLStream<T>::write_arrays(const std::vector<T>& a, const std::vector<T>& b, const std::vector<T>& c) void OCLStream<T>::write_arrays(const std::vector<T>& a, const std::vector<T>& b, const std::vector<T>& c)
{ {
cl::copy(a.begin(), a.end(), d_a);
return; cl::copy(b.begin(), b.end(), d_b);
cl::copy(c.begin(), c.end(), d_c);
} }
template <class T> template <class T>
void OCLStream<T>::read_arrays(std::vector<T>& a, std::vector<T>& b, std::vector<T>& c) void OCLStream<T>::read_arrays(std::vector<T>& a, std::vector<T>& b, std::vector<T>& c)
{ {
return; cl::copy(d_a, a.begin(), a.end());
cl::copy(d_b, b.begin(), b.end());
cl::copy(d_c, c.begin(), c.end());
} }