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

Function puzzle14

examples/gpu_puzzles/key.cpp:685–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684)";
685void puzzle14(Context &ctx) {
686 printf("\n\nPuzzle 14\n\n");
687 static constexpr size_t N = 2;
688 static constexpr size_t TPB = 3;
689 Tensor a = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data());
690 Tensor b = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data());
691 Tensor output = createTensor(ctx, {N, N}, kf32);
692 struct Params {
693 uint32_t TPB = TPB;
694 uint32_t size = N;
695 };
696
697 Kernel op =
698 createKernel(ctx, {kPuzzle14, {TPB, TPB, 1}},
699 Bindings{a, b, output}, {1, 1, 1}, Params{TPB, N});
700 showResult<N, N, N>(ctx, op, output);
701}
702
703
704int main(int argc, char **argv) {

Callers 1

mainFunction · 0.70

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected