Changes between Initial Version and Version 1 of OpenclCpu


Ignore:
Timestamp:
Aug 27, 2013, 12:41:04 AM (11 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenclCpu

    v1 v1  
     1= OpenCL CPU applications =
     2
     3OpenCL, which is used for GPU applications, can also be used for multicore CPU applications.
     4
     5Depending on what drivers are installed on a client computer,
     6one or more OpenCL implementations may be available.
     7When you build OpenCL/CPU applications,
     8they may be compatible with only one implementation,
     9or there may be a preferred implementation.
     10
     11You can use the plan class mechanism to control what
     12app versions are sent.
     13Your app plan function can call
     14{{{
     15bool HOST::get_cpu_opencl_prop(const char* vendor, OPENCL_CPU_PROP&);
     16}}}
     17to see if the host has an OpenCL/CPU implementation
     18for the given vendor ("nvidia", "amd", or "intel").
     19If so, the OpenCL properties are returned.
     20
     21Use this function as follows:
     22{{{
     23bool app_plan_opencl_cpu_intel(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu) {
     24    OPENCL_CPU_PROP ocp;
     25    if (sreq.host.get_cpu_opencl_prop("intel", ocp)) {
     26        ... host has Intel OpenCL/CPU implementation
     27    }
     28    ...
     29}
     30}}}