This is just one of the many ways to implement the GS algorithm. Aside from optimizations, others may start by performing a forward Fourier transform to the source distribution.
Gerchberg, R. W.; Saxton, W. O. (1972). "A practical algorithm for the determination of the phase from image and diffraction plane pictures" (PDF). Optik. 35: 237–246. Archived from the original (PDF) on March 28, 2016. https://web.archive.org/web/20160328053000/http://www.u.arizona.edu/~ppoon/GerchbergandSaxton1972.pdf ↩
Memmolo, Pasquale; Miccio, Lisa; Merola, Francesco; Paciello, Antonio; Embrione, Valerio; Fusco, Sabato; Ferraro, Pietro; Antonio Netti, Paolo (2014-01-01). "Investigation on specific solutions of Gerchberg–Saxton algorithm". Optics and Lasers in Engineering. 52: 206–211. doi:10.1016/j.optlaseng.2013.06.008. ISSN 0143-8166. https://www.sciencedirect.com/science/article/pii/S0143816613001942 ↩