Learn R Programming

rkeops (version 1.4.2.2)

use_gpu: Enable GPU-computing when calling user-defined operators

Description

Set up rkeops runtime options to use GPU computing when calling user-defined operators.

Usage

use_gpu(device = 0)

Value

None

Arguments

device

integer, GPU device id to be used for computations. Default is 0. It is recommended to use default GPU and manage GPU assignment outside R by setting the environment variable CUDA_VISIBLE_DEVICES.

Author

Ghislain Durif

Details

If you have compiled GPU-compatible operators (see compile4gpu()), you can call the function use_gpu to specificly run computations on GPU.

Note: The default behavior in rkeops is to use CPU computing, thus calling the function use_gpu is mandatory to run computations on GPU.

To disable GPU computing, run use_cpu().

See Also

compile4cpu(), compile4gpu(), use_cpu()

Examples

Run this code
library(rkeops)
use_gpu()

Run the code above in your browser using DataLab