pub struct Module { /* private fields */ }Expand description
A loaded CUDA module (PTX or CUBIN) on the tenferro primary context.
Retains the tenferro CudaRuntime so the context/device stays alive as
long as the module exists. Every Function derived from it retains the
same inner handle (Rc), so the image is never unloaded while a function
handle is still in use. Dropping the last strong reference unloads the
module.
Module is !Send + !Sync (like the rest of the raw seam), matching the
session-scoped execution authority of issue #1597.
Implementations§
Source§impl Module
impl Module
Sourcepub fn function(&self, name: &str) -> Result<Function>
pub fn function(&self, name: &str) -> Result<Function>
Look up a kernel entry point by name.
The returned Function retains this module, so the module cannot be
unloaded while the function is alive.
§Errors
Returns the driver’s typed error via crate::Error::BackendSource
when the symbol does not exist in the module.
Auto Trait Implementations§
impl !RefUnwindSafe for Module
impl !Send for Module
impl !Sync for Module
impl !UnwindSafe for Module
impl Freeze for Module
impl Unpin for Module
impl UnsafeUnpin for Module
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
impl<T, U> Imply<T> for U
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