library('clrng')
if (detectGPUs() >= 1) {
setContext(grep("gpu", listContexts()$device_type)[1])
Job <- matrix(c(1,2,1,0, 3,3,6,1, 10,10,14,9, 6,7,12,11), 4, 4)
Job <- gpuR::vclMatrix(Job, type="integer")
getOption('clrng.type')
options(clrng.Nglobal = c(64,16))
streams <- createStreamsGpu()
result <- fisher.sim(Job, 1e5, streams = streams)
print(result)
result$streams
result$threshold
} else {
message("No GPU context available")
}
Run the code above in your browser using DataLab