Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements

ippsMagnitude/SSEx rounding issues?

Beginner
184 Views
Hello all,

Our application requires computation of an acoustic wave envelope, and thus the ippsMagnitude function is very appropriate for our needs. What I wasn't expecting is that the Ipp32f (float) version of this routine would have rounding behavior different from its scalar counterpart, which is really to say (I believe) that SSEx floating point instruction rounding is different that its scalar instruction counterpart. To illustrate, I wrote test code (attached) which compares scalar vs. vector calculation of magnitude. Example results are below:

x=5 y=24005 res1=24005 res2=24004.998046875
x=5 y=24007 res1=24007 res2=24006.998046875
x=5 y=24012 res1=24012.001953125 res2=24011.998046875
x=5 y=24014 res1=24014 res2=24013.998046875

Note: res1 is the result of the scalar operation, res2 is the result of the vector operator, and x & y can be considered as the real and imaginary parts, respectively.

I've used the "floor" function to catch the most egregious rounding differences between the scalar & vector operations, in which the vector operator actually returns a value *less* than either the real or the imaginary component - an obvious impossibility from a magnitude calculation. I understand the notion of rounding error with base-2 calculations, but I am curious about the difference in scalar vs. vector rounding, since the 32-bit floating point scalar operations seem to suffer much less effect than the vector operations.

To summarize, I would just like to confirm that this is indeed a function of SSEx instructions, and not of the IPPS library itself. For our purposes, it makes the 32-bit floating point IPPS routines very difficult to use, so confirmation is very important for our purposes.

-todd

p.s. We're running IPP 5.1 Windows on a Pentium IV.

Todd Kelman, Engineering Consultant
Volcano Corporation
2870 Kilgore Rd.
Rancho Cordova, CA 95670
tkelman@volcanocorp.com

Message Edited by tjkelman on 06-22-200612:38 PM

Message Edited by tjkelman on 06-22-200612:39 PM