pub unsafe extern "C" fn cuOccupancyMaxActiveBlocksPerMultiprocessor(
numBlocks: *mut c_int,
func: CUfunction,
blockSize: c_int,
dynamicSMemSize: usize,
) -> CUresult
Expand description
\brief Returns occupancy of a function
Returns in \p *numBlocks the number of the maximum active blocks per streaming multiprocessor.
Note that the API can also be used with context-less kernel ::CUkernel by querying the handle using ::cuLibraryGetKernel() and then passing it to the API by casting to ::CUfunction. Here, the context to use for calculations will be the current context.
\param numBlocks - Returned occupancy \param func - Kernel for which occupancy is calculated \param blockSize - Block size the kernel is intended to be launched with \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_UNKNOWN \notefnerr
\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor