Learn R Programming

CARrampsOcl (version 0.1.4)

setup2: Function to invoke OpenCL package and create kernels

Description

This function sets up the OpenCL environment and creates kernels. It depends on the OpenCL package.

Usage

setup2(dev)

Arguments

dev
device list from OpenCL package function oclDevices

Value

    Examples

    Run this code
    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--	or do  help(data=index)  for the standard data sets.
    
    ## The function is currently defined as
    require(OpenCL)
    plat <- oclPlatforms()
    dev <- oclDevices( plat[[1]] )
    if(!any(grepl("cl_khr_fp64", oclInfo(dev[[1]])$exts)))
        stop("GPU with double precision and Open CL capabilities required.")
    
    k.kronyD3 <- setup2(dev=dev)

    Run the code above in your browser using DataLab