createStreamsGpu {clrng} | R Documentation |
createStreamsGpu
Description
Generate streams on a GPU device
Usage
createStreamsGpu(n = prod(getOption("clrng.Nglobal")))
Arguments
n |
a integer specifying number of streams to create, default is the number of total work items in use |
Value
a stream object of class 'vclMatrix' on GPU
Examples
library(clrng)
if (detectGPUs() >= 1) {
setBaseCreator(rep(12345,6))
setContext(grep("gpu", listContexts()$device_type)[1])
myStreamsGpu = createStreamsGpu(4)
t(as.matrix(myStreamsGpu))
myStreamsGpu2 = createStreamsGpu(6)
t(as.matrix(myStreamsGpu2)) }else {
message("No GPU context available")
}
[Package clrng version 0.0.5 Index]