<?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 Sparse conversion routines; convert in place ? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015870#M19481</link>
    <description>&lt;P&gt;I would like to convert from COO to CSR without making a new copy of my matrix. Is it OK to have actual arguments point to the same arrays, i.e. &lt;SPAN class="parmname"&gt;acsr and acoo are the same array and similar for the index arrays ? The help file does not specify.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Sep 2015 12:46:55 GMT</pubDate>
    <dc:creator>Andrew_Smith</dc:creator>
    <dc:date>2015-09-07T12:46:55Z</dc:date>
    <item>
      <title>Sparse conversion routines; convert in place ?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015870#M19481</link>
      <description>&lt;P&gt;I would like to convert from COO to CSR without making a new copy of my matrix. Is it OK to have actual arguments point to the same arrays, i.e. &lt;SPAN class="parmname"&gt;acsr and acoo are the same array and similar for the index arrays ? The help file does not specify.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 12:46:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015870#M19481</guid>
      <dc:creator>Andrew_Smith</dc:creator>
      <dc:date>2015-09-07T12:46:55Z</dc:date>
    </item>
    <item>
      <title>In general, unless the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015871#M19482</link>
      <description>&lt;P&gt;In general, unless the documentation says so explicitly, it is not safe to have aliased arguments passed to library subroutines. Furthermore, In Fortran there is a restriction on procedure arguments being aliased:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;12.5.2.13 Restrictions on entities associated with dummy arguments&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; 1 While an entity is associated with a dummy argument, the following restrictions hold.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ....&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(3) Action that affects the value of the entity or any subobject of it shall be taken only through the&amp;nbsp;dummy argument&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;The compiler may not be able to detect if your code violates this requirement, and it is hard to catch associated bugs at run time.&lt;/P&gt;

&lt;P&gt;In the case that you mentioned, the COO representation contains two index arrays of size N&lt;SUB&gt;nz&lt;/SUB&gt;, whereas the CSR representation contains an index array of size N&lt;SUB&gt;nz&lt;/SUB&gt; and a row-pointer array of size N+1, so one output array does not match any corresponding input array in size.&lt;/P&gt;

&lt;P&gt;Why take the risk? If the arrays are dynamically allocated, it is easy enough to discard the COO arrays once the conversion is completed, or to reuse the allocated memory for some other useful purpose.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2015 14:03:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015871#M19482</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-09-07T14:03:00Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015872#M19483</link>
      <description>&lt;P&gt;Hi Andrew,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Right, as micej &amp;nbsp;noted that the aliasing pointers is not supported unless explicitly mentioned in the documentation.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2015 07:26:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Sparse-conversion-routines-convert-in-place/m-p/1015872#M19483</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-09-10T07:26:05Z</dc:date>
    </item>
  </channel>
</rss>

