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..
SSE (streaming SIMD extensions) and AVX (advanced vector extensions) are SIMD (single instruction multiple data streams) instruction sets supported by recent CPUs manufactured in Intel and AMD. This SIMD programming allows parallel processing by multiple cores in a single CPU.
SSE is a process or technology that enables single instruction multiple data. Older processors only process a single data element per instruction. SSE enables the instruction to handle multiple data elements.
AVX2 (also known as Haswell New Instructions) expands most integer commands to 256 bits and introduces new instructions. They were first supported by Intel with the Haswell processor, which shipped in 2013.
AVX provides intrinsic functions that combine one or more values into a 256-bit vector. Table 2 lists their names and provides a description of each. There are similar intrinsics that initialize 128-bit vectors, but those are provided by SSE, not AVX.
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:
Searching for a given Intel SIMD mnemonic on a single page (via a text search):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With