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

Function puzzle12

examples/gpu_puzzles/run.cpp:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 }
418)";
419void puzzle12(Context &ctx) {
420 printf("\n\nPuzzle 12\n\n");
421 static constexpr size_t N = 8;
422 Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data());
423 Tensor output = createTensor(ctx, {1}, kf32);
424 struct Params {
425 uint32_t size = N;
426 };
427
428 Kernel op =
429 createKernel(ctx, {kPuzzle12, {N, 1, 1}},
430 Bindings{a, output}, {1, 1, 1}, Params{N});
431 showResult<1>(ctx, op, output);
432}
433
434
435// Puzzle 13 : Axis Sum

Callers

nothing calls this directly

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected