<?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 How about this: in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069243#M22142</link>
    <description>&lt;P&gt;How about this:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;Factorize by calling ?PBTRF.&lt;/LI&gt;
	&lt;LI&gt;Call ?TBTRS with UPLO='L' to solve Lw = b.&lt;/LI&gt;
	&lt;LI&gt;Sample z&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;~N(0,1).&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;Compute y = w+z.&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;Call ?TBTRS with UPLO='U' to solve Ux = y and obtain the solution x.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;​Note that I have collapsed the two calls in your Steps 3 and 5 into a single call in my Step 5. The computational savings are modest but it is the spirit that counts.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;My Step 5 also contains the answer to &amp;nbsp;your statement "I don't know how to&amp;nbsp;&lt;/SPAN&gt;find the solution of step 5".&amp;nbsp;&lt;/P&gt;

&lt;P&gt;P.S.: I notice that you are coding in C and using the LapackE interface. Please use the LapackE versions of the Lapack routines that I named.&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2016 15:57:00 GMT</pubDate>
    <dc:creator>mecej4</dc:creator>
    <dc:date>2016-05-20T15:57:00Z</dc:date>
    <item>
      <title>solve system when matrix is banded, symmetric, positive definite matrix.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069242#M22141</link>
      <description>&lt;P abp="939"&gt;Hello.&lt;/P&gt;

&lt;P abp="940"&gt;Let Q be a banded, symmetric, positive definite matrix.&amp;nbsp;(The number of rows of Q is 2e+5)&amp;nbsp;. I want to do the following:&lt;/P&gt;

&lt;OL abp="941"&gt;
	&lt;LI abp="942"&gt;Compute the Cholesky factorization, Q=LU, where U=L^{T}&lt;/LI&gt;
	&lt;LI abp="943"&gt;Solve Lw = b&lt;/LI&gt;
	&lt;LI abp="944"&gt;Solve Um=w&lt;/LI&gt;
	&lt;LI abp="945"&gt;Sample z~N(0,1)&lt;/LI&gt;
	&lt;LI abp="946"&gt;Solve Uv=z&lt;/LI&gt;
	&lt;LI abp="947"&gt;Compute x=m+v&lt;/LI&gt;
	&lt;LI abp="948"&gt;Return x&lt;/LI&gt;
&lt;/OL&gt;

&lt;P abp="949"&gt;Steps 2 and 3 give the solution of Qm=b.&amp;nbsp;&lt;/P&gt;

&lt;P abp="950"&gt;I have asked this question &lt;A href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/598002" abp="951"&gt;here&lt;/A&gt;, but then Q was a triagonal, symmetric&amp;nbsp;matrix. I used fuctions&amp;nbsp; &lt;STRONG abp="952"&gt;'LAPACKE_dpbtrf, cblas_dtbsv' &lt;/STRONG&gt;and solved the problem,&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;" abp="953"&gt;&amp;nbsp;&amp;nbsp; /* Colesky factorization */
&amp;nbsp;&amp;nbsp;&amp;nbsp; info = LAPACKE_dpbtrf(LAPACK_COL_MAJOR, 'U', dim+1, 1, Sigmab, 2 ); 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(info!= 0){mexPrintf( "C++ error: Cholesky failed");&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* step 2*/
&amp;nbsp;&amp;nbsp;&amp;nbsp; cblas_dtbsv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit, dim, 1, Sigmab, 2, y1, 1);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&amp;nbsp;step 3*/
&amp;nbsp;&amp;nbsp;&amp;nbsp; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, dim, 1, Sigmab, 2, y1, 1);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; /* step 5 */
&amp;nbsp;&amp;nbsp;&amp;nbsp; cblas_dtbsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, dim, 1, Sigmab 2, y2, 1);&amp;nbsp; &lt;/PRE&gt;

&lt;P abp="954"&gt;I found functions &lt;STRONG abp="955"&gt;'LAPACKE_dpbtrf&lt;/STRONG&gt;, &lt;STRONG abp="956"&gt;LAPACKE_dpbtrs' &lt;/STRONG&gt;that give the solution of steps 2 and 3.&lt;/P&gt;

&lt;PRE class="brush:cpp;" abp="957"&gt;&amp;nbsp;&amp;nbsp; info = LAPACKE_dpbtrf(LAPACK_COL_MAJOR, 'L', dim, p, Sigma, p+1); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;if(info!= 0){mexPrintf( "C++ error: Cholesky failed");&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; info = LAPACKE_dpbtrs(LAPACK_COL_MAJOR, 'L', dim, p, NRHS, Sigma, p+1, y1, dim);
&amp;nbsp;&amp;nbsp; if(info!= 0){mexPrintf( "C++ error: the execution is not successful");&amp;nbsp; }&lt;/PRE&gt;

&lt;P abp="958"&gt;&amp;nbsp;Firstly, I would like to ask if there is a better way to solve this and secondly &amp;nbsp;I don't know how to find the solution of step 5.&lt;/P&gt;

&lt;P abp="959"&gt;Thank you very much.&lt;/P&gt;

&lt;P abp="960"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 15:25:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069242#M22141</guid>
      <dc:creator>Fiori</dc:creator>
      <dc:date>2016-05-20T15:25:43Z</dc:date>
    </item>
    <item>
      <title>How about this:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069243#M22142</link>
      <description>&lt;P&gt;How about this:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;Factorize by calling ?PBTRF.&lt;/LI&gt;
	&lt;LI&gt;Call ?TBTRS with UPLO='L' to solve Lw = b.&lt;/LI&gt;
	&lt;LI&gt;Sample z&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;~N(0,1).&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;Compute y = w+z.&lt;/SPAN&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;Call ?TBTRS with UPLO='U' to solve Ux = y and obtain the solution x.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;​Note that I have collapsed the two calls in your Steps 3 and 5 into a single call in my Step 5. The computational savings are modest but it is the spirit that counts.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(96, 96, 96); font-size: 16.26px; line-height: 24.39px;"&gt;My Step 5 also contains the answer to &amp;nbsp;your statement "I don't know how to&amp;nbsp;&lt;/SPAN&gt;find the solution of step 5".&amp;nbsp;&lt;/P&gt;

&lt;P&gt;P.S.: I notice that you are coding in C and using the LapackE interface. Please use the LapackE versions of the Lapack routines that I named.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 15:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069243#M22142</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-05-20T15:57:00Z</dc:date>
    </item>
    <item>
      <title>Thank you very much for your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069244#M22143</link>
      <description>&lt;P abp="460"&gt;&amp;nbsp;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 20:08:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069244#M22143</guid>
      <dc:creator>Fiori</dc:creator>
      <dc:date>2016-05-20T20:08:00Z</dc:date>
    </item>
    <item>
      <title>I would like to ask you, if</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069245#M22144</link>
      <description>&lt;P&gt;I would like to ask you, if you mean at step 2 and 5 to use the function&amp;nbsp; 'LAPACKE_dtbtrs' and not '?PBTRS'.?&lt;/P&gt;

&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 15:27:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069245#M22144</guid>
      <dc:creator>Fiori</dc:creator>
      <dc:date>2016-05-23T15:27:58Z</dc:date>
    </item>
    <item>
      <title>You are correct on both</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069246#M22145</link>
      <description>&lt;P&gt;You are correct on both counts. I have corrected #2 accordingly.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 16:25:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/solve-system-when-matrix-is-banded-symmetric-positive-definite/m-p/1069246#M22145</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2016-05-23T16:25:38Z</dc:date>
    </item>
  </channel>
</rss>

