The CUDA code as of now produces ouput matrices of size 601 x 1001 which is also the desired size. The time taken is less than 10 secs. And the data compared to MATLAB is very close