tests/funcAttributes.R

library(RCUDA)
cuGetContext()

f = system.file("sampleKernels", "dnorm.cubin", package = "RCUDA")
if(file.exists(f)) {
  m = loadModule(f)
  vals = RCUDA:::CUfunction_attributeValues
      # ignore the MAX entry 
  sapply(unclass(vals)[-length(vals)], cuFuncGetAttribute,  m$dnorm_kernel)

  cuFuncGetAttributes(m$dnorm_kernel)
} else
  cat("Cannot find load dnorm.cubin. No test!\n")
duncantl/RCUDA documentation built on May 15, 2019, 5:26 p.m.