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

Function getOffset

src/backend/oneapi/kernel/select.hpp:31–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29constexpr int REPEAT = 64;
30
31int getOffset(const dim_t *dims, const dim_t *strides, const dim_t *refdims,
32 int ids[4]) {
33 int off = 0;
34 off += ids[3] * (dims[3] == refdims[3]) * strides[3];
35 off += ids[2] * (dims[2] == refdims[2]) * strides[2];
36 off += ids[1] * (dims[1] == refdims[1]) * strides[1];
37 return off;
38}
39
40template<typename T>
41class selectKernelCreateKernel {

Callers 13

operator()Method · 0.70
operator()Method · 0.70
getBufferWithOffsetMethod · 0.50
ArrayClass · 0.50
deviceMethod · 0.50
ArrayClass · 0.50
getMappedPtrMethod · 0.50
deviceMethod · 0.50
getMethod · 0.50
deviceMethod · 0.50
getNodeMethod · 0.50
getMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected