[R] x86 SSE* Pointer Favors

ivo welch ivowel at gmail.com
Fri Jun 13 06:23:06 CEST 2008


Dear Statisticians--- This is not even an R question, so please
forgive me.  I have so much ignorance in this matter that I do not
know where to begin.  I hope someone can point me to documentation
and/or a sample.

I want to compute a covariance as quickly as non-humanly possible on
an Intel core processor (up to SSE4) under linux.  Alas, I have no
idea how to engage CPU vectorization.  Do I need to use special data
types, or is "double" correct?  Does SSE* understand NaN?  Should I
rely on gcc autodetection of the vectorized meaning of my code, or are
there specific libraries that I should call?

What I want to learn about is as simple as it gets:
  typedef double Double;  // or whatever SSE* needs as close equivalent
  Double vector1[N], vector2[N];
  // then fill them with stuff.
  vector3= vector_mult(vector1,vector2, N);
  vector4= sum(vector1, N);

I just need a pointer and/or primer.  PS: If someone knows of a
superfast vectorized implementation of Gentleman's WLS algorithm,
please point me to it, too.  I am still using my old non-vectorized C
routines.

if this email offends as spam, apologies.

regards,

/iaw



More information about the R-help mailing list