Re: Why worse performace in euclidean distance with SSE2?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dario Bahena Tapia wrote:
inline static double dist(int i,int j)
{
  double xd = C[i][X] - C[j][X];
  double yd = C[i][Y] - C[j][Y];
  return rint(sqrt(xd*xd + yd*yd));
}
[...]
And in order to activate the SSE2 features, I am using the following
flags for gcc (my computer is a laptop):

CFLAGS = -O -Wall -march=pentium-m -msse2

These options do not make dist() use any SSE for me.  Have you
tried compiling with this?

CFLAGS = -O2 -Wall -march=pentium-m -mfpmath=sse

I think -msse2 is redundant if you say -march-pentium-m.  I don't
have an SSE2 machine to try this though.

jlh

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux