<?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 compile R code with the Intel Compiler on Windows in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/compile-R-code-with-the-Intel-Compiler-on-Windows/m-p/1520564#M35045</link>
    <description>&lt;P&gt;I have a time-consuming subfunction in R that I want to optimize using the oneMKL library. However, I don't know how to compile it using the Intel compiler. I have installed Intel oneAPI on windows.&lt;/P&gt;&lt;P&gt;Could you please provide step-by-step guidance on how to accomplish this?&lt;/P&gt;&lt;P&gt;For example, the example C function is:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;include&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;stdio.h&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;include&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;mkl.h&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN class=""&gt;int&lt;/SPAN&gt; &lt;SPAN class=""&gt;main&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt; {
    &lt;SPAN class=""&gt;// Define vector size and variables&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;int&lt;/SPAN&gt; n = &lt;SPAN class=""&gt;1000&lt;/SPAN&gt;;
    &lt;SPAN class=""&gt;double&lt;/SPAN&gt; *x, *y;
    &lt;SPAN class=""&gt;double&lt;/SPAN&gt; result;

    &lt;SPAN class=""&gt;// Allocate memory for the vectors&lt;/SPAN&gt;
    x = (&lt;SPAN class=""&gt;double&lt;/SPAN&gt;*)&lt;SPAN class=""&gt;malloc&lt;/SPAN&gt;(n * &lt;SPAN class=""&gt;sizeof&lt;/SPAN&gt;(&lt;SPAN class=""&gt;double&lt;/SPAN&gt;));
    y = (&lt;SPAN class=""&gt;double&lt;/SPAN&gt;*)&lt;SPAN class=""&gt;malloc&lt;/SPAN&gt;(n * &lt;SPAN class=""&gt;sizeof&lt;/SPAN&gt;(&lt;SPAN class=""&gt;double&lt;/SPAN&gt;));

    &lt;SPAN class=""&gt;// Initialize the vectors with some data (you can modify this)&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;for&lt;/SPAN&gt; (&lt;SPAN class=""&gt;int&lt;/SPAN&gt; i = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;; i &amp;lt; n; i++) {
        x[i] = i + &lt;SPAN class=""&gt;1.0&lt;/SPAN&gt;;
        y[i] = &lt;SPAN class=""&gt;2.0&lt;/SPAN&gt; * (i + &lt;SPAN class=""&gt;1.0&lt;/SPAN&gt;);
    }

    &lt;SPAN class=""&gt;// Calculate the dot product of the vectors using MKL&lt;/SPAN&gt;
    result = cblas_ddot(n, x, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, y, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;);

    &lt;SPAN class=""&gt;// Print the result&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;printf&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"Dot product: %lf\n"&lt;/SPAN&gt;, result);

    &lt;SPAN class=""&gt;// Free allocated memory&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;free&lt;/SPAN&gt;(x);
    &lt;SPAN class=""&gt;free&lt;/SPAN&gt;(y);

    &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;;
}&lt;/PRE&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 06:36:44 GMT</pubDate>
    <dc:creator>Maraki</dc:creator>
    <dc:date>2023-09-05T06:36:44Z</dc:date>
    <item>
      <title>compile R code with the Intel Compiler on Windows</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/compile-R-code-with-the-Intel-Compiler-on-Windows/m-p/1520564#M35045</link>
      <description>&lt;P&gt;I have a time-consuming subfunction in R that I want to optimize using the oneMKL library. However, I don't know how to compile it using the Intel compiler. I have installed Intel oneAPI on windows.&lt;/P&gt;&lt;P&gt;Could you please provide step-by-step guidance on how to accomplish this?&lt;/P&gt;&lt;P&gt;For example, the example C function is:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;include&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;stdio.h&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;#&lt;SPAN class=""&gt;include&lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;mkl.h&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;

