Last data update: 2014.03.03

R: Discover the Id of the current GPU device
getGpuIdR Documentation

Discover the Id of the current GPU device

Description

Queries the CUDA driver for the GPU device currently assigned to this thread. This is the id of the device that will be used for computation. If you wish to use a different device, use the chooseGpu function.

Usage

getGpuId()

Value

The function returns a single integer indicating the id of the GPU device currently selected to carry out computation according to the CUDA driver.

Examples

getGpuId()

Results