<?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 Generate Sobol Sequence in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048915#M21060</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to generate numbers from the Sobol sequence in dimension n (with n &amp;lt; 40). The MKL has a Sobol sequence generator, but reading the documentation only gives me headaches. I gave up when I saw (https://software.intel.com/en-us/node/521851) that the directory that should contain examples for the VSL is only available on my installation.&lt;/P&gt;

&lt;P&gt;Is there anyone who could give me a simple file that generates the Sobol sequence from the MKL ?&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 16:49:58 GMT</pubDate>
    <dc:creator>velvia</dc:creator>
    <dc:date>2015-08-11T16:49:58Z</dc:date>
    <item>
      <title>Generate Sobol Sequence</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048915#M21060</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to generate numbers from the Sobol sequence in dimension n (with n &amp;lt; 40). The MKL has a Sobol sequence generator, but reading the documentation only gives me headaches. I gave up when I saw (https://software.intel.com/en-us/node/521851) that the directory that should contain examples for the VSL is only available on my installation.&lt;/P&gt;

&lt;P&gt;Is there anyone who could give me a simple file that generates the Sobol sequence from the MKL ?&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:49:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048915#M21060</guid>
      <dc:creator>velvia</dc:creator>
      <dc:date>2015-08-11T16:49:58Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048916#M21061</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;You can find the short example that demonstrates the use of the Intel(R) MKL Sobol QRNG in the VSL notes, &lt;A href="https://software.intel.com/en-us/node/498121"&gt;https://software.intel.com/en-us/node/498121.&lt;/A&gt;&amp;nbsp;Additionally, I attach C example that&amp;nbsp;shows&amp;nbsp;how to&amp;nbsp;generate&amp;nbsp;Sobol random vectors of dimension 20. Please, let us know, if you&amp;nbsp;have any questions on Intel(R) MKL RNGs, and&amp;nbsp;we will gladly help.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Andrey&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 12:25:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048916#M21061</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2015-08-14T12:25:22Z</dc:date>
    </item>
    <item>
      <title>I additionally include the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048917#M21062</link>
      <description>&lt;P&gt;I additionally include the code of the example here&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include "mkl.h"



/* Dimension of vectors to generate */
#define DM 20

#define NN&amp;nbsp; 10

/* Size of buffer for quasi-random sequence */
#define N&amp;nbsp;&amp;nbsp; 1000*DM

/* Buffer for quasi-random sequence */
double rt&lt;N&gt;;

int main()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; VSLStreamStatePtr stream;

&amp;nbsp;&amp;nbsp;&amp;nbsp; MKL_INT brng;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int dim;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int errcode;
&amp;nbsp;&amp;nbsp;&amp;nbsp; double a, b;
&amp;nbsp;&amp;nbsp;&amp;nbsp; int i, k;


&amp;nbsp;&amp;nbsp;&amp;nbsp; /***** Initialize *****/
&amp;nbsp;&amp;nbsp;&amp;nbsp; brng = VSL_BRNG_SOBOL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; a = 0.0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; b = 1.0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; dim = DM;

&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Initialize */
&amp;nbsp;&amp;nbsp;&amp;nbsp; errcode = vslNewStream( &amp;amp;stream, brng, (MKL_INT)dim );

&amp;nbsp;&amp;nbsp;&amp;nbsp; /***** Call RNG *****/
&amp;nbsp;&amp;nbsp;&amp;nbsp; errcode = vdRngUniform( VSL_RNG_METHOD_UNIFORM_STD, stream, N, rt, a, b );

&amp;nbsp;&amp;nbsp;&amp;nbsp; /***** Printing results *****/
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Sobol sequence :\n");
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("--------------------------------------------------\n\n");
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Parameters:\n");
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("&amp;nbsp;&amp;nbsp;&amp;nbsp; a=%.4f\n",a);
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("&amp;nbsp;&amp;nbsp;&amp;nbsp; b=%.4f\n\n",b);

&amp;nbsp;&amp;nbsp;&amp;nbsp; k = 12;
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Results: %d component of quasi-random sequence (first %d of %d):\n", k, NN, N/dim);

&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;NN;i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%.4f ",rt[k+i*dim]);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\n\n");

&amp;nbsp;&amp;nbsp;&amp;nbsp; /***** Deinitialize *****/
&amp;nbsp;&amp;nbsp;&amp;nbsp; errcode = vslDeleteStream( &amp;amp;stream );

&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;
}
&lt;/N&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Aug 2015 12:33:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Generate-Sobol-Sequence/m-p/1048917#M21062</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2015-08-14T12:33:42Z</dc:date>
    </item>
  </channel>
</rss>

