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

Function puzzle6

examples/gpu_puzzles/run.cpp:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 }
191)";
192void puzzle6(Context &ctx) {
193 printf("\n\nPuzzle 6\n\n");
194 static constexpr size_t N = 9;
195 static constexpr size_t Wx = 4;
196 static constexpr size_t Bx = 3;
197 Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data());
198 Tensor output = createTensor(ctx, {N}, kf32);
199 struct Params {
200 uint32_t size = N;
201 };
202
203 Kernel op =
204 createKernel(ctx, {kPuzzle6, {Wx, 1, 1}},
205 Bindings{a, output}, {Bx, 1, 1}, Params{N});
206 showResult<N>(ctx, op, output);
207}
208
209// Puzzle 7 : Blocks 2D
210// Implement the same kernel in 2D.

Callers

nothing calls this directly

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected