Intel® C++ Compiler Classic Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-6C34DD71-0BC9-42E1-A89D-4858434F2EAB
Visible to Intel only — GUID: GUID-6C34DD71-0BC9-42E1-A89D-4858434F2EAB
Macro Function for Shuffle Operations
Intel® Streaming SIMD Extensions (Intel® SSE) provide a macro function to help create constants that describe shuffle operations. The macro takes four small integers (in the range of 0 to 3) and combines them into an 8-bit immediate value used by the SHUFPS instruction.
Shuffle Function Macro

You can view the four integers as selectors for choosing which two words from the first input operand and which two words from the second are to be put into the result word.
View of Original and Result Words with Shuffle Function Macro
