<?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 Hi Dylan,  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038923#M20604</link>
    <description>&lt;P&gt;Hi Dylan,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If i understand correctly, yes, cblas_dgemm perform matrix -matrix multiplication, that equal &amp;nbsp;matrix-vector multiplication with multiply vectors at once.&lt;/P&gt;

&lt;P&gt;for example, &amp;nbsp;for (i loop) Ci = A*Bi&lt;/P&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;for (i = 0; i &amp;lt; N; i++) {&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px; line-height: 19.512px;" /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cblas_dgemv(CblasRowMajor,CblasNoTrans,N,N,alpha,a,N,&amp;amp;b&lt;I&gt;,N,beta,&amp;amp;c&lt;I&gt;,N);&lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="line-height: 19.512px;"&gt;= &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="line-height: 19.512px;"&gt;C=A*B&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;P&gt;.&amp;nbsp;&amp;nbsp;cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; m, n, k, alpha, A, k, B, n, beta, C, n);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Nov 2015 01:21:04 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2015-11-02T01:21:04Z</dc:date>
    <item>
      <title>Array slicing with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038920#M20601</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I am currently working on a two-dimensional ADI Crank-Nicolson algorithm using the pardiso and cspblas packages. In order to use the Alternating-Direction-Implicit (ADI) method, I need to solve a linear system of equations Ax = By, where x and y are single columns and single rows from a 2D matrix. However I am having difficulty thinking of a way to extract singular rows and columns from a matrix.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Is there a fast way I can slice an array using the MKL package such that I do not have to iterate over my array every step?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In other languages this can be done by indexing in such a way &amp;nbsp; Ax[1,:] = &amp;nbsp;By[1,:] &amp;nbsp; &amp;nbsp;for example.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Dylan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 05:26:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038920#M20601</guid>
      <dc:creator>Dylan_B_</dc:creator>
      <dc:date>2015-10-29T05:26:47Z</dc:date>
    </item>
    <item>
      <title>Hi Dylan,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038921#M20602</link>
      <description>&lt;P&gt;Hi Dylan,&lt;/P&gt;

&lt;P&gt;You mentioned using the pardiso and cspblas packages. So can I suppose the loop and &amp;nbsp;extract singular rows and columns from a matrix are needed only in phase 3 steps. right?&lt;/P&gt;

&lt;P&gt;and X and Y single columns and single rows from a 2D matrix. can you name&amp;nbsp; row or column?&lt;/P&gt;

&lt;P&gt;I guess, it may be column.&amp;nbsp; then it should be ok&amp;nbsp; for call pardiso and cspblas without exacting.&lt;/P&gt;

&lt;P&gt;As Pardiso support multiply right hand.&amp;nbsp; So you can call one blas function to compute B*Y=&amp;gt; Z as &amp;nbsp;multiply right hand (each column is a zi ) .&amp;nbsp; then you can get&amp;nbsp; all of xi at pardiso phase 3 once.&amp;nbsp;&amp;nbsp; Thus no iteration are needed.&lt;/P&gt;

&lt;P&gt;phase – integer, execution control. There are three major phases in the solving&lt;BR /&gt;
	process and one service phase&lt;BR /&gt;
	• Phase 1: Fill-in reduction analysis and symbolic factorization&lt;/P&gt;

&lt;P&gt;pardiso()&lt;BR /&gt;
	• Phase 2: Numerical factorization&lt;/P&gt;

&lt;P&gt;pardiso()&lt;BR /&gt;
	• Phase 3: Forward and Backward solve including iterative refinements&lt;BR /&gt;
	• Release Memory (phase ≤ 0).&lt;/P&gt;

&lt;P&gt;If&amp;nbsp;either xi and yi&amp;nbsp;are row, you may reorig the AX=YB etc and using multiply right -hand support&amp;nbsp; to get what you wanted.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 01:19:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038921#M20602</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-10-30T01:19:10Z</dc:date>
    </item>
    <item>
      <title>Hi Ying,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038922#M20603</link>
      <description>&lt;P&gt;Hi Ying,&lt;/P&gt;

&lt;P&gt;Thanks for the response.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Can I use cblas to perform matrix-vector multiplication with multiple vectors at once?&lt;/P&gt;

&lt;P&gt;For example A*X&lt;SUB&gt;i&lt;/SUB&gt; = B&lt;SUB&gt;i&lt;/SUB&gt;, where A,X and B are NxN matrices, and B&lt;SUB&gt;i&lt;/SUB&gt;&amp;nbsp;is the i&lt;SUP&gt;th&lt;/SUP&gt;&amp;nbsp;column of B.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Dylan&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2015 02:04:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038922#M20603</guid>
      <dc:creator>Dylan_B_</dc:creator>
      <dc:date>2015-10-30T02:04:00Z</dc:date>
    </item>
    <item>
      <title>Hi Dylan, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038923#M20604</link>
      <description>&lt;P&gt;Hi Dylan,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If i understand correctly, yes, cblas_dgemm perform matrix -matrix multiplication, that equal &amp;nbsp;matrix-vector multiplication with multiply vectors at once.&lt;/P&gt;

&lt;P&gt;for example, &amp;nbsp;for (i loop) Ci = A*Bi&lt;/P&gt;

&lt;DIV&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;for (i = 0; i &amp;lt; N; i++) {&lt;/SPAN&gt;&lt;BR style="font-size: 13.008px; line-height: 19.512px;" /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;cblas_dgemv(CblasRowMajor,CblasNoTrans,N,N,alpha,a,N,&amp;amp;b&lt;I&gt;,N,beta,&amp;amp;c&lt;I&gt;,N);&lt;/I&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="line-height: 19.512px;"&gt;= &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;DIV&gt;&lt;SPAN style="line-height: 19.512px;"&gt;C=A*B&lt;/SPAN&gt;&lt;/DIV&gt;

&lt;P&gt;.&amp;nbsp;&amp;nbsp;cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp; &amp;nbsp; m, n, k, alpha, A, k, B, n, beta, C, n);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2015 01:21:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Array-slicing-with-MKL/m-p/1038923#M20604</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-11-02T01:21:04Z</dc:date>
    </item>
  </channel>
</rss>

