<?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 Thank you for your help. I in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934154#M13962</link>
    <description>&lt;P&gt;Thank you for your help. I tried to use the array notation with&amp;nbsp; the function ddot but it doesn' t work. Could you tell me please what is wrong?&lt;/P&gt;

&lt;P&gt;int main ()&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double a[2][2] = {{1, 2}, {3, 4}};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double b[2] = {11, 12};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double res;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;res =cblas_ddot(2, a[:][1] , 1, b, 1); // Compute a vector-vector dot product of the first column of the matrix and the vector b. The first column is the vector{1,3}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;printf(" %0.2f\n", res);&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;</description>
    <pubDate>Mon, 03 Mar 2014 11:06:00 GMT</pubDate>
    <dc:creator>Anas_A_</dc:creator>
    <dc:date>2014-03-03T11:06:00Z</dc:date>
    <item>
      <title>Extract row/column of a matrix and subvector form a vector.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934152#M13960</link>
      <description>&lt;P&gt;Hi! I would like to ask if there are routines for the following issues:&lt;/P&gt;

&lt;P&gt;1) Extract a row/column of a matrix.&lt;/P&gt;

&lt;P&gt;2) If theta is a vector extract a subvector. For example extract the elements 4 until 8 of&amp;nbsp; theta.&lt;/P&gt;

&lt;P&gt;3) Merge 2 vectors. For example if a, b be row vectors I want to create a new vector c with the first row be the a vector and the second row will be the b vector.&lt;/P&gt;

&lt;P&gt;I know that the above can be done using "for", but I' m interested in using routines (if there are).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Mar 2014 21:29:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934152#M13960</guid>
      <dc:creator>Anas_A_</dc:creator>
      <dc:date>2014-03-02T21:29:39Z</dc:date>
    </item>
    <item>
      <title>Hi Anas,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934153#M13961</link>
      <description>&lt;P&gt;Hi Anas,&lt;/P&gt;

&lt;P&gt;It seems Array Notation be&amp;nbsp;a suitable tool for these operations.&amp;nbsp;&amp;nbsp;Please See &amp;nbsp;&lt;A href="http://software.intel.com/en-us/articles/about-intel-cilk-plus-and-how-to-get-started"&gt;http://software.intel.com/en-us/articles/about-intel-cilk-plus-and-how-to-get-started&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;A[:] - refers the entire array&lt;BR /&gt;
	A[10:5] - refers A[10], A[11], A[12], A[13], A[14]&lt;BR /&gt;
	A[1:4:2] - refers A[1], A[3], A[5], A[7]&lt;BR /&gt;
	multiple dimensions: A[&amp;lt;lower bound&amp;gt;:&amp;lt;length&amp;gt;:&amp;lt;stride&amp;gt;][&amp;lt;lower bound&amp;gt;:&amp;lt;length&amp;gt;:&amp;lt;stride&amp;gt;]&lt;BR /&gt;
	A[:][:]- refers the entire 2 dimensional array&lt;/P&gt;

&lt;P&gt;You can write code&amp;nbsp; like&amp;nbsp; ColumN= A&lt;N&gt;[:],&amp;nbsp;&amp;nbsp; SubVector=theta[4:4 ],&amp;nbsp; in your program.&lt;/N&gt;&lt;/P&gt;

&lt;P&gt;It support C /Fortran lanaguage. and if you are using Intel C/Fortran Composer XE.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 03:38:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934153#M13961</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-03-03T03:38:58Z</dc:date>
    </item>
    <item>
      <title>Thank you for your help. I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934154#M13962</link>
      <description>&lt;P&gt;Thank you for your help. I tried to use the array notation with&amp;nbsp; the function ddot but it doesn' t work. Could you tell me please what is wrong?&lt;/P&gt;

