I was thinking of trying out OpenCL for running calculations on a Mandelbrot program and I have a few questions.
As far as I know you want to have as many workers as possible (well not as many as you can maybe but quite a few anyway). Mandelbrot is calculated by performing a number of iterations for each pixel on the screen.
Is it a good idea to have one worker for each pixel (this would limit the window to 512x512 on my computer it seems since local_work_size == global_work_size == 512) or what do you think?
If I have one worker per pixel how do I get the index of the pixel? I've tried get_global_id(0)*512 + get_local_id(0) but that didn't seem to work at all.
Otherwise I could just calculate each row in one worker but the problem is if I have more than 512 rows, how is this best soloved?