pub enum RudaCount {
Static(u32, u32, u32),
Dynamic(Binding),
}Expand description
Specifieds the number of rudas 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 rudas.
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 RudaCount
impl RudaCount
Sourcepub fn new_single() -> RudaCount
pub fn new_single() -> RudaCount
Create a new static ruda count with the given x = y = z = 1.
Sourcepub fn new_1d(x: u32) -> RudaCount
pub fn new_1d(x: u32) -> RudaCount
Create a new static ruda count with the given x, and y = z = 1.
Sourcepub fn new_2d(x: u32, y: u32) -> RudaCount
pub fn new_2d(x: u32, y: u32) -> RudaCount
Create a new static ruda count with the given x and y, and z = 1.
Trait Implementations§
Source§impl From<RudaCountSelection> for RudaCount
impl From<RudaCountSelection> for RudaCount
Source§fn from(value: RudaCountSelection) -> RudaCount
fn from(value: RudaCountSelection) -> RudaCount
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for RudaCount
impl !UnwindSafe for RudaCount
impl Freeze for RudaCount
impl Send for RudaCount
impl Sync for RudaCount
impl Unpin for RudaCount
impl UnsafeUnpin for RudaCount
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