CUDA Runtime API (PDF) - v7.0 (older) - Last updated March 5, 2015 - Send Feedback -

## 3.8. Execution Control [DEPRECATED]

This section describes the deprecated execution control functions of the CUDA runtime application programming interface.

Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module.

### Functions

__host__ ​cudaError_t cudaConfigureCall ( dim3 gridDim, dim3 blockDim, size_t sharedMem = 0, cudaStream_t stream = 0 )
  Configure a device-launch.
__host__ ​cudaError_t cudaLaunch ( const void* func )
  Launches a device function.
__host__ ​cudaError_t cudaSetupArgument ( const void* arg, size_t size, size_t offset )
  Configure a device launch.

### Functions

__host__ ​cudaError_t cudaConfigureCall ( dim3 gridDim, dim3 blockDim, size_t sharedMem = 0, cudaStream_t stream = 0 )
  Configure a device-launch.

  ###### Parameters

  `gridDim`
    - Grid dimensions
  `blockDim`
    - Block dimensions
  `sharedMem`
    - Shared memory
  `stream`
    - Stream identifier

  ###### Returns

  cudaSuccess, cudaErrorInvalidConfiguration

  ###### Deprecated

  This function is deprecated as of CUDA 7.0

  ###### Description

  Specifies the grid and block dimensions for the device call to be executed similar to the execution configuration syntax. cudaConfigureCall() is stack based. Each call pushes data on top of an execution stack. This data contains the dimension for the grid and thread blocks, together with any arguments for the call.

  Note:

  - This function uses standard default stream semantics.

  - Note that this function may also return error codes from previous, asynchronous launches.

  cudaLaunchKernel ( C API), cudaFuncSetCacheConfig ( C API), cudaFuncGetAttributes ( C API), cudaLaunch ( C API), cudaSetDoubleForDevice, cudaSetDoubleForHost, cudaSetupArgument ( C API),

__host__ ​cudaError_t cudaLaunch ( const void* func )
  Launches a device function.

  ###### Parameters

  `func`
    - Device function symbol

  ###### Returns

  cudaSuccess, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration, cudaErrorLaunchFailure, cudaErrorLaunchTimeout, cudaErrorLaunchOutOfResources, cudaErrorSharedObjectInitFailed

  ###### Deprecated

  This function is deprecated as of CUDA 7.0

  ###### Description

  Launches the function `func` on the device. The parameter `func` must be a device function symbol. The parameter specified by `func` must be declared as a `__global__` function. cudaLaunch() must be preceded by a call to cudaConfigureCall() since it pops the data that was pushed by cudaConfigureCall() from the execution stack.

  Note:

  - Note that this function may also return error codes from previous, asynchronous launches.

  - Use of a string naming a variable as the `symbol` paramater was removed in CUDA 5.0.

  cudaLaunchKernel ( C API), cudaFuncSetCacheConfig ( C API), cudaFuncGetAttributes ( C API), cudaLaunch ( C++ API), cudaSetDoubleForDevice, cudaSetDoubleForHost, cudaSetupArgument ( C API), cudaThreadGetCacheConfig, cudaThreadSetCacheConfig

__host__ ​cudaError_t cudaSetupArgument ( const void* arg, size_t size, size_t offset )
  Configure a device launch.

  ###### Parameters

  `arg`
    - Argument to push for a kernel launch
  `size`
    - Size of argument
  `offset`
    - Offset in argument stack to push new arg

  ###### Returns

  cudaSuccess

  ###### Deprecated

  This function is deprecated as of CUDA 7.0

  ###### Description

  Pushes `size` bytes of the argument pointed to by `arg` at `offset` bytes from the start of the parameter passing area, which starts at offset 0. The arguments are stored in the top of the execution stack. cudaSetupArgument() must be preceded by a call to cudaConfigureCall().

  Note:

  Note that this function may also return error codes from previous, asynchronous launches.

  cudaLaunchKernel ( C API), cudaFuncSetCacheConfig ( C API), cudaFuncGetAttributes ( C API), cudaLaunch ( C API), cudaSetDoubleForDevice, cudaSetDoubleForHost, cudaSetupArgument ( C++ API),