&lt;P&gt;int main ()&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double a[2][2] = {{1, 2}, {3, 4}};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;double b[2] = {11, 12};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double res;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;res =cblas_ddot(2, a[:][1] , 1, b, 1); // Compute a vector-vector dot product of the first column of the matrix and the vector b. The first column is the vector{1,3}&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;printf(" %0.2f\n", res);&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 11:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934154#M13962</guid>
      <dc:creator>Anas_A_</dc:creator>
      <dc:date>2014-03-03T11:06:00Z</dc:date>
    </item>
    <item>
      <title>MKL has functions that allow</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934155#M13963</link>
      <description>&lt;P&gt;MKL has functions that allow you to extract/copy elements of a vector, indexed using different methods (increments, masks, or index arrays). Check out the "VML Pack/Unpack Functions" (http://software.intel.com/en-us/node/470564).&lt;/P&gt;

&lt;P&gt;For matrices, please note that matrices passed to MKL computation routines are stored as 1-dimensional arrays in memory.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2014 19:57:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934155#M13963</guid>
      <dc:creator>Zhang_Z_Intel</dc:creator>
      <dc:date>2014-03-03T19:57:42Z</dc:date>
    </item>
    <item>
      <title>Hi Anas,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934156#M13964</link>
      <description>&lt;P&gt;Hi Anas,&lt;/P&gt;

&lt;P&gt;Sorry, it seems i may mistake your quesiton as the one &lt;A href="http://software.intel.com/en-us/forums/topic/506612"&gt;http://software.intel.com/en-us/forums/topic/506612&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;But the basic idea is same&lt;/P&gt;

&lt;P&gt;As the function provided by MKL&amp;nbsp;are mainly based on some kind of standard interface, like BLAS ( matrix, vector operation). It&amp;nbsp;may not flexiable like Matlab and R.&amp;nbsp; But it can accept C array and these operations you mentioned are embeded in the computation.&lt;/P&gt;

&lt;P&gt;for example, in your case,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;// Note: A can be accessed by&amp;nbsp;pointer with regular pattern by incx, tranpose.etc. &lt;/P&gt;

&lt;P&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;stdlib.h&amp;gt;&lt;BR /&gt;
	#include &amp;lt;mkl.h&amp;gt;&lt;/P&gt;

&lt;P&gt;int main ()&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double a[2][2] = {{1, 2}, {3, 4}};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double b[2] = {11, 12};&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; double res;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; res =cblas_ddot(2, &amp;amp;a[0][0] , &lt;STRONG&gt;2&lt;/STRONG&gt;, b, 1); // Compute a vector-vector dot product of the first column of the matrix and the vector b. The first column is the vector{1,3}&lt;BR /&gt;
	&amp;nbsp;printf(" %0.2f\n", res);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;//Compute a vector-vector dot product of the first column of the matrix and the vector b. The second column is the vector{2,4}&lt;BR /&gt;
	&amp;nbsp;res =cblas_ddot(2, &amp;amp;a[0][1] , 2, b, 1);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(" %0.2f\n", res);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; cblas_dgemv(CblasRowMajor, CblasTrans, 2, 2, 1.0, &amp;amp;a[0][0], 2, b, 1, 0.0, y, 1);&lt;BR /&gt;
	&amp;nbsp; printf(" %0.2f\n", y[0], y[1]);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; cblas_dgemv(CblasColMajor, CblasNoTrans, 2, 2, 1.0, &amp;amp;a[0][0], 2, b, 1, 0.0, y, 1);&lt;BR /&gt;
	&amp;nbsp; printf(" %0.2f\n", y[0], y[1]);&lt;/P&gt;

&lt;P&gt;return 0;&lt;/P&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;Best Regrads,&lt;/P&gt;

&lt;P&gt;Ying&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; return 0;&lt;BR /&gt;
	}&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2014 03:50:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934156#M13964</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2014-03-04T03:50:47Z</dc:date>
    </item>
    <item>
      <title>Hi Ying! I appreciate your</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934157#M13965</link>
      <description>&lt;P&gt;Hi Ying! I appreciate your help, thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 16:46:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Extract-row-column-of-a-matrix-and-subvector-form-a-vector/m-p/934157#M13965</guid>
      <dc:creator>Anas_A_</dc:creator>
      <dc:date>2014-03-05T16:46:38Z</dc:date>
    </item>
  </channel>
</rss>

