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

Method constructor

tfjs-backend-webgpu/src/slice_webgpu.ts:34–45  ·  view source on GitHub ↗
(start: number[], destSize: number[])

Source from the content-addressed store, hash-verified

32 size = true;
33
34 constructor(start: number[], destSize: number[]) {
35 this.outputShape = destSize;
36 this.rank = destSize.length;
37 this.dispatchLayout = flatDispatchLayout(this.outputShape);
38 this.dispatch = computeDispatch(
39 this.dispatchLayout, this.outputShape, this.workgroupSize,
40 [this.workPerThread, 1, 1]);
41
42 this.start = start;
43 this.uniforms = `start : ${getCoordsDataType(start.length)}, `;
44 this.shaderKey = 'slice';
45 }
46
47 getUserCode(): string {
48 const dtype = getCoordsDataType(this.rank);

Callers

nothing calls this directly

Calls 3

flatDispatchLayoutFunction · 0.90
computeDispatchFunction · 0.90
getCoordsDataTypeFunction · 0.90

Tested by

no test coverage detected