pub struct ResamplingKernel { /* private fields */ }Expand description
GPU kernel for resampling operations.
Implementations§
Source§impl ResamplingKernel
impl ResamplingKernel
Sourcepub fn new(context: &GpuContext, method: ResamplingMethod) -> GpuResult<Self>
pub fn new(context: &GpuContext, method: ResamplingMethod) -> GpuResult<Self>
Create a new resampling kernel.
The workgroup size is taken from context.tuner.raster_2d so it
automatically adapts to low-end and high-end GPUs.
§Errors
Returns an error if shader compilation or pipeline creation fails,
or if method parameters are out of valid range.
Sourcepub fn new_with_workgroup_size(
context: &GpuContext,
method: ResamplingMethod,
workgroup_size: (u32, u32),
) -> GpuResult<Self>
pub fn new_with_workgroup_size( context: &GpuContext, method: ResamplingMethod, workgroup_size: (u32, u32), ) -> GpuResult<Self>
Create a new resampling kernel with an explicit workgroup size.
Prefer ResamplingKernel::new which derives the size from the
context’s tuner automatically.
§Errors
Returns an error if shader compilation or pipeline creation fails,
or if method parameters are out of valid range.
Auto Trait Implementations§
impl !RefUnwindSafe for ResamplingKernel
impl !UnwindSafe for ResamplingKernel
impl Freeze for ResamplingKernel
impl Send for ResamplingKernel
impl Sync for ResamplingKernel
impl Unpin for ResamplingKernel
impl UnsafeUnpin for ResamplingKernel
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