&lt;SPAN class=""&gt;int&lt;/SPAN&gt; &lt;SPAN class=""&gt;main&lt;/SPAN&gt;&lt;SPAN class=""&gt;()&lt;/SPAN&gt; {
    &lt;SPAN class=""&gt;// Define vector size and variables&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;int&lt;/SPAN&gt; n = &lt;SPAN class=""&gt;1000&lt;/SPAN&gt;;
    &lt;SPAN class=""&gt;double&lt;/SPAN&gt; *x, *y;
    &lt;SPAN class=""&gt;double&lt;/SPAN&gt; result;

    &lt;SPAN class=""&gt;// Allocate memory for the vectors&lt;/SPAN&gt;
    x = (&lt;SPAN class=""&gt;double&lt;/SPAN&gt;*)&lt;SPAN class=""&gt;malloc&lt;/SPAN&gt;(n * &lt;SPAN class=""&gt;sizeof&lt;/SPAN&gt;(&lt;SPAN class=""&gt;double&lt;/SPAN&gt;));
    y = (&lt;SPAN class=""&gt;double&lt;/SPAN&gt;*)&lt;SPAN class=""&gt;malloc&lt;/SPAN&gt;(n * &lt;SPAN class=""&gt;sizeof&lt;/SPAN&gt;(&lt;SPAN class=""&gt;double&lt;/SPAN&gt;));

    &lt;SPAN class=""&gt;// Initialize the vectors with some data (you can modify this)&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;for&lt;/SPAN&gt; (&lt;SPAN class=""&gt;int&lt;/SPAN&gt; i = &lt;SPAN class=""&gt;0&lt;/SPAN&gt;; i &amp;lt; n; i++) {
        x[i] = i + &lt;SPAN class=""&gt;1.0&lt;/SPAN&gt;;
        y[i] = &lt;SPAN class=""&gt;2.0&lt;/SPAN&gt; * (i + &lt;SPAN class=""&gt;1.0&lt;/SPAN&gt;);
    }

    &lt;SPAN class=""&gt;// Calculate the dot product of the vectors using MKL&lt;/SPAN&gt;
    result = cblas_ddot(n, x, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;, y, &lt;SPAN class=""&gt;1&lt;/SPAN&gt;);

    &lt;SPAN class=""&gt;// Print the result&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;printf&lt;/SPAN&gt;(&lt;SPAN class=""&gt;"Dot product: %lf\n"&lt;/SPAN&gt;, result);

    &lt;SPAN class=""&gt;// Free allocated memory&lt;/SPAN&gt;
    &lt;SPAN class=""&gt;free&lt;/SPAN&gt;(x);
    &lt;SPAN class=""&gt;free&lt;/SPAN&gt;(y);

    &lt;SPAN class=""&gt;return&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;;
}&lt;/PRE&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 06:36:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/compile-R-code-with-the-Intel-Compiler-on-Windows/m-p/1520564#M35045</guid>
      <dc:creator>Maraki</dc:creator>
      <dc:date>2023-09-05T06:36:44Z</dc:date>
    </item>
    <item>
      <title>Re:compile R code with the Intel Compiler on Windows</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/compile-R-code-with-the-Intel-Compiler-on-Windows/m-p/1521839#M35074</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Since this is a duplicate thread of &lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-Intel-MKL-with-R-Similar-to-MATLAB-Implementation/m-p/1520165/emcs_t/S2h8ZW1haWx8Ym9hcmRfc3Vic2NyaXB0aW9ufExNNEhRT040QUtITzRIfDE1MjAxNjV8U1VCU0NSSVBUSU9OU3xoSw#M35031" target="_blank"&gt;https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Using-Intel-MKL-with-R-Similar-to-MATLAB-Implementation/m-p/1520165/emcs_t/S2h8ZW1haWx8Ym9hcmRfc3Vic2NyaXB0aW9ufExNNEhRT040QUtITzRIfDE1MjAxNjV8U1VCU0NSSVBUSU9OU3xoSw#M35031&lt;/A&gt;, we will no longer monitor this thread.&amp;nbsp;We will continue addressing this issue in the other thread.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Good Day!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Sep 2023 09:30:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/compile-R-code-with-the-Intel-Compiler-on-Windows/m-p/1521839#M35074</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-09-08T09:30:12Z</dc:date>
    </item>
  </channel>
</rss>

