pub struct ResidentLaunchGeometry {
pub workgroup_size_x: u32,
pub slot_count: u32,
pub dispatch_grid: [u32; 3],
}Expand description
Host-side launch geometry for a finite megakernel dispatch.
Fields§
§workgroup_size_x: u32Lanes per worker workgroup used to compile the program.
slot_count: u32Ring slots allocated for the dispatch, padded to a full workgroup.
dispatch_grid: [u32; 3]Grid submitted to the backend.
Implementations§
Source§impl ResidentLaunchGeometry
impl ResidentLaunchGeometry
Sourcepub fn from_item_count(
item_count: usize,
worker_count: u32,
max_workgroup_size_x: u32,
) -> Result<Self, BackendError>
pub fn from_item_count( item_count: usize, worker_count: u32, max_workgroup_size_x: u32, ) -> Result<Self, BackendError>
Build geometry for item_count host work items.
§Errors
Returns BackendError when the host queue cannot be represented by
the u32 ring protocol.
Sourcepub fn from_slots(
slot_count: u32,
worker_count: u32,
max_workgroup_size_x: u32,
) -> Self
pub fn from_slots( slot_count: u32, worker_count: u32, max_workgroup_size_x: u32, ) -> Self
Build geometry for an already-sized ring.
Sourcepub const fn covering_worker_groups(&self) -> u32
pub const fn covering_worker_groups(&self) -> u32
Number of worker workgroups needed to cover every ring slot exactly once.
Sourcepub fn dispatch_config(&self, timeout: Option<Duration>) -> DispatchConfig
pub fn dispatch_config(&self, timeout: Option<Duration>) -> DispatchConfig
Build the backend dispatch config that matches this launch geometry.
Trait Implementations§
Source§impl Clone for ResidentLaunchGeometry
impl Clone for ResidentLaunchGeometry
Source§fn clone(&self) -> ResidentLaunchGeometry
fn clone(&self) -> ResidentLaunchGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResidentLaunchGeometry
Source§impl Debug for ResidentLaunchGeometry
impl Debug for ResidentLaunchGeometry
impl Eq for ResidentLaunchGeometry
Source§impl PartialEq for ResidentLaunchGeometry
impl PartialEq for ResidentLaunchGeometry
impl StructuralPartialEq for ResidentLaunchGeometry
Auto Trait Implementations§
impl Freeze for ResidentLaunchGeometry
impl RefUnwindSafe for ResidentLaunchGeometry
impl Send for ResidentLaunchGeometry
impl Sync for ResidentLaunchGeometry
impl Unpin for ResidentLaunchGeometry
impl UnsafeUnpin for ResidentLaunchGeometry
impl UnwindSafe for ResidentLaunchGeometry
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
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
Compare self to
key and return true if they are equal.