pub struct PerActorAllocator { /* private fields */ }Implementations§
Source§impl PerActorAllocator
impl PerActorAllocator
Sourcepub fn new(stream: Arc<CudaStream>) -> Self
pub fn new(stream: Arc<CudaStream>) -> Self
F1 back-compat: every acquire() returns the supplied stream.
Sourcepub fn with_context(ctx: Arc<CudaContext>) -> Self
pub fn with_context(ctx: Arc<CudaContext>) -> Self
F2 default: each acquire() mints a fresh stream on the given
context. Tracks weak refs to the minted streams for diagnostics.
Sourcepub fn live_streams(&self) -> usize
pub fn live_streams(&self) -> usize
Number of live streams this allocator has minted (Fresh mode only). Returns 1 for Shared mode.
Trait Implementations§
Source§impl Clone for PerActorAllocator
impl Clone for PerActorAllocator
Source§fn clone(&self) -> PerActorAllocator
fn clone(&self) -> PerActorAllocator
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 StreamAllocator for PerActorAllocator
impl StreamAllocator for PerActorAllocator
Source§fn acquire(&self, _hints: ActorHints) -> Arc<CudaStream>
fn acquire(&self, _hints: ActorHints) -> Arc<CudaStream>
Acquire a stream for a
KernelActor that’s just starting.Auto Trait Implementations§
impl Freeze for PerActorAllocator
impl !RefUnwindSafe for PerActorAllocator
impl Send for PerActorAllocator
impl Sync for PerActorAllocator
impl Unpin for PerActorAllocator
impl UnsafeUnpin for PerActorAllocator
impl !UnwindSafe for PerActorAllocator
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