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

Function convolve_nd

src/backend/opencl/kernel/convolve.hpp:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 */
33template<typename T, typename accType>
34void convolve_nd(Param out, const Param signal, const Param filter,
35 AF_BATCH_KIND kind, const int rank, const bool expand) {
36 conv_kparam_t param;
37
38 for (int i = 0; i < 3; ++i) {
39 param.o[i] = 0;
40 param.s[i] = 0;
41 }
42 param.launchMoreBlocks = kind == AF_BATCH_SAME || kind == AF_BATCH_RHS;
43 param.outHasNoOffset = kind == AF_BATCH_LHS || kind == AF_BATCH_NONE;
44 param.inHasNoOffset = kind != AF_BATCH_SAME;
45
46 prepareKernelArgs<T>(param, out.info.dims, filter.info.dims, rank);
47
48 switch (rank) {
49 case 1: conv1<T, accType>(param, out, signal, filter, expand); break;
50 case 2: conv2<T, accType>(param, out, signal, filter, expand); break;
51 case 3: conv3<T, accType>(param, out, signal, filter, expand); break;
52 }
53
54 CL_DEBUG_FINISH(getQueue());
55 bufferFree(param.impulse);
56}
57
58} // namespace kernel
59

Callers

nothing calls this directly

Calls 2

bufferFreeFunction · 0.85
getQueueFunction · 0.50

Tested by

no test coverage detected