R/profitHPC.R

Defines functions profitOpenCLEnvInfo profitOpenCLEnv profitHasOpenCL profitHasOpenMP

Documented in profitHasOpenCL profitHasOpenMP profitOpenCLEnv profitOpenCLEnvInfo

profitOpenCLEnvInfo = function() {
	.Call('R_profit_openclenv_info')
}

profitOpenCLEnv = function(plat_idx=1, dev_idx=1, use_double=FALSE) {
  tempenvlist=profitOpenCLEnvInfo()
  if(plat_idx>length(tempenvlist)){stop('plat_idx is greater than the number of available platforms!')}
  if(dev_idx>length(tempenvlist[[plat_idx]]$devices)){stop('dev_idx is greater than the number of available devices on the selected platform!')}
	.Call('R_profit_openclenv', as.integer(plat_idx-1), as.integer(dev_idx-1), as.integer(use_double))
}

profitHasOpenCL = function() {
  return(!is.null(profitOpenCLEnvInfo()))
}

profitHasOpenMP <- function() {
	.Call('R_profit_has_openmp')
}

Try the ProFit package in your browser

Any scripts or data that you put into this service are public.

ProFit documentation built on Nov. 11, 2019, 5:07 p.m.