how to enqueue 3 work items with different sizes and constraints

Viewed 25

I would like to have a work group of a framebuffer Width*Height plus a counter that goes from 0 to 18

I tried to set the global work size to 800,800,18, but get global id number 2 is always zero

        global_size[0] = 800;
        global_size[1] = 800;
        global_size[2] = 18;

        local_size[0] = 1;
        local_size[1] = 1;
        local_size[2] = 1;

        err = clEnqueueNDRangeKernel(queue, kernel_sendImageToPBO, 3, NULL, global_size,
            NULL, 0, NULL, &kernel_event);
        if (err < 0) {
            perror("Couldn't enqueue the kernel");
            exit(1);
        }

in kernel

int x = get_global_id(0);
int y = get_global_id(1);
int z = get_global_id(2);
printf("%d \r\n", z);
0 Answers
Related