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

Function scanFirstLauncher

src/backend/opencl/kernel/scan_first.hpp:67–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66template<typename Ti, typename To, af_op_t op>
67static void scanFirstLauncher(Param &out, Param &tmp, const Param &in,
68 const bool isFinalPass, const uint groups_x,
69 const uint groups_y, const uint threads_x,
70 const bool inclusiveScan = true) {
71 using cl::EnqueueArgs;
72 using cl::NDRange;
73
74 auto scan = getScanFirstKernel<Ti, To, op>("scanFirst", isFinalPass,
75 threads_x, inclusiveScan);
76
77 NDRange local(threads_x, THREADS_PER_GROUP / threads_x);
78 NDRange global(groups_x * out.info.dims[2] * local[0],
79 groups_y * out.info.dims[3] * local[1]);
80
81 uint lim = divup(out.info.dims[0], (threads_x * groups_x));
82
83 scan(EnqueueArgs(getQueue(), global, local), *out.data, out.info, *tmp.data,
84 tmp.info, *in.data, in.info, groups_x, groups_y, lim);
85 CL_DEBUG_FINISH(getQueue());
86}
87
88template<typename Ti, typename To, af_op_t op>
89static void bcastFirstLauncher(Param &out, Param &tmp, const bool isFinalPass,

Callers

nothing calls this directly

Calls 3

EnqueueArgsClass · 0.85
scanFunction · 0.50
getQueueFunction · 0.50

Tested by

no test coverage detected