Learn R Programming

gmatrix (version 0.3)

setDevice: Get and set the current device.

Description

On systems with multiple GPUs the current device may be set or investigated with these functions.

Usage

setDevice(device,force=FALSE,silent=FALSE,...) getDevice() listDevices()

Arguments

device
Device number to set the device to
force
Force reset of the tuning parameters even if they have already been set
silent
Prints a message if TRUE
...
Arguments to set the tuning parameters. It's not a good idea to mess with these at this point.

Value

setDevice returns TRUE. getDevice returns the current device number. listDevices returns a data.frame with information about the available devices.

Details

All operations are performed on the current GPU device only. An error will be returned if the user attempts to perform an operation on a device that is not the current device. Details of the available devices can be obtained with the 'listDevices' function.

See Also

device, gdup

Examples

Run this code
listDevices()
getDevice()
#setDevice(1)

Run the code above in your browser using DataLab