SSE intrinsic functions reference [closed]

五迷三道 提交于 2019-12-28 02:24:26

问题


Does anyone know of a reference listing the operation of the SSE intrinsic functions for gcc, i.e. the functions in the <*mmintrin.h> header files?

Thanks.


回答1:


As well as all the online PDF documentation already mentioned, there is also a very useful utility which summarizes all the instructions and intrinsics and groups them by technology. It runs on Linux, Windows and Mac OS X. It's hidden away on Intel's AVX technology page but it's equally useful for SSE programming. Go to http://software.intel.com/en-us/articles/intel-intrinsics-guide and then select the Intel Intrinsics Guide for your platform of choice.

UPDATE

There is now an online version of the intrinsics guide, so you no longer need to install anything, and it's always up-to-date.




回答2:


I found these headers were needed for invoking the different versions of SSE from GCC:

  • For SSE2:
extern "C"
{
#include <emmintrin.h>
#include <mmintrin.h>
}
  • For SSE3:
extern "C" 
{
#include <pmmintrin.h>
#include <immintrin.h>   // (Meta-header)
}
  • For SSE4:
extern "C" 
{
#include <smmintrin.h>
}

In modern versions of the compilers, all the headers seem to be common to Visual Studio and GCC.




回答3:


SSEPlus table on intrinsics is very easy to use for most cases.




回答4:


The GCC intrinsics are implementations of the Intel compiler intrinsics. They are documented in Intel® 64 and IA-32 Architectures Developer's Manual: Vol. 2C - Appendix C.




回答5:


These originally come from Intel. Intel C++ compiler describes those in its manual. AMD probably has its own manual containing those for 3Dnow! You will have to compare the availability of those with the *mmintrin.h shipped with your version of GCC.



来源:https://stackoverflow.com/questions/7156908/sse-intrinsic-functions-reference

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!