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

Function luSplitLauncher

src/backend/opencl/kernel/lu_split.hpp:28–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27template<typename T>
28void luSplitLauncher(Param lower, Param upper, const Param in, bool same_dims) {
29 constexpr unsigned TX = 32;
30 constexpr unsigned TY = 8;
31 constexpr unsigned TILEX = 128;
32 constexpr unsigned TILEY = 32;
33
34 std::array<TemplateArg, 2> targs = {
35 TemplateTypename<T>(),
36 TemplateArg(same_dims),
37 };
38 std::array<std::string, 5> options = {
39 DefineKeyValue(T, dtype_traits<T>::getName()), DefineValue(same_dims),
40 DefineKeyValue(ZERO, scalar_to_option(scalar<T>(0))),
41 DefineKeyValue(ONE, scalar_to_option(scalar<T>(1))),
42 getTypeBuildDefinition<T>()};
43
44 auto luSplit =
45 common::getKernel("luSplit", {{lu_split_cl_src}}, targs, options);
46
47 cl::NDRange local(TX, TY);
48
49 int groups_x = divup(in.info.dims[0], TILEX);
50 int groups_y = divup(in.info.dims[1], TILEY);
51
52 cl::NDRange global(groups_x * local[0] * in.info.dims[2],
53 groups_y * local[1] * in.info.dims[3]);
54
55 luSplit(cl::EnqueueArgs(getQueue(), global, local), *lower.data, lower.info,
56 *upper.data, upper.info, *in.data, in.info, groups_x, groups_y);
57 CL_DEBUG_FINISH(getQueue());
58}
59
60template<typename T>
61void luSplit(Param lower, Param upper, const Param in) {

Callers

nothing calls this directly

Calls 7

TemplateArgClass · 0.85
getNameFunction · 0.85
luSplitFunction · 0.85
EnqueueArgsClass · 0.85
scalar_to_optionFunction · 0.50
getKernelFunction · 0.50
getQueueFunction · 0.50

Tested by

no test coverage detected