c++11 – speed up a C++ code using openmp


How can i parallelize this following code using openmp:

int np = 1000000;
int maxkes = 100;
for (ies = 0; ies < np; ies++){
    for (jes = ies+1; jes < np; jes++){

        double dxp = xp(ies) - xp(jes);
        double dyp = yp(ies) - yp(jes);
        double dzp = zp(ies) - zp(jes);
        double distance = sqrt( dxp * dxp + dyp * dyp + dzp * dzp );
        double gpspec = gpx(ies) * gpx(jes) + gpy(ies) * gpy(jes) + gpz(ies) * gpz(jes);

        for (kes = 1; kes <= maxkes; kes++){

            if (distance < distance_thresh(kes)){
                double distan = kes * distance;
                E1(kes) = E1(kes) + gpspec * sin(distan) / distan;
            }
        }
    }
}

The calculation cost is very expensive because three loops and two outside loops with size = 1000 000. I wish to receive some suggestion on parallel computing using OpenMP.