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

Function encodeInt32ArrayAsInt64

tfjs-node/src/int64_tensors.ts:90–102  ·  view source on GitHub ↗
(value: Int32Array)

Source from the content-addressed store, hash-verified

88 * tensor through binding.
89 */
90export function encodeInt32ArrayAsInt64(value: Int32Array): Int32Array {
91 if (endianness() !== 'LE') {
92 throw new Error(
93 `Int64Scalar does not support endianness of this machine: ` +
94 `${endianness()}`);
95 }
96
97 const buffer = new Int32Array(value.length * 2);
98 for (let i = 0; i < value.length; i++) {
99 buffer[i * 2] = value[i];
100 }
101 return buffer;
102}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…