pub struct Module { /* private fields */ }Expand description
Represents a compiled device kernel.
This struct wraps a FFI pointer to the C++ pxl::Module class.
It provides methods for creating functions.
Implementations§
Source§impl Module
Implementation of the Module struct.
impl Module
Implementation of the Module struct.
Sourcepub fn create_function(&mut self, name: &str) -> Function
pub fn create_function(&mut self, name: &str) -> Function
Creates a new Function object.
§Arguments
name- Name of theFunctionto be created.
§Returns
A new Function object.
§Safety
Caller must ensure that name is valid and corresponds to an actual function in the module.
§Example
ⓘ
let module = pxl::create_module("tests/mu_kernel.mubin");
let function = module.create_function("sort_with_ptr");Sourcepub fn destroy_function(&self, function: Function)
pub fn destroy_function(&self, function: Function)
Auto Trait Implementations§
impl !Send for Module
impl !Sync for Module
impl Freeze for Module
impl RefUnwindSafe for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe 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