pub struct Layout { /* private fields */ }Expand description
Validated, ordered CPU topology used to map one exact startup resource per worker.
Implementations§
Source§impl Layout
impl Layout
pub fn pinned(cpus: impl IntoIterator<Item = Cpu>) -> Result<Self, Error>
pub fn count(&self) -> NonZeroUsize
Sourcepub fn try_assign<I, R>(self, items: R) -> Result<Runtime<I>, Error>
pub fn try_assign<I, R>(self, items: R) -> Result<Runtime<I>, Error>
Assigns exactly one affine input to each CPU, in topology order.
Sourcepub fn try_map<T, I, R>(
self,
items: R,
issue: impl Fn(T) -> I,
) -> Result<Runtime<I>, Error>
pub fn try_map<T, I, R>( self, items: R, issue: impl Fn(T) -> I, ) -> Result<Runtime<I>, Error>
Consumes exactly one affine resource for each CPU, in topology order.
Auto Trait Implementations§
impl Forget for Layout
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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