Research Article

TESLA GPUs versus MPI with OpenMP for the Forward Modeling of Gravity and Gravity Gradient of Large Prisms Ensemble

Pseudocode 1

If (K<=M) then
For each jfrom 1 to Ny
For each ifrom 1 to Nx
    G(Thread,i,j) = Gz(parameters) +G(Thread,i,j);
  End For
End For
Else
For each jfrom 1 to Ny
  For each ifrom 1 to Nx
     G(Thread, i, j) =G(Thread,i,j)+0.0
  End For
End For
End if