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

Function createTranspose1

examples/transpose/run.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29)";
30
31inline KernelCode createTranspose1(const char *shaderTemplate,
32 const size_t M, const size_t N,
33 const Shape &workgroupSize = {256, 1, 1},
34 NumType precision = kf32) {
35 std::string codeString(shaderTemplate);
36 replaceAll(codeString, {{"{{workgroupSize}}", toString(workgroupSize)},
37 {"{{precision}}", toString(precision)},
38 {"{{M}}", toString(M)},
39 {"{{N}}", toString(N)}});
40 return {codeString, workgroupSize};
41}
42
43// Shared memory cache-blocking
44static const char *kShaderTranspose2 = R"(

Callers 1

selectTransposeFunction · 0.85

Calls 2

replaceAllFunction · 0.85
toStringFunction · 0.50

Tested by

no test coverage detected