Enum CubeCount
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§
§impl CubeCount
impl CubeCount
pub fn new_single() -> CubeCount
pub fn new_single() -> CubeCount
Create a new static cube count with the given x = y = z = 1.
pub fn new_2d(x: u32, y: u32) -> CubeCount
pub fn new_2d(x: u32, y: u32) -> CubeCount
Create a new static cube count with the given x and y, and z = 1.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CubeCount
impl !UnwindSafe for CubeCount
impl Freeze for CubeCount
impl Send for CubeCount
impl Sync for CubeCount
impl Unpin for CubeCount
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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