Learn R Programming

CARrampsOcl (version 0.1.4)

setup1: 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

setup1(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.
    
    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.kronyD <- setup1(dev=dev)

    Run the code above in your browser using DataLab