I hope someone knows clFFT, my problem is that when I create a Plan 2D and run with a greater than 256x256 matrix, throws an error when I read of buffer(although, when the buffer does not have to do with the execution of plan).

EL full code I try to run, I leave HERE

I guess I can't do FFT with more than 256x256 values, but in 1D allows me more larger than 1000x1000 values and in the documentation of clFFT, for 2D should be larger than 256x256

The error es -5 (CL_OUT_OF_RESOURCES ) when read the buffer