MCPcopy Create free account
hub / github.com/apache/tvm / loadRawBytes

Method loadRawBytes

web/src/memory.ts:132–139  ·  view source on GitHub ↗

* Load raw bytes from ptr. * @param ptr The head address * @param numBytes The number

(ptr: Pointer, numBytes: number)

Source from the content-addressed store, hash-verified

130 * @param numBytes The number
131 */
132 loadRawBytes(ptr: Pointer, numBytes: number): Uint8Array {
133 if (this.buffer != this.memory.buffer) {
134 this.updateViews();
135 }
136 const result = new Uint8Array(numBytes);
137 result.set(this.viewU8.slice(ptr, ptr + numBytes));
138 return result;
139 }
140 /**
141 * Load null-terminated C-string from ptr.
142 * @param ptr The head address

Callers 1

deviceCopyToGPUMethod · 0.80

Calls 2

updateViewsMethod · 0.95
sliceMethod · 0.45

Tested by

no test coverage detected