pub struct MegakernelLaunchGeometry {
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 MegakernelLaunchGeometry
impl MegakernelLaunchGeometry
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 MegakernelLaunchGeometry
impl Clone for MegakernelLaunchGeometry
Source§fn clone(&self) -> MegakernelLaunchGeometry
fn clone(&self) -> MegakernelLaunchGeometry
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 MegakernelLaunchGeometry
Source§impl Debug for MegakernelLaunchGeometry
impl Debug for MegakernelLaunchGeometry
impl Eq for MegakernelLaunchGeometry
Source§impl PartialEq for MegakernelLaunchGeometry
impl PartialEq for MegakernelLaunchGeometry
Source§fn eq(&self, other: &MegakernelLaunchGeometry) -> bool
fn eq(&self, other: &MegakernelLaunchGeometry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MegakernelLaunchGeometry
Auto Trait Implementations§
impl Freeze for MegakernelLaunchGeometry
impl RefUnwindSafe for MegakernelLaunchGeometry
impl Send for MegakernelLaunchGeometry
impl Sync for MegakernelLaunchGeometry
impl Unpin for MegakernelLaunchGeometry
impl UnsafeUnpin for MegakernelLaunchGeometry
impl UnwindSafe for MegakernelLaunchGeometry
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.