Skip to main content

cudaExecutionCtxGetDevice

Function cudaExecutionCtxGetDevice 

Source
pub unsafe extern "C" fn cudaExecutionCtxGetDevice(
    device: *mut c_int,
    ctx: cudaExecutionContext_t,
) -> cudaError_t
Expand description

Returns the device handle for the execution context.

Returns in *device the handle of the specified execution context’s device. The execution context should not be NULL.

§Parameters

  • device: Returned device handle for the specified execution context.
  • ctx: Execution context for which to obtain the device (required parameter, see note below).