Skip to content

ParallelRasterInitialClip

Overview

We do the following:

  1. Binary clip each RasterEdge into two RasterEdgeClips (one for each side of the split)
  2. Take these, do a segmented parallel reduction, and
  3. During reduction, store associated data to the RasterClippedChunks (precisely when we have reduced all of the edges for a particular chunk)

NOTE: The reduction is also completed in ParallelRasterChunkReduce, so if changing this file, please check there too

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class ParallelRasterInitialClip

import { ParallelRasterInitialClip } from 'scenerystack/alpenglow';

Static Methods

dispatch( workgroupSize : number, chunks : ParallelStorageArray<RasterChunk>, edges : ParallelStorageArray<RasterEdge>, numEdges : number, clippedChunks : ParallelStorageArray<RasterClippedChunk>, edgeClips : ParallelStorageArray<RasterEdgeClip>, chunkReduces : ParallelStorageArray<RasterChunkReduceQuad>, debugFullChunkReduces : ParallelStorageArray<RasterChunkReducePair> ) : Promise<void>

validate( workgroupSize : number, chunks : ParallelStorageArray<RasterChunk>, edges : ParallelStorageArray<RasterEdge>, numEdges : number, clippedChunks : ParallelStorageArray<RasterClippedChunk>, edgeClips : ParallelStorageArray<RasterEdgeClip>, chunkReduces : ParallelStorageArray<RasterChunkReduceQuad>, debugFullChunkReduces : ParallelStorageArray<{ min: RasterChunkReduceData; max: RasterChunkReduceData }> )

Source Code

See the source for ParallelRasterInitialClip.ts in the alpenglow repository.