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

Function puzzle12

examples/gpu_puzzles/key.cpp:545–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543 }
544)";
545void puzzle12(Context &ctx) {
546 printf("\n\nPuzzle 12\n\n");
547 static constexpr size_t N = 8;
548 Tensor a = createTensor(ctx, {N}, kf32, makeData<N>().data());
549 Tensor output = createTensor(ctx, {1}, kf32);
550 struct Params {
551 uint32_t size = N;
552 };
553
554 Kernel op =
555 createKernel(ctx, {kPuzzle12, {N, 1, 1}},
556 Bindings{a, output}, {1, 1, 1}, Params{N});
557 showResult<1>(ctx, op, output);
558}
559
560
561// Puzzle 13 : Axis Sum

Callers 1

mainFunction · 0.70

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected