| 102 | } |
| 103 | )"; |
| 104 | void puzzle3(Context &ctx) { |
| 105 | printf("\n\nPuzzle 3\n\n"); |
| 106 | static constexpr size_t N = 8; |
| 107 | Tensor input = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 108 | Tensor output = createTensor(ctx, {N}, kf32); |
| 109 | Kernel op = |
| 110 | createKernel(ctx, {kPuzzle3, N}, Bindings{input, output}, {1, 1, 1}); |
| 111 | showResult<N>(ctx, op, output); |
| 112 | } |
| 113 | |
| 114 | // Puzzle 4 : Map 2D |
| 115 | // Implement a kernel that adds 10 to each position of a and stores it in out. |
no test coverage detected