pub struct CudaFunction { /* private fields */ }
Expand description
Wrapper around sys::CUfunction. Used by CudaStream::launch_builder to execute kernels.
Implementations§
Source§impl CudaFunction
impl CudaFunction
pub fn occupancy_available_dynamic_smem_per_block( &self, num_blocks: u32, block_size: u32, ) -> Result<usize, DriverError>
pub fn occupancy_max_active_blocks_per_multiprocessor( &self, block_size: u32, dynamic_smem_size: usize, flags: Option<CUoccupancy_flags_enum>, ) -> Result<u32, DriverError>
pub fn occupancy_max_active_clusters( &self, config: LaunchConfig, stream: &CudaStream, ) -> Result<u32, DriverError>
pub fn occupancy_max_potential_block_size( &self, block_size_to_dynamic_smem_size: extern "C" fn(block_size: c_int) -> usize, dynamic_smem_size: usize, block_size_limit: u32, flags: Option<CUoccupancy_flags_enum>, ) -> Result<(u32, u32), DriverError>
pub fn occupancy_max_potential_cluster_size( &self, config: LaunchConfig, stream: &CudaStream, ) -> Result<u32, DriverError>
Sourcepub fn set_attribute(
&self,
attribute: CUfunction_attribute_enum,
value: i32,
) -> Result<(), DriverError>
pub fn set_attribute( &self, attribute: CUfunction_attribute_enum, value: i32, ) -> Result<(), DriverError>
Set the value of a specific attribute of this CudaFunction.
Sourcepub fn set_function_cache_config(
&self,
attribute: CUfunc_cache_enum,
) -> Result<(), DriverError>
pub fn set_function_cache_config( &self, attribute: CUfunc_cache_enum, ) -> Result<(), DriverError>
Set the cache config of this CudaFunction.
Trait Implementations§
Source§impl Clone for CudaFunction
impl Clone for CudaFunction
Source§fn clone(&self) -> CudaFunction
fn clone(&self) -> CudaFunction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CudaFunction
impl Debug for CudaFunction
impl Send for CudaFunction
impl Sync for CudaFunction
Auto Trait Implementations§
impl Freeze for CudaFunction
impl RefUnwindSafe for CudaFunction
impl Unpin for CudaFunction
impl UnwindSafe for CudaFunction
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