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() -> Self
pub fn new_single() -> Self
Create a new static cube count with the given x = y = z = 1.
Sourcepub fn new_2d(x: u32, y: u32) -> Self
pub fn new_2d(x: u32, y: u32) -> Self
Create a new static cube count with the given x and y, and z = 1.
Trait Implementations§
Source§impl From<CubeCountSelection> for CubeCount
impl From<CubeCountSelection> for CubeCount
Source§fn from(value: CubeCountSelection) -> Self
fn from(value: CubeCountSelection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CubeCount
impl !RefUnwindSafe for CubeCount
impl Send for CubeCount
impl Sync for CubeCount
impl Unpin for CubeCount
impl UnsafeUnpin 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