<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Leo，Thanks very much for your in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931377#M14893</link>
    <description>&lt;P&gt;Leo，Thanks very much for your help!&lt;/P&gt;
&lt;P&gt;It is my&amp;nbsp;carelessness. &amp;nbsp;_&lt;I&gt;MASK&lt;/I&gt;_10 is defined as 0x10 for "&lt;EM&gt;#define _MASK_10 0x10&lt;/EM&gt;", and other&amp;nbsp;_&lt;I&gt;MASK&lt;/I&gt;_* have the same mean. By the way, my snippet can work, but it perform badly.&lt;/P&gt;
&lt;P&gt;I have tested the method just like yours. But I use&amp;nbsp;_mm512_alignr_epi32. It work better than the original version! &amp;nbsp;The follow is my way:&lt;/P&gt;
&lt;P&gt;__m512d _sl1_vec_pach;&lt;BR /&gt;#define F64_SL1(_sl1_arg_zmm, _sl1_f64_pach, _sl1_arg_val4)\&lt;BR /&gt;(\&lt;BR /&gt; _sl1_vec_pach=_mm512_set1_pd((_sl1_f64_pach)),\&lt;BR /&gt; (__m512d)_mm512_alignr_epi32((__m512i)_sl1_arg_zmm,(__m512i)_sl1_vec_pach,14)\&lt;BR /&gt;)&lt;BR /&gt; &lt;BR /&gt;__m512d _sr1_vec_pach;&lt;BR /&gt;#define F64_SR1(_sr1_arg_zmm, _sr1_f64_pach, _sr1_arg_val4)\&lt;BR /&gt;(\&lt;BR /&gt; _sr1_vec_pach=_mm512_set1_pd((_sr1_f64_pach)),\&lt;BR /&gt; (__m512d)_mm512_alignr_epi32((__m512i)_sr1_vec_pach,(__m512i)_sr1_arg_zmm,2)\&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;I still don't satisfy that, because I think the instructions "&lt;EM&gt;_mm512_set1_pd((_s*1_f64_pach))&lt;/EM&gt;" waste the bandwidth seriously. So I still want to know whether there are some vector shift instructions that can work between a vector register and one scalar which needed to be pached the space generated by the vector shift.&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Thu, 18 Apr 2013 12:46:50 GMT</pubDate>
    <dc:creator>zhang_y_1</dc:creator>
    <dc:date>2013-04-18T12:46:50Z</dc:date>
    <item>
      <title>MIC doesn't have float64 vector shift instructions</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931373#M14889</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I need to shift vector register in &amp;nbsp;64-bit double floats. The value in the register is showed as follows:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;V:&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |&lt;/P&gt;
&lt;P&gt;I want to perform an element-by-element logical left or right shift of float64 vector&amp;nbsp;&lt;STRONG&gt;V&lt;/STRONG&gt;. For example,&amp;nbsp;after&amp;nbsp;shifting by the number of 2 float64, we can get the result as follows:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;V:&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;| &lt;EM&gt;0&lt;/EM&gt; |&amp;nbsp;&lt;EM&gt;0&lt;/EM&gt; |&amp;nbsp;5 | 4 | 3 | 2 | 1 | 0 |&lt;/P&gt;
&lt;P&gt;But I cann't find a instruction like that. Are there some instructions satisfy me?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(By the way, I saw instructions can performs an element-by-element logical shift of int32 vector&amp;nbsp;v2. For example:&lt;EM&gt;_mm512_sllv_epi32&lt;/EM&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;)&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 13:46:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931373#M14889</guid>
      <dc:creator>zhang_y_1</dc:creator>
      <dc:date>2013-04-16T13:46:52Z</dc:date>
    </item>
    <item>
      <title>I think that's what the</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931374#M14890</link>
      <description>&lt;P&gt;I think that's what the "swizzle" and "permute" instructions are for. One of them moves around 4 blocks of 4 floats inside a register, and the other moves floats within each block. In the Intel Xeon Phi Coprocessor Instruction Set Architecture Reference Manual, they are described in Section 2.2. In the Intel C++ Compiler XE User and Reference Guide, the corresponding intrinsics are described in "Compiler Reference -&amp;gt; Intrinsics -&amp;gt; Intrinsics for the Intel MIC Architecture -&amp;gt; Shuffle Intrinsics" (and maybe this link will work: &lt;A href="http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/cpp-lin/hh_goto.htm#GUID-E903C1C4-A361-4D12-9A3A-DD1047B4A2A3.htm"&gt;http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/cpp-lin/hh_goto.htm#GUID-E903C1C4-A361-4D12-9A3A-DD1047B4A2A3.htm&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:39:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931374#M14890</guid>
      <dc:creator>Andrey_Vladimirov</dc:creator>
      <dc:date>2013-04-16T17:39:03Z</dc:date>
    </item>
    <item>
      <title>I have saw these instructions</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931375#M14891</link>
      <description>&lt;P&gt;I have saw these instructions. But permute instructions can only be used &amp;nbsp;on float64 vectors. So I realize the&amp;nbsp;logical shift of float64 vector on "swizzle" instruction. It worked. But the problem is that I need 6 instructions in total to perform a logical left or right shift. For example,&lt;/P&gt;
