<?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 Saving and restoring stream state for VSL basic generators in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Saving-and-restoring-stream-state-for-VSL-basic-generators/m-p/944358#M14746</link>
    <description>&lt;DIV&gt;How can I save the stream state (i.e to a file) of VSL generators such that I can later reload it and start generating where I stoped? &lt;/DIV&gt;</description>
    <pubDate>Tue, 10 Aug 2004 13:17:56 GMT</pubDate>
    <dc:creator>daniel_egloff</dc:creator>
    <dc:date>2004-08-10T13:17:56Z</dc:date>
    <item>
      <title>Saving and restoring stream state for VSL basic generators</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Saving-and-restoring-stream-state-for-VSL-basic-generators/m-p/944358#M14746</link>
      <description>&lt;DIV&gt;How can I save the stream state (i.e to a file) of VSL generators such that I can later reload it and start generating where I stoped? &lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Aug 2004 13:17:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Saving-and-restoring-stream-state-for-VSL-basic-generators/m-p/944358#M14746</guid>
      <dc:creator>daniel_egloff</dc:creator>
      <dc:date>2004-08-10T13:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Saving and restoring stream state for VSL basic generators</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Saving-and-restoring-stream-state-for-VSL-basic-generators/m-p/944359#M14747</link>
      <description>&lt;DIV&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;Hi,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;I would recommend two approaches to save/restore simulation runs.&lt;NAMESPACE prefix="o" ns="urn:schemas-microsoft-com:office:office"&gt;&lt;P&gt;&lt;/P&gt;&lt;/NAMESPACE&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;Suppose that you want to perform a simulation run with N random numbers generated. Further you want to store the current state after N numbers have been generated. And finally you want to continue simulation starting from (N+1)-th number.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0cm" type="A"&gt;
&lt;LI class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: navy; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;Skip-ahead based approach. (For those basic generators, which support skip-ahead method).&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;1.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Create the stream with the &lt;FONT face="Courier New"&gt;vslNewStream&lt;/FONT&gt; function (you will pass basic generator &lt;FONT face="Courier New"&gt;brng&lt;/FONT&gt; and the seed &lt;FONT face="Courier New"&gt;seed&lt;/FONT&gt;). Perform the first run. By the end of the run you know how many numbers N were generated. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;2.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Save this N to a file, delete the stream stream and finish the application.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;In the second run you should do following:&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" c="" olor="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;1.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Create the stream with the &lt;FONT face="Courier New"&gt;vslNewStream&lt;/FONT&gt; function (you will pass the same basic generator &lt;FONT face="Courier New"&gt;brng&lt;/FONT&gt; and the same seed &lt;FONT face="Courier New"&gt;seed&lt;/FONT&gt; as in the first run). &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;2.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Call &lt;FONT face="Courier New"&gt;vslSkipAheadStream&lt;/FONT&gt; subroutine to skip N numbers generated in the first run. This subroutine works much faster than if you would simply generate these N numbers. (Please see the VSL Notes document for details, which basic generators support the skip-ahead method). &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;3.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Perform the second run. It will start with (N+1)-th number.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;4.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Delete the stream and finish the application.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;You can apply this idea to perform multiple saves/restores of N.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL style="MARGIN-TOP: 0cm" type="A" start="2"&gt;
&lt;LI class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; COLOR: navy; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;Stream state structure storing in the binary file. (For all basic generators).&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;In the second approach you will save/restore whole stream state rather than quantity of numbers have been generated. To save the structure into a file you will need to determine the size of the stream state structure for the basic generator is being used. To do this you need to call the &lt;FONT face="Courier New"&gt;vslGetBrngProperties&lt;/FONT&gt; routine:&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-a
nsi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;FONT face="Courier New"&gt;vslGetBrngProperties(brng,properties)&lt;/FONT&gt; - fills the fields of the structure &lt;FONT face="Courier New"&gt;properties&lt;/FONT&gt; with the properties of the basic generator &lt;FONT face="Courier New"&gt;brng&lt;/FONT&gt;.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;Among other fields, the properties structure has the &lt;FONT face="Courier New"&gt;StreamStateSize&lt;/FONT&gt; field (the first field in the structure of size of 4 bytes) -- this is what you need. For further information I would recommend the Advanced Service Subroutines chapter of the MKL Reference Manual.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;To implement the save/restore to a file I suggest the following scheme:&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;1.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Perform the first run of a simulation. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;2.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Determine the size in bytes of the stream state structure. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;3.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Get an access to the memory, where the stream state data is stored, and save this data to a file (you know number of bytes to store from Step 2). &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;4.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Delete all streams and finish the application.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;For the second run.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy;
 FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;1.&lt;SPAN style="mso-tab-count: 1"&gt;&lt;/SPAN&gt;Allocate the memory&lt;FONT face="Courier New"&gt;restored_stream&lt;/FONT&gt; in which you will load thestream statefrom the file.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;To do thisyou should determine the size of the stream state structure again to determine how many bytes toload.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;2. Load the data into &lt;FONT face="Courier New"&gt;restored_stream&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;I would not recommend using restored stream state directly in random number generators because therewill besome internal fields in the structure which are not initialized properly after the load. To avoidthis you should do the following:&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;3.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Create one more stream &lt;FONT face="Courier New"&gt;stream&lt;/FONT&gt; by the &lt;FONT face="Courier New"&gt;vslNewStream&lt;/FONT&gt; function. No matter which seed you will pass, the only important is &lt;FONT face="Courier New"&gt;brng&lt;/FONT&gt; - should be the same as you saved/restored. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;4.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Use the&lt;FONT face="Courier New"&gt;vslCopyStreamState&lt;/FONT&gt; to copy the state of &lt;FONT face="Courier New"&gt;restored_stream&lt;/FONT&gt; to the stream &lt;FONT face="Courier New"&gt;stream&lt;/FONT&gt;. This routine will copy only the stream state related information, and other internal fields in &lt;FONT face="Courier New"&gt;stream&lt;/FONT&gt; are already initialized in the step 3. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;5.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Perform the second run. &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 35.4pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;6.&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Delete the stream &lt;FONT face="Courier New"&gt;stream&lt;/FONT&gt;. Deallocate the memory for &lt;FONT face="Courier New"&gt;restored_stream&lt;/FONT&gt;.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;Let me know if it works for you.We also canwrite a sample program for you if you need this.&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;We are also considering for future MKL releases what can be done on VSL side to simplify stream state save/restore mechanisms.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Arial" color="navy" size="2"&gt;&lt;SPAN lang="EN-US" style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-ansi-language: EN-US; mso-fareast-font-family: 'MS Mincho'; mso-fareast-language: JA; mso-bidi-language: AR-SA"&gt;Sergey&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Aug 2004 21:27:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Saving-and-restoring-stream-state-for-VSL-basic-generators/m-p/944359#M14747</guid>
      <dc:creator>Sergey_M_Intel2</dc:creator>
      <dc:date>2004-08-18T21:27:28Z</dc:date>
    </item>
  </channel>
</rss>

