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

Function finalizeOutput

src/backend/opencl/kernel/flood_fill.hpp:53–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52template<typename T>
53void finalizeOutput(Param out, const T newValue) {
54 std::array<std::string, 5> options = {
55 DefineKeyValue(T, dtype_traits<T>::getName()), DefineValue(VALID),
56 DefineValue(ZERO), DefineKey(FINALIZE_OUTPUT),
57 getTypeBuildDefinition<T>()};
58
59 auto finalizeOut =
60 common::getKernel("finalize_output", {{flood_fill_cl_src}},
61 TemplateArgs(TemplateTypename<T>()), options);
62 cl::NDRange local(kernel::THREADS_X, kernel::THREADS_Y, 1);
63 cl::NDRange global(divup(out.info.dims[0], local[0]) * local[0],
64 divup(out.info.dims[1], local[1]) * local[1], 1);
65 finalizeOut(cl::EnqueueArgs(getQueue(), global, local), *out.data, out.info,
66 newValue);
67 CL_DEBUG_FINISH(getQueue());
68}
69
70template<typename T>
71void floodFill(Param out, const Param image, const Param seedsx,

Callers 1

floodFillFunction · 0.85

Calls 5

getNameFunction · 0.85
TemplateArgsFunction · 0.85
EnqueueArgsClass · 0.85
getKernelFunction · 0.50
getQueueFunction · 0.50

Tested by

no test coverage detected