pub struct Linker<'a> { /* private fields */ }Expand description
A CUDA JIT linker context, used to compile device-specific kernels from PTX assembly or link together several precompiled binaries
Implementations§
Source§impl<'a> Linker<'a>
impl<'a> Linker<'a>
Sourcepub fn new(
handle: &Rc<Handle<'a>>,
compute_capability: CudaVersion,
options: LinkerOptions,
) -> CudaResult<Self>
pub fn new( handle: &Rc<Handle<'a>>, compute_capability: CudaVersion, options: LinkerOptions, ) -> CudaResult<Self>
Creates a new Linker for the given context handle, compute capability, and linker options.
Sourcepub fn add(
self,
name: &str,
format: LinkerInputType,
in_data: &[u8],
) -> CudaResult<Self>
pub fn add( self, name: &str, format: LinkerInputType, in_data: &[u8], ) -> CudaResult<Self>
Add an input file to the linker context. name is only used for logs
Sourcepub fn build(&self) -> CudaResult<&[u8]>
pub fn build(&self) -> CudaResult<&[u8]>
Emit the cubin assembly binary. You probably want Linker::build_module
Sourcepub fn build_module(&self) -> CudaResult<Module<'a>>
pub fn build_module(&self) -> CudaResult<Module<'a>>
Build a CUDA module from this Linker.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Linker<'a>
impl<'a> RefUnwindSafe for Linker<'a>
impl<'a> !Send for Linker<'a>
impl<'a> !Sync for Linker<'a>
impl<'a> Unpin for Linker<'a>
impl<'a> UnwindSafe for Linker<'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