| 76 | )"; |
| 77 | |
| 78 | void puzzle2(Context &ctx) { |
| 79 | printf("\n\nPuzzle 2\n\n"); |
| 80 | static constexpr size_t N = 4; |
| 81 | Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 82 | Tensor b = createTensor(ctx, {N}, kf32, makeData<N>().data()); |
| 83 | Tensor output = createTensor(ctx, {N}, kf32); |
| 84 | Kernel op = createKernel(ctx, {kPuzzle2, N}, Bindings{a, b, output}, |
| 85 | {1, 1, 1}); |
| 86 | showResult<N>(ctx, op, output); |
| 87 | } |
| 88 | |
| 89 | // Puzzle 3 : Guards |
| 90 | // Implement a kernel that adds 10 to each position of a and stores it in out. |
no test coverage detected