pub struct GpuImageCdf { /* private fields */ }Expand description
Resident inclusive u32 cumulative counts for all 256 image byte values.
Entry i counts source pixels whose selected channel is at most i.
Counts are exact, monotonically nondecreasing, and entry 255 equals
pixel_count(). This is an unnormalized CDF; no float conversion or rounding
occurs. The result owns independent 1 KiB storage and never recycles implicitly.
Implementations§
Source§impl GpuImageCdf
impl GpuImageCdf
Sourcepub const fn pixel_count(&self) -> u32
pub const fn pixel_count(&self) -> u32
Returns the source pixel count, also the final cumulative count.
Sourcepub const fn receipt(&self) -> &GpuImageReceipt
pub const fn receipt(&self) -> &GpuImageReceipt
Returns cumulative source transfers plus the 1 KiB CDF stage write.
Sourcepub fn readback_u32(
&mut self,
runtime: &WgpuRuntime,
) -> SpatialResult<[u32; 256]>
pub fn readback_u32( &mut self, runtime: &WgpuRuntime, ) -> SpatialResult<[u32; 256]>
Explicitly synchronizes and reads 1,024 cumulative-count bytes natively. Each successful call adds 1,024 bytes to the cumulative transfer receipt.
Sourcepub fn recycle(self, runtime: &WgpuRuntime)
pub fn recycle(self, runtime: &WgpuRuntime)
Returns output storage to its original runtime’s bounded buffer pool. A foreign runtime discards this result instead of receiving its storage.