&lt;P&gt;#define F64_SL1(_sl1_arg_zmm, _sl1_arg_pach, _sl1_arg_val4)\&lt;BR /&gt;(\&lt;BR /&gt; _sl1_d1=_mm512_swizzle_pd((_sl1_arg_zmm), _MM_SWIZ_REG_CDAB),\&lt;BR /&gt; _sl1_d2=_mm512_mask_swizzle_pd(_sl1_d1, _MASK_44, (_sl1_arg_zmm), _MM_SWIZ_REG_BBBB),\&lt;BR /&gt; _sl1_d3=_mm512_set1_pd((_sl1_arg_val4)),\&lt;BR /&gt; _sl1_d4=_mm512_mask_swizzle_pd(_sl1_d2, _MASK_10, _sl1_d3, _MM_SWIZ_REG_NONE),\&lt;BR /&gt; _sl1_d5=_mm512_set1_pd((_sl1_arg_pach)),\&lt;BR /&gt; _mm512_mask_swizzle_pd(_sl1_d4, _MASK_01, _sl1_d5, _MM_SWIZ_REG_NONE) \&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;It is so expensive!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 02:12:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931375#M14891</guid>
      <dc:creator>zhang_y_1</dc:creator>
      <dc:date>2013-04-17T02:12:23Z</dc:date>
    </item>
    <item>
      <title>Hello Zhang,</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931376#M14892</link>
      <description>&lt;P&gt;Hello Zhang,&lt;/P&gt;
&lt;P&gt;I confess I was not able to fully follow the &amp;nbsp;example above: what are de definitions for _&lt;I&gt;MASK&lt;/I&gt;_*?&amp;nbsp; Are all open/close parenthesis matched in the definition of the C macro F64_SL1 ?&lt;/P&gt;
&lt;P&gt;Although the intrinsics API for permute is targeted for i32, I _&lt;I&gt;wonder&lt;/I&gt;_ if one can just apply two i32 permutations to get a 64bit permutation. Use the masked version to fill the shifted portion with the new value(s) you want. My thoughts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;#define rotate_mask_d 0xfffc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;__m512i permut_idx_d = _mm512_set_epi32(13,12,11,10,9,8,7,6,5,4,3,2,1,0,15,14);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; __m512d v_fill_value&amp;nbsp; = _mm512_set1_pd(-10.0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; v_target = (__m512d) _mm512_mask_permutevar_epi32((__m512i)v_fill_value, rotate_mask_d, permut_idx_d, (__m512i)v_target);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, for v_target = 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; should be rotated to&amp;nbsp;&amp;nbsp; -10, 1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And opposite masks&amp;nbsp;should rotate to the other direction:&lt;/P&gt;
&lt;P&gt;#define rotate_mask_d 0x3fff&lt;/P&gt;
&lt;P&gt;__m512i permut_idx_d = _mm512_set_epi32(1,0,15,14,13,12,11,10,9,8,7,6,5,4,3,2);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This might worth a try...&lt;/P&gt;
&lt;P&gt;Leo.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 17:49:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931376#M14892</guid>
      <dc:creator>Leonardo_B_Intel</dc:creator>
      <dc:date>2013-04-17T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Leo，Thanks very much for your</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931377#M14893</link>
      <description>&lt;P&gt;Leo，Thanks very much for your help!&lt;/P&gt;
