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

Method getUserCode

tfjs-backend-webgpu/src/unary_op_webgpu.ts:48–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 getUserCode(): string {
49 return `
50 fn unaryOperation(a : f32) -> f32 {
51 ${getUnaryOpString(this.op, false)}
52 }
53 ${main('index')} {
54 if (index < uniforms.size) {
55 let a = getAByOutputIndex(index);
56 setOutputAtIndex(index, unaryOperation(a));
57 }
58 }
59 `;
60 }
61}

Callers

nothing calls this directly

Calls 2

getUnaryOpStringFunction · 0.90
mainFunction · 0.50

Tested by

no test coverage detected