Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Smart_Lubobya
Beginner
58 Views

how do i write negative variables using sse2 intrinsics?

example:
y= (-x)*b

tried checking in chapter 10,11 of the intel mannuals and emmintrin.h file. could not figure out. please help
0 Kudos
1 Reply
piet_de_weer
Beginner
58 Views

-x = 0-x

So something like:
y = _mm_mul_type(_mm_sub_type(_mm_setzero(), x), b)

Fill in 'type' appropriately.

Reply