&lt;P&gt;It is my&amp;nbsp;carelessness. &amp;nbsp;_&lt;I&gt;MASK&lt;/I&gt;_10 is defined as 0x10 for "&lt;EM&gt;#define _MASK_10 0x10&lt;/EM&gt;", and other&amp;nbsp;_&lt;I&gt;MASK&lt;/I&gt;_* have the same mean. By the way, my snippet can work, but it perform badly.&lt;/P&gt;
&lt;P&gt;I have tested the method just like yours. But I use&amp;nbsp;_mm512_alignr_epi32. It work better than the original version! &amp;nbsp;The follow is my way:&lt;/P&gt;
&lt;P&gt;__m512d _sl1_vec_pach;&lt;BR /&gt;#define F64_SL1(_sl1_arg_zmm, _sl1_f64_pach, _sl1_arg_val4)\&lt;BR /&gt;(\&lt;BR /&gt; _sl1_vec_pach=_mm512_set1_pd((_sl1_f64_pach)),\&lt;BR /&gt; (__m512d)_mm512_alignr_epi32((__m512i)_sl1_arg_zmm,(__m512i)_sl1_vec_pach,14)\&lt;BR /&gt;)&lt;BR /&gt; &lt;BR /&gt;__m512d _sr1_vec_pach;&lt;BR /&gt;#define F64_SR1(_sr1_arg_zmm, _sr1_f64_pach, _sr1_arg_val4)\&lt;BR /&gt;(\&lt;BR /&gt; _sr1_vec_pach=_mm512_set1_pd((_sr1_f64_pach)),\&lt;BR /&gt; (__m512d)_mm512_alignr_epi32((__m512i)_sr1_vec_pach,(__m512i)_sr1_arg_zmm,2)\&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;I still don't satisfy that, because I think the instructions "&lt;EM&gt;_mm512_set1_pd((_s*1_f64_pach))&lt;/EM&gt;" waste the bandwidth seriously. So I still want to know whether there are some vector shift instructions that can work between a vector register and one scalar which needed to be pached the space generated by the vector shift.&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 12:46:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931377#M14893</guid>
      <dc:creator>zhang_y_1</dc:creator>
      <dc:date>2013-04-18T12:46:50Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;I need to shift vector</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931378#M14894</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;I need to shift vector register...&lt;BR /&gt;&amp;gt;&amp;gt;V:&amp;nbsp;&amp;nbsp;&amp;nbsp; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |&lt;BR /&gt;&amp;gt;&amp;gt;V:&amp;nbsp;&amp;nbsp;&amp;nbsp; | 0 | 0 | 5 | 4 | 3 | 2 | 1 | 0 |&lt;/P&gt;
&lt;P&gt;The above is not a shift, but could be done with mask&lt;/P&gt;
&lt;P&gt;Shift 2 right would result in:&lt;BR /&gt;V:&amp;nbsp;&amp;nbsp;&amp;nbsp; | 0 | 0 | 7 | 6 | 5 | 4 | 3 | 2 |&lt;/P&gt;
&lt;P&gt;Try using the int32 instruction and shifting 2x the distance.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 13:03:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931378#M14894</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2013-04-18T13:03:47Z</dc:date>
    </item>
    <item>
      <title>If "pach" is constant, then</title>
      <link>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931379#M14895</link>
      <description>&lt;P&gt;If "pach" is constant, then load it once "p8=_mm512_set1_pd(&amp;amp;pach)" and use p8 -- it will stay in a register.&lt;/P&gt;
&lt;P&gt;By the way, small functions declared as __forceinline can replace macro substitutions in many cases.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 13:49:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/MIC-doesn-t-have-float64-vector-shift-instructions/m-p/931379#M14895</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2013-04-18T13:49:48Z</dc:date>
    </item>
  </channel>
</rss>

