pub struct Kernel { /* private fields */ }Expand description
A kernel entry point inside a Library.
Implementations§
Source§impl Kernel
impl Kernel
Sourcepub fn launch(&self) -> LaunchBuilder<'_>
pub fn launch(&self) -> LaunchBuilder<'_>
Start a kernel-launch builder for this kernel.
Source§impl Kernel
impl Kernel
Sourcepub fn as_raw(&self) -> cudaKernel_t
pub fn as_raw(&self) -> cudaKernel_t
Raw cudaKernel_t. Use with care.
Sourcepub fn as_launch_ptr(&self) -> *const c_void
pub fn as_launch_ptr(&self) -> *const c_void
Returns the raw kernel handle cast to a const void* — the form
expected by cudaLaunchKernel. Library-loaded kernels can be
launched through the standard runtime launch function by
passing this pointer.
Sourcepub fn max_active_blocks_per_multiprocessor(
&self,
block_size: i32,
dynamic_smem_bytes: usize,
) -> Result<i32>
pub fn max_active_blocks_per_multiprocessor( &self, block_size: i32, dynamic_smem_bytes: usize, ) -> Result<i32>
cudaOccupancyMaxActiveBlocksPerMultiprocessor — how many blocks
of size block_size can run concurrently per SM given
dynamic_smem_bytes of dynamic shared memory.
Sourcepub fn max_active_blocks_per_multiprocessor_with_flags(
&self,
block_size: i32,
dynamic_smem_bytes: usize,
flags: u32,
) -> Result<i32>
pub fn max_active_blocks_per_multiprocessor_with_flags( &self, block_size: i32, dynamic_smem_bytes: usize, flags: u32, ) -> Result<i32>
cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags — same
as Self::max_active_blocks_per_multiprocessor but accepting
occupancy-flag bits (0 = default, 1 = disable shared-memory
carveout adjustment).
Trait Implementations§
impl Send for Kernel
impl Sync for Kernel
Auto Trait Implementations§
impl Freeze for Kernel
impl RefUnwindSafe for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
impl UnwindSafe for Kernel
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