Reference manual/tutorial for SIMD intrinsics? [closed]

谁说胖子不能爱 提交于 2020-06-24 01:36:12

问题


I'm looking into using these to improve the performance of some code but good documentation seems hard to find for the functions defined in the *mmintrin.h headers, can anybody provide me with pointers to good info on these?

EDIT: particularly interested in a very basic tutorial on how to get started.


回答1:


There's a handy Intel Intrinsics Guide for Mac/Linux/Windows at http://software.intel.com/en-us/articles/intel-intrinsics-guide - it covers all Intel SIMD stuff from MMX through the various flavours of SSE up to AVX2 et al.

You can also get the following PDFs from Intel:

  • Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2A: Instruction Set Reference, A-M (253666-021)

  • Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2B: Instruction Set Reference, N-Z (253667-021)

  • Intel® SSE4 Programming Reference (D91561-001)

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:


This is the best introduction to MMX/SSE programming I ever found. (I've programmed SSE2 for 5 years and I still find this tutorial to be the most conceptually clear.)

http://www.tommesani.com/Docs.html

This is not a complete list of instructions; so once you're ready to learn more, do start reading the Intel intrinsics guide as @PaulR suggests.

One important thing to keep in mind is that MMX/SSE tend to be severely limiting in terms of movements of data (shuffle or arbitrary permutation, or change of single element). This is a limitation of CPU silicon design. Scatter-gather instructions were only added a few years ago, and might not even be available on your customer's computers.

There is a large repertoire of vectorization tricks for MMX/SSE similar to the way http://www.hackersdelight.org/ prescribes tricks for exploiting bit-parallel operations.



来源:https://stackoverflow.com/questions/6857906/reference-manual-tutorial-for-simd-intrinsics

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