I wanted to use both CPU and GPU for my computations. But when i created context with the two detected devices, it does not provide any context. I get the context when i use either a GPU or a CPU, but not both. Ofcourse, i wanted to use seperate queues for both.
Does anyone know if there is any a SDK limitation on this?
I will try to create seperate contexts and queues for GPU and CPU and schedule same jobs on both. Any reason why that's not a good idea?
Attaching the code.
devices = cpu; devices = gpu; context = clCreateContext(0, 2, devices, NULL, NULL, &status); mAssert(status, CL_SUCCESS, "Could not create context", HARD_ERROR); /*Attach a command queue to each device in this context*/ cpuQueue= clCreateCommandQueue(context, cpu, 0, &status); mAssert(status, CL_SUCCESS, "Could not command queue for CPU", HARD_ERROR); gpuQueue= clCreateCommandQueue(context, gpu, 0, &status); mAssert(status, CL_SUCCESS, "Could not command queue for GPU", HARD_ERROR);