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

Function lu_split

src/backend/cuda/kernel/lu_split.hpp:25–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template<typename T>
25void lu_split(Param<T> lower, Param<T> upper, Param<T> in) {
26 constexpr unsigned TX = 32;
27 constexpr unsigned TY = 8;
28 constexpr unsigned TILEX = 128;
29 constexpr unsigned TILEY = 32;
30
31 const bool sameDims =
32 lower.dims[0] == in.dims[0] && lower.dims[1] == in.dims[1];
33
34 auto luSplit = common::getKernel(
35 "arrayfire::cuda::luSplit", {{lu_split_cuh_src}},
36 TemplateArgs(TemplateTypename<T>(), TemplateArg(sameDims)));
37
38 dim3 threads(TX, TY, 1);
39
40 int blocksPerMatX = divup(in.dims[0], TILEX);
41 int blocksPerMatY = divup(in.dims[1], TILEY);
42 dim3 blocks(blocksPerMatX * in.dims[2], blocksPerMatY * in.dims[3], 1);
43
44 EnqueueArgs qArgs(blocks, threads, getActiveStream());
45
46 luSplit(qArgs, lower, upper, in, blocksPerMatX, blocksPerMatY);
47 POST_LAUNCH_CHECK();
48}
49
50} // namespace kernel
51} // namespace cuda

Callers

nothing calls this directly

Calls 5

TemplateArgsFunction · 0.85
TemplateArgClass · 0.85
getActiveStreamFunction · 0.85
luSplitFunction · 0.85
getKernelFunction · 0.50

Tested by

no test coverage detected