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

Function puzzle14

examples/gpu_puzzles/run.cpp:503–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502)";
503void puzzle14(Context &ctx) {
504 printf("\n\nPuzzle 14\n\n");
505 static constexpr size_t N = 2;
506 static constexpr size_t TPB = 3;
507 Tensor a = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data());
508 Tensor b = createTensor(ctx, {N, N}, kf32, makeData<N * N>().data());
509 Tensor output = createTensor(ctx, {N, N}, kf32);
510 struct Params {
511 uint32_t TPB = TPB;
512 uint32_t size = N;
513 };
514
515 Kernel op =
516 createKernel(ctx, {kPuzzle14, {TPB, TPB, 1}},
517 Bindings{a, b, output}, {1, 1, 1}, Params{TPB, N});
518 showResult<N, N, N>(ctx, op, output);
519}
520
521
522int main(int argc, char **argv) {

Callers

nothing calls this directly

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected