MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / copyData

Function copyData

src/backend/opencl/copy.cpp:25–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template<typename T>
25void copyData(T *data, const Array<T> &src) {
26 if (src.elements() > 0) {
27 Array<T> out = src.isReady() && src.isLinear() ? src : copyArray(src);
28 // out is now guaranteed linear
29 getQueue().enqueueReadBuffer(*out.get(), CL_TRUE,
30 sizeof(T) * out.getOffset(),
31 sizeof(T) * out.elements(), data);
32 }
33}
34
35template<typename T>
36Array<T> copyArray(const Array<T> &src) {

Callers 1

solveLUFunction · 0.70

Calls 7

copyArrayFunction · 0.70
getQueueFunction · 0.50
elementsMethod · 0.45
isReadyMethod · 0.45
isLinearMethod · 0.45
getMethod · 0.45
getOffsetMethod · 0.45

Tested by

no test coverage detected