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

Function getMainHeaderString

tfjs-backend-webgpu/src/webgpu_program.ts:151–168  ·  view source on GitHub ↗
(...params: string[])

Source from the content-addressed store, hash-verified

149export function getMainHeaderString(): string;
150export function getMainHeaderString(index: string): string;
151export function getMainHeaderString(...params: string[]): string {
152 let snippet: string;
153 switch (params.length) {
154 case 0:
155 snippet = `
156 fn main()
157 `;
158 break;
159 case 1:
160 snippet = `
161 fn main(${params[0]} : i32)
162 `;
163 break;
164 default:
165 throw Error('Unreachable');
166 }
167 return snippet;
168}
169
170export function getStartHeaderString(
171 useGlobalIndex: boolean, program: WebGPUProgram): string {

Callers

nothing calls this directly

Calls 1

ErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…