Learn R Programming

clrng (version 0.0.5)

createStreamsCpu: createStreamsCpu

Description

Create streams stored on the CPU.

Usage

createStreamsCpu(n = prod(getOption("clrng.Nglobal")))

Value

an R matrix of streams on CPU.

Arguments

n

a integer specifying number of streams to create, default is the number of total work items in use.

Examples

Run this code
library(clrng)
if (detectGPUs() >= 1) {
  t(createStreamsCpu(n=5))
  ## GPU streams
  myStreamsGpu = vclMatrix(createStreamsCpu(n=4)) }else {
  message("No GPU context available")
}

Run the code above in your browser using DataLab