pub struct SequentialWorkgroup {
pub size: [u32; 3],
}Expand description
Driver for sequential per-invocation execution inside a workgroup.
Does the simplest possible thing: iterate invocations 0..N in order,
each time honoring any shared-memory writes made by prior invocations.
When the underlying program contains a barrier, the caller replays the
full sweep from the barrier point. crate::workgroup provides the
invocation and memory types used by this driver.
Fields§
§size: [u32; 3]Workgroup size in x/y/z.
Implementations§
Source§impl SequentialWorkgroup
impl SequentialWorkgroup
Sourcepub fn for_program(program: &Program) -> Self
pub fn for_program(program: &Program) -> Self
Construct a driver for the program’s declared workgroup size.
Sourcepub fn invocation_count(&self) -> u32
pub fn invocation_count(&self) -> u32
Total number of invocations in one workgroup.
Sourcepub fn invocations(
&self,
workgroup_id: [u32; 3],
) -> impl Iterator<Item = InvocationIds>
pub fn invocations( &self, workgroup_id: [u32; 3], ) -> impl Iterator<Item = InvocationIds>
Yield the invocation ids in canonical order (z-major, y-major, x-minor).
Trait Implementations§
Source§impl Clone for SequentialWorkgroup
impl Clone for SequentialWorkgroup
Source§fn clone(&self) -> SequentialWorkgroup
fn clone(&self) -> SequentialWorkgroup
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SequentialWorkgroup
impl Debug for SequentialWorkgroup
impl Copy for SequentialWorkgroup
Auto Trait Implementations§
impl Freeze for SequentialWorkgroup
impl RefUnwindSafe for SequentialWorkgroup
impl Send for SequentialWorkgroup
impl Sync for SequentialWorkgroup
impl Unpin for SequentialWorkgroup
impl UnsafeUnpin for SequentialWorkgroup
impl UnwindSafe for SequentialWorkgroup
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