It really takes my time. I could not find an easy way to evaluate FLOPS for the following code (loop), how many FLOPS for one iteration of the loop:
float func(float * atominfo, float energygridItem, int xindex, int yindex) { ... for (atomid=0; atomid<numatoms*4; atomid+=4) { float dy = coory - atominfo[atomid+2]; float dysqpdzsq = (dy * dy) + atominfo[atomid+3]; float dx1 = coorx1 - atominfo[atomid+1]; float s, y, t; s = atominfo[atomid] * (1.0f / sqrtf(dx1*dx1 + dysqpdzsq)); y = s - energycomp1; t = energyvalx1 + y; energycomp1 = (t - energyvalx1) - y; energyvalx1 = t; } ... }
It looks simple, but I got confused in some other numbers given earlier, so it would be great if someone could specify the exact number.
Thanks.
usman source share