| 255 | } |
| 256 | )"; |
| 257 | void puzzle7(Context &ctx) { |
| 258 | printf("\n\nPuzzle 7\n\n"); |
| 259 | static constexpr size_t N = 5; |
| 260 | static constexpr size_t Wx = 3; |
| 261 | static constexpr size_t Wy = 3; |
| 262 | static constexpr size_t Bx = 2; |
| 263 | static constexpr size_t By = 2; |
| 264 | Tensor a = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data()); |
| 265 | Tensor output = createTensor(ctx, {N, N}, kf32); |
| 266 | struct Params { |
| 267 | uint32_t size = N; |
| 268 | }; |
| 269 | |
| 270 | Kernel op = |
| 271 | createKernel(ctx, {kPuzzle7, {Wx, Wy, 1}}, |
| 272 | Bindings{a, output}, {Bx, By, 1}, Params{N}); |
| 273 | showResult<N, N, N>(ctx, op, output); |
| 274 | } |
| 275 | |
| 276 | // Puzzle 8 : Shared |
| 277 | // Implement a kernel that adds 10 to each position of a and stores it in out. |
no test coverage detected