Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

SSE intrinsics support for double-precision?

auyw
Beginner
726 Views
I am currently using the Linux "non-commercial unsupported" compiler with a PIV. While writing SSE codes using intrinsics, I received compilation failures whenever I try to use double-precision operations/variables with SSE. Specifically, operations such as _mm_add_ps works, but not _mm_add_pd. For example,

sse0 = _mm_add_pd(sse1, sse2)
throws the error:
error: argument of type "struct " is incompatible with parameter of type "__mm128"
Where I defined all sse* as __mm128

I opened xmmintrin.h to take a look, and saw that only single precision operations are defined. (__m128d is not defined but __m128 is.)But the downloadable SSE tutorial explicitly used double-precision variables/operations. Is there some other header or library I need to specify? Or do I need another version of the compiler?

Thank You and Regards.
0 Kudos
2 Replies
Elizabeth_S_Intel
726 Views
You will find _mm_add_pd and __m128d defined in emmintrin.h.

Regards,

Elizabeth S.
Intel Customer Support
0 Kudos
auyw
Beginner
726 Views
Thank you for the help!
0 Kudos
Reply