MCPcopy Create free account
hub / github.com/Twinklebear/webgpu-marching-cubes / serialStreamCompactIDs

Function serialStreamCompactIDs

src/stream_compact_ids.ts:6–14  ·  view source on GitHub ↗
(
    isActiveBuffer: Uint32Array, offsetBuffer: Uint32Array, idOutputBuffer: Uint32Array)

Source from the content-addressed store, hash-verified

4
5// Serial version for validation
6export function serialStreamCompactIDs(
7 isActiveBuffer: Uint32Array, offsetBuffer: Uint32Array, idOutputBuffer: Uint32Array)
8{
9 for (let i = 0; i < isActiveBuffer.length; ++i) {
10 if (isActiveBuffer[i] != 0) {
11 idOutputBuffer[offsetBuffer[i]] = i;
12 }
13 }
14}
15
16export class StreamCompactIDs
17{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected