Software Archive
Read-only legacy content
17061 Discussions

How to use swizzling ?

Erik_Saule
Beginner
1,154 Views

Dear all,

The software development guide makes a great case at presenting the possiblities offered by hardware swizzling on Xeon Phi. But I could not understand how to use swizzling in practice.

There appear to be some intrinsic available in "zmmintrin.h"  (the only header file that appears to provide 512 bits SIMD intrinsic. included from "immintrin.h"). Some mention swizzling but not all operations appear to support it. And only a handful of swizzling option appear to be supported. In particular I could not find how to apply "lane shifting".

Where can I find documentation on how to use swizzling in pratice? Is swizzling supposed to be used only from assembly?

Best

Erik

0 Kudos
3 Replies
TaylorIoTKidd
New Contributor I
1,154 Views
Hi Erik, I am researching your question and get back to you very soon. Regards -- Taylor
0 Kudos
Frances_R_Intel
Employee
1,154 Views
In the Intel® C++ Compiler XE 13.0 User and Reference Guides (go to Developer Tools at the top of this page, then select Product Documentation and look under C++ Composer 2013), if you search on "swizzle", it will lead you to descriptions of various mm512 instrinsics that perform a swizzle or support some sort of swizzle flag. Also, it sound like you have found the system software developers guide. If you haven't already looked at the instruction set architecture reference manual (there is a link on the http://software.intel.com/en-us/mic-developer web page), you might find that useful. It will tell you which instrinsics, if any, correspond to the different vector operations.
0 Kudos
Erik_Saule
Beginner
1,154 Views
I think I understand now. Most vectorial instruction can take one of its operand from the swizzle/conversion/broadcast unit. And the patterns available for swizzle is actually limited. They are not all available. It is a shame that operations at the lane level are limited to 1 element to all or 1 lane to all. Lane shift operations would have been most useful. Thank you for the help.
0 Kudos
Reply