<?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 Patrik, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084454#M22911</link>
    <description>&lt;P&gt;Hi Patrik,&lt;/P&gt;

&lt;P&gt;Vector Statistics Notes available at &lt;A href="https://software.intel.com/en-us/mkl-vsnotes"&gt;https://software.intel.com/en-us/mkl-vsnotes&lt;/A&gt; describe Intel MKL random number generators and their properties, usage model, and testing results. In particular, please have a look at &lt;A href="https://software.intel.com/en-us/node/590421"&gt;https://software.intel.com/en-us/node/590421&lt;/A&gt; describing Box-Muller method of Gaussian RNG, and at &lt;A href="https://software.intel.com/en-us/node/590367"&gt;https://software.intel.com/en-us/node/590367&lt;/A&gt;&amp;nbsp;describing support of the parallel Monte Carlo simulations with Intel MKL RNG. Additional information about Intel MKL RNG interfaces is available in Intel MKL Manual, Section Random Number Generators, &lt;A href="https://software.intel.com/en-us/node/521842"&gt;https://software.intel.com/en-us/node/521842.&lt;/A&gt; In particular, skip-ahead details can be found at &lt;A href="https://software.intel.com/en-us/node/521867#08C2BC85-AA07-4A5B-98B7-BAF6D02D2A08"&gt;https://software.intel.com/en-us/node/521867#08C2BC85-AA07-4A5B-98B7-BAF6D02D2A08&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please, let me know, if you have more questions.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Andrey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2016 08:54:47 GMT</pubDate>
    <dc:creator>Andrey_N_Intel</dc:creator>
    <dc:date>2016-02-24T08:54:47Z</dc:date>
    <item>
      <title>How to use vslSkipAheadStream and vsRngGaussian</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084451#M22908</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Can I use&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;vslSkipAheadStream together with an&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;VSL_BRNG_MT19937 generator and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em;"&gt;vsRngGaussian?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I have written som small test program which creates one original stream and two skip ahead streams and compare the result. The first stream is identically to the original but the second is not-. Should I be able to do this or am I doing something wrong.&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; int seed = 12345;&lt;BR /&gt;
	&amp;nbsp; int N = 100;&lt;BR /&gt;
	&amp;nbsp; VSLStreamStatePtr original_stream;&lt;BR /&gt;
	&amp;nbsp; float original_buffer&lt;N&gt;;&lt;/N&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; vslNewStream(&amp;amp;original_stream, VSL_BRNG_MT19937, seed);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; vsRngGaussian(&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; VSL_RNG_METHOD_GAUSSIAN_BOXMULLER,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; original_stream,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; N,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; original_buffer,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; 0,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; 1.0f);&lt;/P&gt;

&lt;P&gt;&amp;nbsp; VSLStreamStatePtr streams[2];&lt;BR /&gt;
	&amp;nbsp; int NS = 50;&lt;BR /&gt;
	&amp;nbsp; float stream_buffer&lt;N&gt;;&lt;/N&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; for (int i = 0;i &amp;lt; 2;i++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; vslNewStream(&amp;amp;streams&lt;I&gt;, VSL_BRNG_MT19937, seed);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; vslSkipAheadStream(streams&lt;I&gt;, i * NS);&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; vsRngGaussian(&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VSL_RNG_METHOD_GAUSSIAN_BOXMULLER,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; streams&lt;I&gt;,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NS,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;stream_buffer[i * NS],&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.0f);&lt;BR /&gt;
	&amp;nbsp; }&lt;BR /&gt;
	&amp;nbsp; for (int i = 0; i &amp;lt; N; i++) {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; std::cout &amp;lt;&amp;lt; i &amp;lt;&amp;lt; " - " &amp;lt;&amp;lt; original_buffer&lt;I&gt; &amp;lt;&amp;lt; " : " &amp;lt;&amp;lt; stream_buffer&lt;I&gt; &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;
	&amp;nbsp; }&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;We want to ensure that our MC simulation always uses the same global set of random numbers&amp;nbsp;&lt;/SPAN&gt;independently&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;of the number of threads we are using.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 16:28:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084451#M22908</guid>
      <dc:creator>Patrik_T_</dc:creator>
      <dc:date>2016-02-23T16:28:30Z</dc:date>
    </item>
    <item>
      <title>Hi Patrik,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084452#M22909</link>
      <description>&lt;P&gt;Hi Patrik,&lt;/P&gt;

&lt;P&gt;The Box-Muller method for generation of Gaussian random&amp;nbsp;numbers requires 2 uniform variates, so 50 Gaussian numbers require 100 uniforms. In Intel MKL skip-ahead() routine advances over the state of the basic random number generator/sequence of uniform numbers produced by the basic random number generator, not over the sequence produced by the distribution generator. So, in your example&amp;nbsp;please skip 100 uniforms for the second stream: vslSkipAheadStream(streams&lt;I&gt;, i * NS*2 ) and let me know how it works on your side.&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;Thanks, Andrey&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 08:13:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084452#M22909</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2016-02-24T08:13:59Z</dc:date>
    </item>
    <item>
      <title>Hi Andrey,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084453#M22910</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi Andrey,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thank you very much it solved my problem. Could you please point me to where I can find the information.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Patrik&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 08:43:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084453#M22910</guid>
      <dc:creator>Patrik_T_</dc:creator>
      <dc:date>2016-02-24T08:43:34Z</dc:date>
    </item>
    <item>
      <title>Hi Patrik,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084454#M22911</link>
      <description>&lt;P&gt;Hi Patrik,&lt;/P&gt;

&lt;P&gt;Vector Statistics Notes available at &lt;A href="https://software.intel.com/en-us/mkl-vsnotes"&gt;https://software.intel.com/en-us/mkl-vsnotes&lt;/A&gt; describe Intel MKL random number generators and their properties, usage model, and testing results. In particular, please have a look at &lt;A href="https://software.intel.com/en-us/node/590421"&gt;https://software.intel.com/en-us/node/590421&lt;/A&gt; describing Box-Muller method of Gaussian RNG, and at &lt;A href="https://software.intel.com/en-us/node/590367"&gt;https://software.intel.com/en-us/node/590367&lt;/A&gt;&amp;nbsp;describing support of the parallel Monte Carlo simulations with Intel MKL RNG. Additional information about Intel MKL RNG interfaces is available in Intel MKL Manual, Section Random Number Generators, &lt;A href="https://software.intel.com/en-us/node/521842"&gt;https://software.intel.com/en-us/node/521842.&lt;/A&gt; In particular, skip-ahead details can be found at &lt;A href="https://software.intel.com/en-us/node/521867#08C2BC85-AA07-4A5B-98B7-BAF6D02D2A08"&gt;https://software.intel.com/en-us/node/521867#08C2BC85-AA07-4A5B-98B7-BAF6D02D2A08&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please, let me know, if you have more questions.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Andrey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 08:54:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/How-to-use-vslSkipAheadStream-and-vsRngGaussian/m-p/1084454#M22911</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2016-02-24T08:54:47Z</dc:date>
    </item>
  </channel>
</rss>

