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

Function getCoords

tfjs-backend-webgpu/src/slice_webgpu.ts:78–86  ·  view source on GitHub ↗
(rank: number)

Source from the content-addressed store, hash-verified

76const coords = ['x', 'y', 'z', 'w', 'u', 'v'];
77
78function getCoords(rank: number): string {
79 if (rank === 1) {
80 return 'sourceLoc';
81 } else if (rank <= 6) {
82 return coords.slice(0, rank).map(coord => `sourceLoc.${coord}`).join(',');
83 } else {
84 throw Error(`Slicing for rank ${rank} is not yet supported`);
85 }
86}

Callers 1

getUserCodeMethod · 0.70

Calls 3

ErrorFunction · 0.85
joinMethod · 0.80
sliceMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…