<?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 Ray, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Efficient-Generation-of-Sinusoids/m-p/1148587#M26927</link>
    <description>&lt;P&gt;Hi Ray,&lt;/P&gt;

&lt;P&gt;The dTheta is related PI or freqency?&lt;/P&gt;

&lt;P&gt;Both IPP or MKL Vector Math Function may help you complete the task. for example.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-reference-tone"&gt;https://software.intel.com/en-us/ipp-dev-reference-tone&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Tone-Generating Functions&lt;/P&gt;

&lt;DIV class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;
	&lt;DIV class="field-items"&gt;
		&lt;DIV class="field-item even" property="content:encoded"&gt;
			&lt;DIV class="topic-wrapper" id="E050E80F-8E87-4681-9CF6-1CD1183DFEC6"&gt;
				&lt;DIV&gt;
					&lt;P&gt;The functions described below generate a tone (or “sinusoid”) of a given frequency, phase, and magnitude. Tones are fundamental building blocks for analog signals. Thus, sampled tones are extremely useful in signal processing systems as test signals and as building blocks for more complex signals.&lt;/P&gt;

					&lt;P&gt;The use of tone functions is preferable against the analogous C math library's &lt;SPAN class="keyword"&gt;sin()&lt;/SPAN&gt; function for many applications, because Intel IPP functions can use information retained from the computation of the previous sample to compute the next sample much faster than standard &lt;SPAN class="keyword"&gt;sin()&lt;/SPAN&gt; or &lt;SPAN class="keyword"&gt;cos()&lt;/SPAN&gt;.&lt;/P&gt;
				&lt;/DIV&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;P&gt;This function generates the tone with the specified frequency &lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt;, phase &lt;SPAN class="parmname"&gt;pPhase&lt;/SPAN&gt;, and magnitude &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt;. The function computes &lt;SPAN class="parmname"&gt;len&lt;/SPAN&gt; samples of the tone, and stores them in the array &lt;SPAN class="parmname"&gt;pDst&lt;/SPAN&gt;. For real tones, each generated value &lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;]&lt;/FONT&gt;&lt;/SAMP&gt; is defined as:&lt;/P&gt;

&lt;P&gt;&lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;] = &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt; * cos(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;)&lt;/FONT&gt;&lt;/SAMP&gt;&lt;/P&gt;

&lt;P&gt;For complex tones, &lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;]&lt;/FONT&gt;&lt;/SAMP&gt; is defined as:&lt;/P&gt;

&lt;P&gt;&lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;] = &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt; * (cos(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;)+&lt;SPAN class="parmname"&gt;j&lt;/SPAN&gt;* sin(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;))&lt;/FONT&gt;&lt;/SAMP&gt;&lt;/P&gt;

&lt;P&gt;The parameter &lt;SPAN class="parmname"&gt;hint&lt;/SPAN&gt; suggests using specific code, which provides for either fast but less accurate calculation, or more accurate but slower execution.&lt;/P&gt;

&lt;P&gt;or MKL function&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation"&gt;https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="kwd"&gt;vsSinCos&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;(&lt;/SPAN&gt; &lt;SPAN class="var"&gt;n&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;a&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;y&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;z&lt;/SPAN&gt; &lt;SPAN class="sep"&gt;)&lt;/SPAN&gt;&lt;SPAN class="delim"&gt;; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Computes sine and cosine of vector elements.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Pointers to arrays that contain the output vectors &lt;SPAN class="parmname"&gt;y&lt;/SPAN&gt; (for sinevalues) and &lt;VAR&gt;z&lt;/VAR&gt;(for cosine values).&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2017 03:00:00 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2017-11-02T03:00:00Z</dc:date>
    <item>
      <title>Efficient Generation of Sinusoids</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Efficient-Generation-of-Sinusoids/m-p/1148586#M26926</link>
      <description>&lt;P&gt;Given a real dTheta, I want to create a largish complex linear array of the form z&lt;N&gt;=(cos(n*dTheta),sin(n*dTheta))&lt;/N&gt;&lt;/P&gt;

&lt;P&gt;People must need this for signal processing all the time.&amp;nbsp; Anyhow, I need to do it again and again with different values of dTheta.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Anybody &lt;/EM&gt;could do this:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;Create an array {0.0, 1.0, 2.0, ...}&lt;/LI&gt;
	&lt;LI&gt;Use MKL to multiply this by dTheta&lt;/LI&gt;
	&lt;LI&gt;Use MKL to compute the trig functions&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Efficiency is the issue here. The symmetry of my problem is much greater than that of the above solution.&amp;nbsp; I assert that it is possible to speed up the above recipe by a large factor in normal coding.&amp;nbsp; Is this also possible using SSE type parallelism via the MKL?&lt;/P&gt;

