HPC Magazine January 2014 - Kepler vs Xeon Phi - Listing 2.

The compute-bound test pseudo-code.


public float myfunc(float x)
{
  float res = x + 8;
  res = res * x + 56;
  res = res * x + 336;
  res = res * x + 1680;
  res = res * x + 6720;
  res = res * x + 20160;
  return res * x * 2.4801587301587301587301587301587e-5f;
}

public void Compute(int count, float[] a, float[] b)
{
  for (int k = 0; k < count; ++k)
  {
    b[k] = myfunc(myfunc(myfunc(myfunc(
      myfunc(myfunc(myfunc(myfunc(
      myfunc(myfunc(myfunc(myfunc(
        a[k]))))))))))));
  }
}