Take advantage of REPA with gridDim and randGrid.
Optimized with REPA and stencil algorithm