histogramWGSL¶
Overview¶
Calculates a histogram in shared (workgroup) memory by using atomics
@author Jonathan Olson <jonathan.olson@colorado.edu>
Type histogramWGSLOptions¶
- histogramScratch: WGSLVariableName
var<workgroup> array<atomic<u32>, numBins> // TODO: can we actually get memory-compacted histograms here, instead of using a full u32? - getBin: ( index: WGSLExpressionU32 ) => WGSLExpressionU32
- & StrictOmit<coalescedLoopWGSLOptions, "callback">
Source Code¶
See the source for histogramWGSL.ts in the alpenglow repository.