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§
Source§impl From<CubeCountSelection> for CubeCount
impl From<CubeCountSelection> for CubeCount
Source§fn from(value: CubeCountSelection) -> CubeCount
fn from(value: CubeCountSelection) -> CubeCount
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 UnwindSafe for CubeCount
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)