histogramWGSL¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/webgpu/wgsl/gpu/histogramWGSL.ts for the most up-to-date information.
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.