pub fn histogram_u8_gpu(
runtime: &WgpuRuntime,
source: &GpuImage,
channel: u32,
) -> SpatialResult<GpuImageHistogram>Expand description
Counts one logical channel (0..source.channels()) without leaving the GPU.
Uses at most 256 workgroups, 256 KiB private pooled partials and a 1 KiB
resident output. Every scratch/output bin is overwritten before reuse.
Images with 4..=8 Mi pixels use eight local counter replicas when shared
memory permits; other calls retain the original kernel.
Apply rgb_to_gray_gpu first when a luma histogram is desired.