pub struct LaunchPlan {
pub element_count: u32,
pub workgroup: [u32; 3],
pub grid: [u32; 3],
pub param_words: Vec<u32>,
pub max_binding_alignment: usize,
}Expand description
Fully prepared launch metadata shared by concrete drivers.
Fields§
§element_count: u32Logical element count passed to the lowered kernel.
workgroup: [u32; 3]Effective workgroup/block shape after dispatch overrides.
grid: [u32; 3]Effective grid shape after dispatch overrides or inference.
param_words: Vec<u32>Per-buffer element-count metadata uploaded as the shared params buffer.
max_binding_alignment: usizeMaximum preferred alignment across all launch bindings.
Concrete drivers use this to pick upload staging and device-buffer allocation paths without re-inspecting Program buffer declarations.
Implementations§
Source§impl LaunchPlan
impl LaunchPlan
Sourcepub fn from_bindings(
program: &Program,
bindings: &[Binding],
config: &DispatchConfig,
limits: LaunchGeometryLimits,
) -> Result<Self, BackendError>
pub fn from_bindings( program: &Program, bindings: &[Binding], config: &DispatchConfig, limits: LaunchGeometryLimits, ) -> Result<Self, BackendError>
Prepare dispatch geometry and parameter words from a validated binding plan.
§Errors
Returns when caller overrides produce zero dimensions, overflow the logical launch element count, or exceed backend-reported launch limits.
Sourcepub fn prepare_into(
&mut self,
program: &Program,
bindings: &[Binding],
config: &DispatchConfig,
limits: LaunchGeometryLimits,
) -> Result<(), BackendError>
pub fn prepare_into( &mut self, program: &Program, bindings: &[Binding], config: &DispatchConfig, limits: LaunchGeometryLimits, ) -> Result<(), BackendError>
Prepare dispatch geometry and parameter words, reusing this plan’s buffers.
§Errors
Returns when caller overrides produce zero dimensions, overflow the logical launch element count, or exceed backend-reported launch limits.
Trait Implementations§
Source§impl Clone for LaunchPlan
impl Clone for LaunchPlan
Source§fn clone(&self) -> LaunchPlan
fn clone(&self) -> LaunchPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LaunchPlan
impl Debug for LaunchPlan
Source§impl Default for LaunchPlan
impl Default for LaunchPlan
impl Eq for LaunchPlan
Source§impl PartialEq for LaunchPlan
impl PartialEq for LaunchPlan
Source§fn eq(&self, other: &LaunchPlan) -> bool
fn eq(&self, other: &LaunchPlan) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LaunchPlan
Auto Trait Implementations§
impl Freeze for LaunchPlan
impl RefUnwindSafe for LaunchPlan
impl Send for LaunchPlan
impl Sync for LaunchPlan
impl Unpin for LaunchPlan
impl UnsafeUnpin for LaunchPlan
impl UnwindSafe for LaunchPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.