MCPcopy Create free account
hub / github.com/tensorflow/tfjs / getUserCode

Method getUserCode

tfjs-backend-webgpu/src/tile_webgpu.ts:44–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 }
43
44 getUserCode(): string {
45 const sourceCoords = getSourceCoords(this.rank, 'uniforms.');
46
47 const userCode = `
48 ${main('index')} {
49 if (index < uniforms.size) {
50 let resRC = getCoordsFromIndex(index);
51 setOutputAtIndex(index, getA(${sourceCoords}));
52 }
53 }
54 `;
55 return userCode;
56 }
57}
58
59function getSourceCoords(rank: number, uniformPrefix = ''): string {

Callers

nothing calls this directly

Calls 2

getSourceCoordsFunction · 0.70
mainFunction · 0.50

Tested by

no test coverage detected