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

Function getDevicePtr

src/backend/opencl/Array.cpp:426–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424
425template<typename T>
426void *getDevicePtr(const Array<T> &arr) {
427 const cl::Buffer *buf = arr.device();
428 if (!buf) { return NULL; }
429 memLock(buf);
430 cl_mem mem = (*buf)();
431 return (void *)mem;
432}
433
434template<typename T>
435Array<T> createNodeArray(const dim4 &dims, Node_ptr node) {

Callers

nothing calls this directly

Calls 2

memLockFunction · 0.70
deviceMethod · 0.45

Tested by

no test coverage detected