pub unsafe extern "C" fn cudaLaunchKernelExC(
config: *const cudaLaunchConfig_t,
func: *const c_void,
args: *mut *mut c_void,
) -> cudaError_tExpand description
Launches a CUDA function with launch-time configuration.
Note that the functionally equivalent variadic template cudaLaunchKernelEx is available for C++11 and newer.
Invokes the kernel func on config->gridDim (config->gridDim.x ``config->gridDim.y ``config->gridDim.z) grid of blocks. Each block contains config->blockDim (config->blockDim.x ``config->blockDim.y ``config->blockDim.z) threads.
config->dynamicSmemBytes sets the amount of dynamic shared memory that will be available to each thread block.
config->stream specifies a stream the invocation is associated to.
Configuration beyond grid and block dimensions, dynamic shared memory size, and stream can be provided with the following two fields of config:
config->attrs is an array of config->numAttrs contiguous cudaLaunchAttribute elements. The value of this pointer is not considered if config->numAttrs is zero. However, in that case, it is recommended to set the pointer to NULL. config->numAttrs is the number of attributes populating the first config->numAttrs positions of the config->attrs array.
If the kernel has N parameters the args should point to array of N pointers. Each pointer, from args[0] to args[N - 1], point to the region of memory from which the actual parameter will be copied.
N.B. This function is so named to avoid unintentionally invoking the templated version, cudaLaunchKernelEx, for kernels taking a single void** or void* parameter.
Note: This function uses standard default stream semantics.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
Note: The API can also be used with a kernel cudaKernel_t by querying the handle using cudaLibraryGetKernel or cudaGetKernel and then passing it to the API by casting to void*. The symbol entryFuncAddr passed to cudaGetKernel should be a symbol that is registered with the same CUDA Runtime instance.
Note: Passing a symbol that belongs that belongs to a different runtime instance will result in undefined behavior. The only type that can be reliably passed to a different runtime instance is cudaKernel_t.
§Parameters
config: Launch configuration.func: Kernel to launch.args: Array of pointers to kernel parameters.
§Return value
cudaError_t::CUDA_SUCCESScudaErrorInvalidDeviceFunctioncudaErrorInvalidConfigurationcudaError_t::CUDA_ERROR_LAUNCH_FAILEDcudaError_t::CUDA_ERROR_LAUNCH_TIMEOUTcudaError_t::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCEScudaError_t::CUDA_ERROR_SHARED_OBJECT_INIT_FAILEDcudaError_t::CUDA_ERROR_INVALID_PTXcudaError_t::CUDA_ERROR_UNSUPPORTED_PTX_VERSIONcudaError_t::CUDA_ERROR_NO_BINARY_FOR_GPUcudaError_t::CUDA_ERROR_JIT_COMPILER_NOT_FOUNDcudaError_t::CUDA_ERROR_JIT_COMPILATION_DISABLED
See also: cudaLaunchKernelEx, (const, cudaLaunchConfig_t, *config, void, (*kernel)(ExpTypes…), ActTypes, &&…, args), “cudaLaunchKernelEx, (C++, API)”, cuLaunchKernelEx.