pub enum CubeCount {
Static(u32, u32, u32),
Dynamic(Binding),
}
Expand description
Specifieds the number of cubes to be dispatched for a kernel.
This translates to eg. a grid for CUDA, or to num_workgroups for wgsl.
Variants§
Static(u32, u32, u32)
Dispatch a known count of x, y, z cubes.
Dynamic(Binding)
Dispatch an amount based on the values in this buffer. The buffer should contain a u32 array [x, y, z].
Implementations§
Source§impl CubeCount
impl CubeCount
Sourcepub fn new_single() -> CubeCount
pub fn new_single() -> CubeCount
Create a new static cube count with the given x = y = z = 1.
Sourcepub fn new_1d(x: u32) -> CubeCount
pub fn new_1d(x: u32) -> CubeCount
Create a new static cube count with the given x, and y = z = 1.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CubeCount
impl RefUnwindSafe for CubeCount
impl Send for CubeCount
impl Sync for CubeCount
impl Unpin for CubeCount
impl UnwindSafe for CubeCount
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