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

Method checkLittleEndian

web/src/rpc_server.ts:426–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

424 }
425
426 private checkLittleEndian(): void {
427 const a = new ArrayBuffer(4);
428 const b = new Uint8Array(a);
429 const c = new Uint32Array(a);
430 b[0] = 0x11;
431 b[1] = 0x22;
432 b[2] = 0x33;
433 b[3] = 0x44;
434 assert(c[0] === 0x44332211, "RPCServer little endian to work");
435 }
436
437 private requestBytes(nbytes: number): void {
438 this.pendingBytes += nbytes;

Callers 1

constructorMethod · 0.95

Calls 1

assertFunction · 0.90

Tested by

no test coverage detected