I have a float[][] of pixels of an image, I will perform an operation on each pixel of this image. My current implementation is as follows:
float[][] pixels = image.pixels;
for(x = 0; x < pixels[0].length; x++) {
for(y = 0; y < pixels.length; y++) {
//perform operation on pixel
}
}
This implementation is very slow and I would like to speed it up by parallelising the for loops, how would I go about doing this?