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

Function getScalar

src/backend/opencl/copy.cpp:193–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191
192template<typename T>
193T getScalar(const Array<T> &src) {
194 T retVal{};
195 getQueue().enqueueReadBuffer(
196 *src.get(), CL_TRUE, sizeof(T) * src.getOffset(), sizeof(T), &retVal);
197 return retVal;
198}
199
200#define INSTANTIATE_GETSCALAR(T) template T getScalar(const Array<T> &in);
201

Callers

nothing calls this directly

Calls 3

getQueueFunction · 0.50
getMethod · 0.45
getOffsetMethod · 0.45

Tested by

no test coverage detected