AnsweredAssumed Answered


Question asked by alexfd7 on Nov 7, 2015
Latest reply on Nov 7, 2015 by nibal

Hello everyone, I have a question

In this simple example of KERNEL:



__kernel void blank(__global int4 *x) {

     for(int i=0; i<25; i++) {
     x[i] *= 2;


I initialized a vector, and put in a buffer and send as parameter to KERNEL:


      // Initialize data
      for(i=0; i<100; i++) {
         data[i] = i;


If I am correct, the vector of 100 positions will be divided into 4 parts, within the variable '__global int4'. And how is the execution? will be created 4 work-items in the same workgroup and executed in a single processing unit. Or will be created four work-groups and each running on a different processing unit.

I did not understand how it will be executed in relation to work-item and work-group.


To send the KERNEL to run, I'm not using the "enqueueNDRangeKernel" function, just "queue.enqueueTask (kernel);"


Thank you