pub struct WorkgroupOptimizer { /* private fields */ }Expand description
Workgroup size optimizer
Automatically calculates optimal workgroup sizes based on data dimensions and GPU capabilities.
Implementations§
Source§impl WorkgroupOptimizer
impl WorkgroupOptimizer
Sourcepub fn optimize_1d(&self, data_size: usize) -> u32
pub fn optimize_1d(&self, data_size: usize) -> u32
Calculate optimal workgroup size for 1D data
Sourcepub fn optimize_2d(&self, width: usize, height: usize) -> (u32, u32)
pub fn optimize_2d(&self, width: usize, height: usize) -> (u32, u32)
Calculate optimal workgroup size for 2D data
Sourcepub fn optimize_3d(
&self,
width: usize,
height: usize,
depth: usize,
) -> (u32, u32, u32)
pub fn optimize_3d( &self, width: usize, height: usize, depth: usize, ) -> (u32, u32, u32)
Calculate optimal workgroup size for 3D data
Sourcepub fn max_workgroup_size(&self) -> u32
pub fn max_workgroup_size(&self) -> u32
Get maximum workgroup size
Trait Implementations§
Source§impl Clone for WorkgroupOptimizer
impl Clone for WorkgroupOptimizer
Source§fn clone(&self) -> WorkgroupOptimizer
fn clone(&self) -> WorkgroupOptimizer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkgroupOptimizer
impl Debug for WorkgroupOptimizer
Source§impl Default for WorkgroupOptimizer
impl Default for WorkgroupOptimizer
impl Copy for WorkgroupOptimizer
Auto Trait Implementations§
impl Freeze for WorkgroupOptimizer
impl RefUnwindSafe for WorkgroupOptimizer
impl Send for WorkgroupOptimizer
impl Sync for WorkgroupOptimizer
impl Unpin for WorkgroupOptimizer
impl UnsafeUnpin for WorkgroupOptimizer
impl UnwindSafe for WorkgroupOptimizer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more