| 26 | |
| 27 | template<typename T> |
| 28 | void 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 | |
| 60 | template<typename T> |
| 61 | void luSplit(Param lower, Param upper, const Param in) { |
nothing calls this directly
no test coverage detected