pub struct HipStreamManager { /* private fields */ }Expand description
HIP stream manager
Implementations§
Source§impl HipStreamManager
impl HipStreamManager
pub fn new(config: HipStreamConfig) -> Self
Sourcepub fn create_stream(&mut self, priority: Option<i32>) -> Result<u32, RocmError>
pub fn create_stream(&mut self, priority: Option<i32>) -> Result<u32, RocmError>
Create new stream Create new stream
Reuses a previously Self::destroy_streamd stream from
stream_pool when one is available (its operation queue is cleared
and it is given a fresh ID) instead of always allocating a new one.
Sourcepub fn destroy_stream(&mut self, stream_id: u32) -> Result<(), RocmError>
pub fn destroy_stream(&mut self, stream_id: u32) -> Result<(), RocmError>
Destroy stream
Returns the stream to stream_pool for Self::create_stream to
reuse instead of dropping it outright.
Sourcepub fn add_operation(
&mut self,
stream_id: u32,
operation: HipOperation,
) -> Result<(), RocmError>
pub fn add_operation( &mut self, stream_id: u32, operation: HipOperation, ) -> Result<(), RocmError>
Add operation to stream
Auto Trait Implementations§
impl !Send for HipStreamManager
impl !Sync for HipStreamManager
impl Freeze for HipStreamManager
impl RefUnwindSafe for HipStreamManager
impl Unpin for HipStreamManager
impl UnsafeUnpin for HipStreamManager
impl UnwindSafe for HipStreamManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more