&lt;P&gt;R&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>Sun, 29 Oct 2017 14:36:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Efficient-Generation-of-Sinusoids/m-p/1148586#M26926</guid>
      <dc:creator>Hagstrom__Ray</dc:creator>
      <dc:date>2017-10-29T14:36:30Z</dc:date>
    </item>
    <item>
      <title>Hi Ray,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Efficient-Generation-of-Sinusoids/m-p/1148587#M26927</link>
      <description>&lt;P&gt;Hi Ray,&lt;/P&gt;

&lt;P&gt;The dTheta is related PI or freqency?&lt;/P&gt;

&lt;P&gt;Both IPP or MKL Vector Math Function may help you complete the task. for example.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-reference-tone"&gt;https://software.intel.com/en-us/ipp-dev-reference-tone&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Tone-Generating Functions&lt;/P&gt;

&lt;DIV class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;
	&lt;DIV class="field-items"&gt;
		&lt;DIV class="field-item even" property="content:encoded"&gt;
			&lt;DIV class="topic-wrapper" id="E050E80F-8E87-4681-9CF6-1CD1183DFEC6"&gt;
				&lt;DIV&gt;
					&lt;P&gt;The functions described below generate a tone (or “sinusoid”) of a given frequency, phase, and magnitude. Tones are fundamental building blocks for analog signals. Thus, sampled tones are extremely useful in signal processing systems as test signals and as building blocks for more complex signals.&lt;/P&gt;

					&lt;P&gt;The use of tone functions is preferable against the analogous C math library's &lt;SPAN class="keyword"&gt;sin()&lt;/SPAN&gt; function for many applications, because Intel IPP functions can use information retained from the computation of the previous sample to compute the next sample much faster than standard &lt;SPAN class="keyword"&gt;sin()&lt;/SPAN&gt; or &lt;SPAN class="keyword"&gt;cos()&lt;/SPAN&gt;.&lt;/P&gt;
				&lt;/DIV&gt;
			&lt;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;P&gt;This function generates the tone with the specified frequency &lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt;, phase &lt;SPAN class="parmname"&gt;pPhase&lt;/SPAN&gt;, and magnitude &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt;. The function computes &lt;SPAN class="parmname"&gt;len&lt;/SPAN&gt; samples of the tone, and stores them in the array &lt;SPAN class="parmname"&gt;pDst&lt;/SPAN&gt;. For real tones, each generated value &lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;]&lt;/FONT&gt;&lt;/SAMP&gt; is defined as:&lt;/P&gt;

&lt;P&gt;&lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;] = &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt; * cos(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;)&lt;/FONT&gt;&lt;/SAMP&gt;&lt;/P&gt;

&lt;P&gt;For complex tones, &lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;]&lt;/FONT&gt;&lt;/SAMP&gt; is defined as:&lt;/P&gt;

&lt;P&gt;&lt;SAMP class="codeph"&gt;&lt;FONT face="Courier New"&gt;&lt;SPAN class="parmname"&gt;x&lt;/SPAN&gt;[&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;] = &lt;SPAN class="parmname"&gt;magn&lt;/SPAN&gt; * (cos(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;)+&lt;SPAN class="parmname"&gt;j&lt;/SPAN&gt;* sin(2π&lt;SPAN class="parmname"&gt;n&lt;/SPAN&gt;*&lt;SPAN class="parmname"&gt;rFreq&lt;/SPAN&gt; + &lt;SPAN class="parmname"&gt;phase&lt;/SPAN&gt;))&lt;/FONT&gt;&lt;/SAMP&gt;&lt;/P&gt;

&lt;P&gt;The parameter &lt;SPAN class="parmname"&gt;hint&lt;/SPAN&gt; suggests using specific code, which provides for either fast but less accurate calculation, or more accurate but slower execution.&lt;/P&gt;

&lt;P&gt;or MKL function&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation"&gt;https://software.intel.com/en-us/articles/intel-math-kernel-library-documentation&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="kwd"&gt;vsSinCos&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;(&lt;/SPAN&gt; &lt;SPAN class="var"&gt;n&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;a&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;y&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;,&lt;/SPAN&gt; &lt;SPAN class="var"&gt;z&lt;/SPAN&gt; &lt;SPAN class="sep"&gt;)&lt;/SPAN&gt;&lt;SPAN class="delim"&gt;; &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Computes sine and cosine of vector elements.&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Pointers to arrays that contain the output vectors &lt;SPAN class="parmname"&gt;y&lt;/SPAN&gt; (for sinevalues) and &lt;VAR&gt;z&lt;/VAR&gt;(for cosine values).&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2017 03:00:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Efficient-Generation-of-Sinusoids/m-p/1148587#M26927</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2017-11-02T03:00:00Z</dc:date>
    </item>
  </channel>
</rss>

