Function cuLaunchGrid

Source
pub unsafe extern "C" fn cuLaunchGrid(
    f: CUfunction,
    grid_width: c_int,
    grid_height: c_int,
) -> CUresult
Expand description

\brief Launches a CUDA function

\deprecated

Invokes the kernel \p f on a \p grid_width x \p grid_height grid of blocks. Each block contains the number of threads specified by a previous call to ::cuFuncSetBlockShape().

The block shape, dynamic shared memory size, and parameter information must be set using ::cuFuncSetBlockShape(), ::cuFuncSetSharedSize(), ::cuParamSetSize(), ::cuParamSeti(), ::cuParamSetf(), and ::cuParamSetv() prior to calling this function.

Launching a function via ::cuLaunchKernel() invalidates the function’s block shape, dynamic shared memory size, and parameter information. After launching via cuLaunchKernel, this state must be re-initialized prior to calling this function. Failure to do so results in undefined behavior.

\param f - Kernel to launch \param grid_width - Width of grid in blocks \param grid_height - Height of grid in blocks

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_VALUE, ::CUDA_ERROR_LAUNCH_FAILED, ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, ::CUDA_ERROR_LAUNCH_TIMEOUT, ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED \notefnerr

\sa ::cuFuncSetBlockShape, ::cuFuncSetSharedSize, ::cuFuncGetAttribute, ::cuParamSetSize, ::cuParamSetf, ::cuParamSeti, ::cuParamSetv, ::cuLaunch, ::cuLaunchGridAsync, ::cuLaunchKernel