MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / hashFloat32ArrayBits

Function hashFloat32ArrayBits

src/data/createDataStore.ts:86–89  ·  view source on GitHub ↗

* Computes a stable 32-bit hash of the Float32 contents using their IEEE-754 * bit patterns (not numeric equality), to cheaply detect changes.

(data: Float32Array)

Source from the content-addressed store, hash-verified

84 * bit patterns (not numeric equality), to cheaply detect changes.
85 */
86function hashFloat32ArrayBits(data: Float32Array): number {
87 const u32 = new Uint32Array(data.buffer, data.byteOffset, data.byteLength / 4);
88 return fnv1aUpdate(0x811c9dc5, u32); // FNV-1a offset basis
89}
90
91export function createDataStore(device: GPUDevice): DataStore {
92 const series = new Map<number, SeriesEntry>();

Callers 2

setSeriesFunction · 0.85
appendSeriesFunction · 0.85

Calls 1

fnv1aUpdateFunction · 0.85

Tested by

no test coverage detected