| 154 | } |
| 155 | )"; |
| 156 | void puzzle5(Context &ctx) { |
| 157 | printf("\n\nPuzzle 5\n\n"); |
| 158 | static constexpr size_t N = 2; |
| 159 | static constexpr size_t Wx = 3; |
| 160 | static constexpr size_t Wy = 3; |
| 161 | Tensor a = createTensor(ctx, {N, 1}, kf32, makeData<N>().data()); |
| 162 | Tensor b = createTensor(ctx, {1, N}, kf32, makeData<N>().data()); |
| 163 | Tensor output = createTensor(ctx, {N, N}, kf32); |
| 164 | struct Params { |
| 165 | uint32_t size = N; |
| 166 | }; |
| 167 | |
| 168 | Kernel op = |
| 169 | createKernel(ctx, {kPuzzle5, /*workgroup size*/ {Wx, Wy, 1}}, |
| 170 | Bindings{a, b, output}, {1, 1, 1}, Params{N}); |
| 171 | showResult<N, N, N>(ctx, op, output); |
| 172 | } |
| 173 | |
| 174 | // Puzzle 6 : Blocks |
| 175 | // Implement a kernel that adds 10 to each position of a and stores it in out. |
nothing calls this directly
no test coverage detected