Function cudaLaunchKernelExC

Source
pub unsafe extern "C" fn cudaLaunchKernelExC(
    config: *const cudaLaunchConfig_t,
    func: *const c_void,
    args: *mut *mut c_void,
) -> cudaError_t
Expand description

\brief 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 \p func on \p config->gridDim (\p config->gridDim.x × \p config->gridDim.y × \p config->gridDim.z) grid of blocks. Each block contains \p config->blockDim (\p config->blockDim.x × \p config->blockDim.y × \p config->blockDim.z) threads.

\p config->dynamicSmemBytes sets the amount of dynamic shared memory that will be available to each thread block.

\p 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 \p config:

\p config->attrs is an array of \p config->numAttrs contiguous ::cudaLaunchAttribute elements. The value of this pointer is not considered if \p config->numAttrs is zero. However, in that case, it is recommended to set the pointer to NULL. \p config->numAttrs is the number of attributes populating the first \p config->numAttrs positions of the \p config->attrs array.

If the kernel has N parameters the \p 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, \p cudaLaunchKernelEx, for kernels taking a single void** or void* parameter.

\param config - Launch configuration \param func - Kernel to launch \param args - Array of pointers to kernel parameters

\return ::cudaSuccess, ::cudaErrorInvalidDeviceFunction, ::cudaErrorInvalidConfiguration, ::cudaErrorLaunchFailure, ::cudaErrorLaunchTimeout, ::cudaErrorLaunchOutOfResources, ::cudaErrorSharedObjectInitFailed, ::cudaErrorInvalidPtx, ::cudaErrorUnsupportedPtxVersion, ::cudaErrorNoKernelImageForDevice, ::cudaErrorJitCompilerNotFound, ::cudaErrorJitCompilationDisabled \note_null_stream \notefnerr \note_init_rt \note_callback

\sa \ref ::cudaLaunchKernelEx(const cudaLaunchConfig_t *config, void (*kernel)(ExpTypes…), ActTypes &&… args) “cudaLaunchKernelEx (C++ API)”, ::cuLaunchKernelEx