| 225 | } |
| 226 | )"; |
| 227 | void puzzle7(Context &ctx) { |
| 228 | printf("\n\nPuzzle 7\n\n"); |
| 229 | static constexpr size_t N = 5; |
| 230 | static constexpr size_t Wx = 3; |
| 231 | static constexpr size_t Wy = 3; |
| 232 | static constexpr size_t Bx = 2; |
| 233 | static constexpr size_t By = 2; |
| 234 | Tensor a = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data()); |
| 235 | Tensor output = createTensor(ctx, {N, N}, kf32); |
| 236 | struct Params { |
| 237 | uint32_t size = N; |
| 238 | }; |
| 239 | |
| 240 | Kernel op = |
| 241 | createKernel(ctx, {kPuzzle7, {Wx, Wy, 1}}, |
| 242 | Bindings{a, output}, {Bx, By, 1}, Params{N}); |
| 243 | showResult<N, N, N>(ctx, op, output); |
| 244 | } |
| 245 | |
| 246 | // Puzzle 8 : Shared |
| 247 | // Implement a kernel that adds 10 to each position of a and stores it in out. |
nothing calls this directly
no test coverage detected