pub struct GpuCountArgs { /* private fields */ }Expand description
Converts a GPU-written element count into dispatch_workgroups_indirect
arguments for both the 64-thread and 256-thread workgroup sizes.
Every simulation stage launches workgroups from a runtime count rather than from its pre-allocated capacity; without this conversion each indirect dispatch would schedule one workgroup per element, idling all but the first lane of every workgroup.
Implementations§
Source§impl GpuCountArgs
impl GpuCountArgs
pub fn new(context: &GpuContext, label: &str) -> Self
pub fn encode( &self, device: &Device, recorder: &mut ComputeRecorder<'_>, count: &GpuBuffer, args: &GpuBuffer, )
Auto Trait Implementations§
impl !Freeze for GpuCountArgs
impl !RefUnwindSafe for GpuCountArgs
impl !UnwindSafe for GpuCountArgs
impl Send for GpuCountArgs
impl Sync for GpuCountArgs
impl Unpin for GpuCountArgs
impl UnsafeUnpin for GpuCountArgs
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