MCPcopy Index your code
hub / github.com/apache/tvm / attachToBufferTable

Method attachToBufferTable

web/src/webgpu.ts:1061–1071  ·  view source on GitHub ↗
(buffer: GPUBuffer)

Source from the content-addressed store, hash-verified

1059 }
1060
1061 private attachToBufferTable(buffer: GPUBuffer): GPUPointer {
1062 if (this.bufferTableFreeId.length != 0) {
1063 const idx = this.bufferTableFreeId.pop() as number;
1064 this.bufferTable[idx] = buffer;
1065 return idx;
1066 } else {
1067 const idx = this.bufferTable.length;
1068 this.bufferTable.push(buffer);
1069 return idx;
1070 }
1071 }
1072}

Callers 1

deviceAllocDataSpaceMethod · 0.95

Calls 1

popMethod · 0.45

Tested by

no test coverage detected