Community
cancel
Showing results for 
Search instead for 
Did you mean: 
threethazz
Beginner
66 Views

fabs() and SIMD

Hello, I've been seaching over the web and also intel foruns and I cannot find a version of fabs() function in SIMD....

I have a __m128 x variable and I want to get the absolute value of the 4 float values in x.

Sorry if this is a re-post, but I cannot really find anything concerning this topic.

thank you in advance,
threethazz.
0 Kudos
1 Reply
neni
New Contributor II
66 Views

sign bit in single prec FP is in bit 31, all you need to do is clearthis bitusing andps with a predefined mask of 4 x 0x7fffffff values

Reply