<?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 Any problems calling vml routines this way ?? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Any-problems-calling-vml-routines-this-way/m-p/854211#M6798</link>
    <description>&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;I have been playing around with ways to use vml functions more efficiently and have come up with the following technique (c++/cli) which appears to work faster, and take up less memory (than having the last parameter be a blank target array).&lt;BR /&gt;&lt;BR /&gt;Can anyone tell me if there might be any issues calling the functions this way ?? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;//////////////////////&lt;BR /&gt;// CODE SNIPPET //&lt;BR /&gt;// __cdecl //&lt;BR /&gt;//////////////////////&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Verdana"&gt;#define N 5&lt;BR /&gt;int n = N;&lt;BR /&gt;array&lt;DOUBLE&gt;^ x = gcnew array&lt;DOUBLE&gt;(N);&lt;BR /&gt;array&lt;DOUBLE&gt;^ y = gcnew array&lt;DOUBLE&gt;(N);&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;for(i = 0; i &amp;lt; n; i++){&lt;BR /&gt; x&lt;I&gt; = static_cast&lt;DOUBLE&gt;(i);&lt;BR /&gt; y&lt;I&gt; = static_cast&lt;DOUBLE&gt;(i * 2.0);&lt;BR /&gt;}&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;pin_ptr&lt;DOUBLE&gt; xptr = &amp;amp;x[0];&lt;BR /&gt;pin_ptr&lt;DOUBLE&gt; yptr = &amp;amp;y[0];&lt;BR /&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Verdana"&gt;&lt;BR /&gt;vdmul( &amp;amp;n, xptr, yptr, yptr );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;for (i = 0; i &amp;lt; n; i++)&lt;BR /&gt;{&lt;BR /&gt; Console::Write(y&lt;I&gt; + " ");&lt;BR /&gt;}&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;// Pls note that using the c-interface in this way will throw an error&lt;BR /&gt;// i.e. vdAdd(n, x, y, y); //c2664 error&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jul 2008 00:40:46 GMT</pubDate>
    <dc:creator>Deleted_U_Intel</dc:creator>
    <dc:date>2008-07-18T00:40:46Z</dc:date>
    <item>
      <title>Any problems calling vml routines this way ??</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Any-problems-calling-vml-routines-this-way/m-p/854211#M6798</link>
      <description>&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;I have been playing around with ways to use vml functions more efficiently and have come up with the following technique (c++/cli) which appears to work faster, and take up less memory (than having the last parameter be a blank target array).&lt;BR /&gt;&lt;BR /&gt;Can anyone tell me if there might be any issues calling the functions this way ?? &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;//////////////////////&lt;BR /&gt;// CODE SNIPPET //&lt;BR /&gt;// __cdecl //&lt;BR /&gt;//////////////////////&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Verdana"&gt;#define N 5&lt;BR /&gt;int n = N;&lt;BR /&gt;array&lt;DOUBLE&gt;^ x = gcnew array&lt;DOUBLE&gt;(N);&lt;BR /&gt;array&lt;DOUBLE&gt;^ y = gcnew array&lt;DOUBLE&gt;(N);&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;for(i = 0; i &amp;lt; n; i++){&lt;BR /&gt; x&lt;I&gt; = static_cast&lt;DOUBLE&gt;(i);&lt;BR /&gt; y&lt;I&gt; = static_cast&lt;DOUBLE&gt;(i * 2.0);&lt;BR /&gt;}&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/DOUBLE&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;pin_ptr&lt;DOUBLE&gt; xptr = &amp;amp;x[0];&lt;BR /&gt;pin_ptr&lt;DOUBLE&gt; yptr = &amp;amp;y[0];&lt;BR /&gt;&lt;/DOUBLE&gt;&lt;/DOUBLE&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Verdana"&gt;&lt;BR /&gt;vdmul( &amp;amp;n, xptr, yptr, yptr );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;for (i = 0; i &amp;lt; n; i++)&lt;BR /&gt;{&lt;BR /&gt; Console::Write(y&lt;I&gt; + " ");&lt;BR /&gt;}&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Verdana"&gt;// Pls note that using the c-interface in this way will throw an error&lt;BR /&gt;// i.e. vdAdd(n, x, y, y); //c2664 error&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2008 00:40:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Any-problems-calling-vml-routines-this-way/m-p/854211#M6798</guid>
      <dc:creator>Deleted_U_Intel</dc:creator>
      <dc:date>2008-07-18T00:40:46Z</dc:date>
    </item>
  </channel>
</rss>

