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

Function scanDimLauncher

src/backend/opencl/kernel/scan_dim.hpp:66–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65template<typename Ti, typename To, af_op_t op>
66static void scanDimLauncher(Param out, Param tmp, const Param in, int dim,
67 bool isFinalPass, uint threads_y,
68 const uint groups_all[4], bool inclusiveScan) {
69 using cl::EnqueueArgs;
70 using cl::NDRange;
71
72 auto scan = getScanDimKernel<Ti, To, op>("scanDim", dim, isFinalPass,
73 threads_y, inclusiveScan);
74
75 NDRange local(THREADS_X, threads_y);
76 NDRange global(groups_all[0] * groups_all[2] * local[0],
77 groups_all[1] * groups_all[3] * local[1]);
78
79 uint lim = divup(out.info.dims[dim], (threads_y * groups_all[dim]));
80
81 scan(EnqueueArgs(getQueue(), global, local), *out.data, out.info, *tmp.data,
82 tmp.info, *in.data, in.info, groups_all[0], groups_all[1],
83 groups_all[dim], lim);
84 CL_DEBUG_FINISH(getQueue());
85}
86
87template<typename Ti, typename To, af_op_t op>
88static void bcastDimLauncher(Param out, Param tmp, int dim, bool isFinalPass,

Callers

nothing calls this directly

Calls 3

EnqueueArgsClass · 0.85
scanFunction · 0.50
getQueueFunction · 0.50

Tested by

no test coverage detected