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

Function susan_responses

src/backend/cuda/kernel/susan.hpp:26–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25template<typename T>
26void susan_responses(T* out, const T* in, const unsigned idim0,
27 const unsigned idim1, const int radius, const float t,
28 const float g, const unsigned edge) {
29 auto susan =
30 common::getKernel("arrayfire::cuda::susan", {{susan_cuh_src}},
31 TemplateArgs(TemplateTypename<T>()),
32 {{DefineValue(BLOCK_X), DefineValue(BLOCK_Y)}});
33
34 dim3 threads(BLOCK_X, BLOCK_Y);
35 dim3 blocks(divup(idim0 - edge * 2, BLOCK_X),
36 divup(idim1 - edge * 2, BLOCK_Y));
37 const size_t SMEM_SIZE =
38 (BLOCK_X + 2 * radius) * (BLOCK_Y + 2 * radius) * sizeof(T);
39
40 EnqueueArgs qArgs(blocks, threads, getActiveStream(), SMEM_SIZE);
41
42 susan(qArgs, out, in, idim0, idim1, radius, t, g, edge);
43 POST_LAUNCH_CHECK();
44}
45
46template<typename T>
47void nonMaximal(float* x_out, float* y_out, float* resp_out, unsigned* count,

Callers

nothing calls this directly

Calls 4

TemplateArgsFunction · 0.85
getActiveStreamFunction · 0.85
getKernelFunction · 0.50
susanFunction · 0.50

Tested by

no test coverage detected