<?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   in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014946#M19429</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The solution is easy!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The inverted matrix of a symmetrical matrix is symmetrical too. So the right code is:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;Complex[,] c = (Complex[,])a.Clone();

            int n = a.GetLength(0);
            int lda = n;
            int info = 1;

            int[] ipiv = new int&lt;N&gt;;

            info = MKLWrapper.LAPACKE_zsytrf(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);

            info = MKLWrapper.LAPACKE_zsytri(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);


            for (int i = 1; i &amp;lt;= a.GetLength(0); i++)
            {
                for (int j = 1; j &amp;lt;= a.GetLength(1); j++)
                {
                    if (i &amp;gt; j)
                        c[i, j] = c[j, i];
                }
            }


            if (info == 0)
                return c;
            else
                return null;&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2015 13:06:23 GMT</pubDate>
    <dc:creator>Gianluca_G_</dc:creator>
    <dc:date>2015-10-12T13:06:23Z</dc:date>
    <item>
      <title>Matrix Inversion LAPACKE_zsytri</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014945#M19428</link>
      <description>&lt;P&gt;hello everyone,&lt;/P&gt;

&lt;P&gt;I'm testing the inversion of a symmetric matrix, in order to do that, I wrote this code:&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;Complex[,] c = (Complex[,])a.Clone(); //I need to use it later
Complex[,] d = (Complex[,])a.Clone(); //I need to use it later

int n = a.GetLength(0);
int lda = n;
int info = 1;

int[] ipiv = new int&lt;N&gt;;

info = MKLWrapper.LAPACKE_zsytrf(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);

info = MKLWrapper.LAPACKE_zsytri(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);

ipiv = new int&lt;N&gt;;

info = MKLWrapper.LAPACKE_zsytrf(LAPACK_ROW_MAJOR, UPLO_L, n, d, lda, ipiv);

info = MKLWrapper.LAPACKE_zsytri(LAPACK_ROW_MAJOR, UPLO_L, n, d, lda, ipiv);


for (int i = 1; i &amp;lt;= a.GetLength(0); i++)
{
	  for (int j = 1; j &amp;lt;= a.GetLength(1); j++)
  	{
		    if (i &amp;gt; j)
			      c[i, j] = d[i, j];
	  }
}&lt;/N&gt;&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;This code works, but I'm not sure this is the right way to obtain my aim.&lt;/P&gt;

&lt;P&gt;Is there anyone that can help me?&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thank you very much&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Gianluca&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 11:07:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014945#M19428</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-12T11:07:26Z</dc:date>
    </item>
    <item>
      <title> </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014946#M19429</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The solution is easy!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The inverted matrix of a symmetrical matrix is symmetrical too. So the right code is:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;Complex[,] c = (Complex[,])a.Clone();

            int n = a.GetLength(0);
            int lda = n;
            int info = 1;

            int[] ipiv = new int&lt;N&gt;;

            info = MKLWrapper.LAPACKE_zsytrf(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);

            info = MKLWrapper.LAPACKE_zsytri(LAPACK_ROW_MAJOR, UPLO_U, n, c, lda, ipiv);


            for (int i = 1; i &amp;lt;= a.GetLength(0); i++)
            {
                for (int j = 1; j &amp;lt;= a.GetLength(1); j++)
                {
                    if (i &amp;gt; j)
                        c[i, j] = c[j, i];
                }
            }


            if (info == 0)
                return c;
            else
                return null;&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 13:06:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014946#M19429</guid>
      <dc:creator>Gianluca_G_</dc:creator>
      <dc:date>2015-10-12T13:06:23Z</dc:date>
    </item>
    <item>
      <title>Hi Gianluca G, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014947#M19430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/1159048" style="font-size: 11px; line-height: 16.5px; background-color: rgb(238, 238, 238);"&gt;Gianluca G&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;You are right, you can use get the inversion like that. &amp;nbsp; Thank you for sharing.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 06:09:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Matrix-Inversion-LAPACKE-zsytri/m-p/1014947#M19430</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-10-19T06:09:05Z</dc:date>
    </item>
  </channel>
</rss>

