Results 1 to 3 of 3

Thread: Context with different vendors

  1. #1

    Context with different vendors

    Hi,

    I tried create a context colaborative with 2 differents vendors. Because, my machine have a CPU INTEL and a NVidia GPU, but when run, a execution error occurs.

    Below follow my code:

    cl_platform_id plataforma[2];
    cl_uint total_de_plataformas;

    clGetPlatformIDs(2, plataforma, &total_de_plataformas);

    cl_device_id dispositivo[2];
    cl_uint num_devices;

    clGetDeviceIDs(plataforma[0], CL_DEVICE_TYPE_GPU, 1, dispositivo[0], &num_devices);
    clGetDeviceIDs(plataforma[1], CL_DEVICE_TYPE_CPU, 1, dispositivo[1], &num_devices);

    cl_context contexto;

    int err;
    contexto = clCreateContext(NULL, 2, dispositivo, NULL, &err ); //In this line the execution error occurs.


    Thanks,

  2. #2

    Re: Context with different vendors

    Hello Luizdrumond,

    If I look at the OpenCL UML class diagram http://www.khronos.org/registry/cl/s...ssDiagram.html, it seems that there can be only one platform per context.

    Unfortunately you must create two separate contexts per platform.

  3. #3

    Re: Context with different vendors

    Hi,

    Very thanks for you help.

Similar Threads

  1. One host, two devices, different vendors
    By weliad in forum OpenCL
    Replies: 1
    Last Post: 08-25-2010, 02:55 PM
  2. Replies: 2
    Last Post: 04-26-2010, 08:38 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
  •