Forum Discussion
Altera_Forum
Honored Contributor
8 years agoSingle work item Task parallel OpenCL kernel
Hi, Does the following code, invokes the kernel to run like the attached image? or they runs one after another ?
clCreateCommandQueue(context, device, NULL, &status);
clEnqueueTask(command...
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- Ah, I put the wrong code. Suppose, clEnqueueTask(command, task1, 0, NULL, &eventtask1); clEnqueueTask(command, task2, 0, NULL, &eventtask2); clEnqueueTask(command, task3, 0, NULL, &eventtask3); Say, Task 1 load 1 Million floats from global memory and channel pass it to task 2. Task 2 then perform summation and channel it to Task 3 Task 3 then write back to Global memory. --- Quote End --- If you want the kernels to execute in pipeline fashion like your picture, you should use different command queues and pass data via channels, no need for event. Altera have excellent examples like FFT example and channelizer here (https://www.altera.com/products/design-software/embedded-software-developers/opencl/developer-zone.html).