Intel SSE and AVX Examples and Tutorials [closed]

不想你离开。 提交于 2019-12-20 08:03:03

问题


Is there any good C/C++ tutorials or examples for learning Intel SSE and AVX instructions?

I found few on Microsoft MSDN and Intel sites, but it would be great to understand it from the basics..


回答1:


For the visually inclined SIMD programmer, Stefano Tommesani's site is the best introduction to x86 SIMD programming.

http://www.tommesani.com/index.php/simd/46-sse-arithmetic.html

The diagrams are only provided for MMX and SSE2, but once a learner gets proficient with SSE2, it is relatively easy to move on and read the formal specifications.


Intel IA-32 Instructions beginning with A to M

http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf

Intel IA-32 Instructions beginning with N to Z

http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2b-manual.pdf


In addition, it is important for Intel SIMD programmers to know the minimum required architecture for instructions that are outside the SSE2 generation.

Browsing by generations on Wikipedia:

  • http://en.wikipedia.org/wiki/SSE3
  • http://en.wikipedia.org/wiki/SSSE3
  • http://en.wikipedia.org/wiki/SSE4.1#SSE4.1
  • http://en.wikipedia.org/wiki/SSE4.2#SSE4.2

Searching for a given Intel SIMD mnemonic on a single page (via a text search):

  • http://en.wikipedia.org/wiki/X86_instruction_listings




回答2:


There is a nice introduction here

Code project SSE

Also if you have Microsoft DirectX SDK installed, the source from xnamath has lot of vector/matrix operations using sse intrinsics (check in the sdk include folder, xnamath.h, xnamathconvert.inl, xnamathmatrix.inl ...)




回答3:


There is some good stuff on Apple's developer site, e.g. SSE Performance Programming.




回答4:


You might find it useful to look at examples of how SIMD can be applied to some common algorithms. At Games Developer Conference 2011, there was an Intel talk called "Hotspots, FLOPS, and uOps: To-the-Metal CPU Optimization" that attempts to demonstrate SIMD for algorithms common in games. The talk refers to some Intel sample code that shows how AVX can be applied to cloth calculations.



来源:https://stackoverflow.com/questions/13577226/intel-sse-and-avx-examples-and-tutorials

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