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

Function puzzle3

examples/gpu_puzzles/key.cpp:104–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103)";
104void puzzle3(Context &ctx) {
105 printf("\n\nPuzzle 3\n\n");
106 static constexpr size_t N = 8;
107 Tensor input = createTensor(ctx, {N}, kf32, makeData<N>().data());
108 Tensor output = createTensor(ctx, {N}, kf32);
109 Kernel op =
110 createKernel(ctx, {kPuzzle3, N}, Bindings{input, output}, {1, 1, 1});
111 showResult<N>(ctx, op, output);
112}
113
114// Puzzle 4 : Map 2D
115// Implement a kernel that adds 10 to each position of a and stores it in out.

Callers 1

mainFunction · 0.70

Calls 2

createTensorFunction · 0.85
createKernelFunction · 0.85

Tested by

no test coverage detected