This causes so much delay in applying convolution to images, which will cause problems for the more advanced operations. The massive for loop can be rewritten to divide the image up into blocks, to then apply the same code in a SPMD manner.