Results 1 to 3 of 3

Thread: create context from list of devices with different types?

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    6

    create context from list of devices with different types?

    Assume that clGetDeviceIDs(..., some_platform, ...) returns a list of devices from different device type (e.g. GPU _and_ CPU):

    Is it allowed/possible to create a context from these devices?

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    Santa Clara
    Posts
    105

    Re: create context from list of devices with different types?

    You can use any combination of devices that are returned by clGetDeviceIDs to create a CL context.

    For example, clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) will return all CL devices in the system supported by a particular platform. This may include CPUs and GPUs (from the same or different vendors) depending on what your CL implementation supports.

    You can pass these devices (CPUs, GPUs, or other CL devices returned by clGetDeviceIDs) to <devices> argument in clCreateContext. And all these devices can then be used to enqueue work. CL allows heterogenous devices to be used together in a CL context. The decision, however, falls upon the implementation as to what devices it will allow.

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    6

    Re: create context from list of devices with different types?

    Thank you very much for your reply!

    As I already pointed out in my last two posts, I think that the documentation could be improved whenever it comes to "what is allowed and what not?" (e.g. different device_types in a context, different platforms in a context, min/max number of contexts per device and so on).

Similar Threads

  1. Replies: 2
    Last Post: 04-26-2010, 08:38 PM
  2. Create an OpenGL ES black list ...
    By yannoo in forum Suggestions for future OpenGL ES releases
    Replies: 1
    Last Post: 04-27-2004, 08:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •