pub struct HistogramKernel { /* private fields */ }Expand description
GPU kernel for histogram computation.
Implementations§
Source§impl HistogramKernel
impl HistogramKernel
Sourcepub fn new(context: &GpuContext) -> GpuResult<Self>
pub fn new(context: &GpuContext) -> GpuResult<Self>
Create a new histogram kernel.
§Errors
Returns an error if shader compilation or pipeline creation fails.
Sourcepub async fn execute<T: Pod>(
&self,
input: &GpuBuffer<T>,
params: HistogramParams,
) -> GpuResult<Vec<u32>>
pub async fn execute<T: Pod>( &self, input: &GpuBuffer<T>, params: HistogramParams, ) -> GpuResult<Vec<u32>>
Sourcepub fn execute_blocking<T: Pod>(
&self,
input: &GpuBuffer<T>,
params: HistogramParams,
) -> GpuResult<Vec<u32>>
pub fn execute_blocking<T: Pod>( &self, input: &GpuBuffer<T>, params: HistogramParams, ) -> GpuResult<Vec<u32>>
Auto Trait Implementations§
impl Freeze for HistogramKernel
impl !RefUnwindSafe for HistogramKernel
impl Send for HistogramKernel
impl Sync for HistogramKernel
impl Unpin for HistogramKernel
impl UnsafeUnpin for HistogramKernel
impl !UnwindSafe for HistogramKernel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more