title: Counting Flops for a code!
body: <p>This is really taking my time. I could not find a simple way to estimate FLOPS for a following code (the loop), How much FLOPS are for a single iteration of the loop:</p>
  
  <pre><code>float func(float * atominfo, float energygridItem, int xindex, int yindex)
  {
     ...
     for (atomid=0; atomid&lt;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;
      }
      ...
  }
  </code></pre>
  
  <p>It looks simple but I got confused with some other numbers given earlier, so it would be great if someone can give an exact number.</p>
  
  <p>Thanks.</p>