pub struct LanePool { /* private fields */ }Expand description
Persistent worker threads for one lane-partitioned program.
Implementations§
Source§impl LanePool
impl LanePool
Sourcepub const DEFAULT_IDLE_SPIN: Duration
pub const DEFAULT_IDLE_SPIN: Duration
Default time an idle worker keeps polling for the next kernel before it parks.
Sourcepub fn new(lanes: u32) -> Result<Self>
pub fn new(lanes: u32) -> Result<Self>
Start lanes - 1 worker threads; lane 0 runs on the dispatching
thread.
pub fn with_idle_spin(lanes: u32, idle_spin: Duration) -> Result<Self>
pub fn lanes(&self) -> u32
Sourcepub fn run(
&mut self,
schedule: &LaneSchedule,
runner: &dyn LaneTaskRunner,
) -> Result<(), LaneTaskFailure>
pub fn run( &mut self, schedule: &LaneSchedule, runner: &dyn LaneTaskRunner, ) -> Result<(), LaneTaskFailure>
Execute one kernel and return its failure, preferring non-fatal errors to captured assertions before comparing task indices.
After a failure, tasks that have not started are skipped; every lane still finishes before this call returns.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LanePool
impl !UnwindSafe for LanePool
impl Freeze for LanePool
impl Send for LanePool
impl Sync for LanePool
impl Unpin for LanePool
impl UnsafeUnpin for LanePool
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