Software Archive
Read-only legacy content
Comunicados
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

How to use swizzling ?

Erik_Saule
Principiante
1.452 Visualizações

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 Respostas
TaylorIoTKidd
Novo colaborador I
1.452 Visualizações
Hi Erik, I am researching your question and get back to you very soon. Regards -- Taylor
Frances_R_Intel
Funcionário
1.452 Visualizações
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.
Erik_Saule
Principiante
1.452 Visualizações
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.
Responder