pub enum GridSpec {
Fixed(Dim3),
DataDependent {
param_index: u32,
},
ThreadDependent,
}Expand description
Specifies how child kernel grid dimensions are determined.
Device-side kernel launches can use fixed grid sizes, data-dependent sizes derived from kernel parameters, or per-thread launches.
Variants§
Fixed(Dim3)
A constant grid size known at code generation time.
DataDependent
Grid size derived from a kernel parameter at runtime.
The param_index identifies which parameter of the parent kernel
contains the element count. The generated PTX computes the grid
size as ceil(param / block_size).
ThreadDependent
Launch one child kernel per thread in the parent kernel.
Each thread in the parent launches exactly one child grid. The child grid size is typically 1 block.
Trait Implementations§
impl Eq for GridSpec
impl StructuralPartialEq for GridSpec
Auto Trait Implementations§
impl Freeze for GridSpec
impl RefUnwindSafe for GridSpec
impl Send for GridSpec
impl Sync for GridSpec
impl Unpin for GridSpec
impl UnsafeUnpin for GridSpec
impl UnwindSafe for GridSpec
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