pub trait WorkspaceProvider: Sealed + Sync {
// Required methods
fn with_worker(
&self,
req: &WorkspaceReq,
f: &mut dyn FnMut(*mut u8, *mut u8, &mut Vec<i64>),
);
fn take_team(
&self,
req: &WorkspaceReq,
pm: usize,
pn: usize,
) -> TeamLease<'_>;
fn trim(&self);
}Expand description
Storage an execution may borrow. Implemented by the owner; the driver only ever sees this trait, so nothing here depends on the driver.
Sealed: ArenaProvider is the supported way to lend reusable storage, and
the trait is deliberately not implementable outside this crate.
Required Methods§
Sourcefn with_worker(
&self,
req: &WorkspaceReq,
f: &mut dyn FnMut(*mut u8, *mut u8, &mut Vec<i64>),
)
fn with_worker( &self, req: &WorkspaceReq, f: &mut dyn FnMut(*mut u8, *mut u8, &mut Vec<i64>), )
Run f with this thread’s A block, tile and scatter scratch. A
re-entrant call on the same thread gets fresh buffers instead of the
ones its outer call is using.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".