MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / puzzle3

Function puzzle3

examples/gpu_puzzles/run.cpp:95–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 }
94)";
95void puzzle3(Context &ctx) {
96 printf("\n\nPuzzle 3\n\n");
97 static constexpr size_t N = 8;
98 Tensor input = createTensor(ctx, {N/2}, kf32, makeData<N>().data());
99 Tensor output = createTensor(ctx, {N/2}, kf32);
100 Kernel op =
101 createKernel(ctx, {kPuzzle3, N}, Bindings{input, output}, {1, 1, 1});
102 showResult<N>(ctx, op, output);
103}
104
105// Puzzle 4 : Map 2D
106// Implement a kernel that adds 10 to each position of a and stores it in out.

Callers

nothing calls this directly

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected