getDeviceList {gpuMagic} | R Documentation

## Query and select the devices

### Description

This is a set of functions to query the device information and select which device should be used in the computation

### Usage

    getDeviceList()

    getDeviceInfo(i)

    getCurDevice()

    setDevice(i)

    getDeviceIndex()

    getJobStatus(i)

### Arguments

`i` | A 1-based device index, it should be an integer

### Details

'getDeviceList()': The function is used to obtain all the opencl-enable devices

'getDeviceInfo()': Get the ith device information, call 'getDeviceList()' first to figure out the index before using this function

'getCurDevice()': Get the information of the current devices

'setDevice()': Set which device will be used in the opencl, call 'getDeviceList()' first to figure out the index before use this function

'getDeviceIndex()': Get the index of the current devices

'getJobStatus()': Query the current job status in a device

### Value

'getDeviceList()': A data.frame that contains all device info

'getDeviceInfo()': A list with the device information

'getCurDevice()': No return value, the result will be printed in the console

'setDevice()': No return value

'getDeviceIndex()': An integer representing the device index

'getJobStatus()': A character representing the device status

### Examples

    #Get the available devices
    getDeviceList()

    #Get the information of the first device
    getDeviceInfo(1)
    #Get the information of current used devices
    getCurDevice()
    #Use the first device
    setDevice(1)
    #Use two devices
    #setDevice(c(1,2))
    #Get the index of the current devices
    getDeviceIndex()
    #Get the job status in the first device
    getJobStatus(1)

[Package gpuMagic version 1.4.0 Index]