<?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 Matrix Rotation with MKL? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Rotation-with-MKL/m-p/777071#M1163</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This is Image Rotation. You could find the functionality in &lt;A href="http://software.intel.com/en-us/articles/intel-ipp/"&gt;Intel IPP&lt;/A&gt;: function &lt;A href="http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch12/functn_Rotate.html"&gt;Rotate&lt;/A&gt;and &lt;A href="http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-intel-ipp-source-code-examples/#6"&gt;example&lt;/A&gt; of it's usage.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Alexander.</description>
    <pubDate>Mon, 08 Aug 2011 08:35:06 GMT</pubDate>
    <dc:creator>Alexander_K_Intel3</dc:creator>
    <dc:date>2011-08-08T08:35:06Z</dc:date>
    <item>
      <title>Matrix Rotation with MKL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Rotation-with-MKL/m-p/777070#M1162</link>
      <description>Is this possible with MKL?&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I want to rotate a matrix about its center by an arbitrary angle. However, it cannot resize the destination matrix, meaning it should clip and spots in the destination may be blank.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I have this algorithm in use employing TBB. But, I'm not doing an elegant job of optimizing - to the point where I'm hoping MKL can do the job for me. If there is no such thing - I'm going to start playing with Tiling sizes and loop unrolling in hopes of getting better performance out of my current implementation.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Current implementation:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;//- sina = sin of angle&lt;/DIV&gt;&lt;DIV&gt;//- cosa = cos of angle&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;void operator() ( const tbb::blocked_range2d&lt;SIZE_T&gt; r ) const&lt;/SIZE_T&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  {&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    double xOffset;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    double yOffset;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    int lineOffset;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    int srcX;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    int srcY;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    for ( size_t row = r.rows().begin(); row != r.rows().end(); ++row )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    {&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      const size_t colBegin = r.cols().begin();&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      xOffset = -(row * sina) + xHelper + (cosa * colBegin);&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      yOffset = (row * cosa) + yHelper + (sina * colBegin);&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      lineOffset = ( row * rowSpan ); //- all col values are offsets of this row&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      for( size_t col = colBegin; col != r.cols().end(); ++col, xOffset += cosa, yOffset += sina )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      {&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;        srcX = xOffset;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;        srcY = yOffset;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;        if( srcX &amp;gt;= 0 &amp;amp;&amp;amp; srcX &amp;lt; colSpan &amp;amp;&amp;amp; srcY &amp;gt;= 0 &amp;amp;&amp;amp; srcY &amp;lt; rowSpan )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;        {&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;          destData[col + lineOffset] = srcData[srcX + ( srcY * rowSpan )];&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;        }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;      }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;    }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;  }&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Is this possibly a givens rotation? I'm reading about it, but I'm not sure how to do the equivalent thing in MKL should it be that!&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;Thanks!&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;P.S. I've asked this on StackOverflow as well, with perhaps more information about the issue:&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;A href="http://stackoverflow.com/questions/6942909/optimized-matrix-rotation-arbitrary-angle-about-center-of-matrix"&gt;http://stackoverflow.com/questions/6942909/optimized-matrix-rotation-arbitrary-angle-about-center-of-matrix&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Aug 2011 13:57:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Rotation-with-MKL/m-p/777070#M1162</guid>
      <dc:creator>Randy_Clepper</dc:creator>
      <dc:date>2011-08-04T13:57:24Z</dc:date>
    </item>
    <item>
      <title>Matrix Rotation with MKL?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Rotation-with-MKL/m-p/777071#M1163</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This is Image Rotation. You could find the functionality in &lt;A href="http://software.intel.com/en-us/articles/intel-ipp/"&gt;Intel IPP&lt;/A&gt;: function &lt;A href="http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch12/functn_Rotate.html"&gt;Rotate&lt;/A&gt;and &lt;A href="http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-intel-ipp-source-code-examples/#6"&gt;example&lt;/A&gt; of it's usage.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Alexander.</description>
      <pubDate>Mon, 08 Aug 2011 08:35:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Rotation-with-MKL/m-p/777071#M1163</guid>
      <dc:creator>Alexander_K_Intel3</dc:creator>
      <dc:date>2011-08-08T08:35:06Z</dc:date>
    </item>
  </channel>
</rss>

