pub struct Module<'a> { /* private fields */ }
Expand description
A loaded CUDA module
Implementations§
Source§impl<'a> Module<'a>
impl<'a> Module<'a>
Sourcepub fn load(handle: &Rc<Handle<'a>>, module: &[u8]) -> CudaResult<Self>
pub fn load(handle: &Rc<Handle<'a>>, module: &[u8]) -> CudaResult<Self>
Takes a raw CUDA kernel image and loads the corresponding module module into the current context. The pointer can be a cubin or PTX or fatbin file as a NULL-terminated text string
Sourcepub fn load_fatcubin(handle: &Rc<Handle<'a>>, module: &[u8]) -> CudaResult<Self>
pub fn load_fatcubin(handle: &Rc<Handle<'a>>, module: &[u8]) -> CudaResult<Self>
Same as Module::load
but uses fatCubin
format.
Sourcepub fn get_function<'b>(&'b self, name: &str) -> CudaResult<Function<'a, 'b>>
pub fn get_function<'b>(&'b self, name: &str) -> CudaResult<Function<'a, 'b>>
Retrieve a reference to a define CUDA kernel within the module.
Sourcepub fn get_global<'b: 'a>(&'b self, name: &str) -> CudaResult<DevicePtr<'b>>
pub fn get_global<'b: 'a>(&'b self, name: &str) -> CudaResult<DevicePtr<'b>>
Get a pointer to a global variable defined by a CUDA module.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> !Send for Module<'a>
impl<'a> !Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnwindSafe for Module<'a>
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