title: how to ask boost::normal_distribution to generate a large vector of random variables without for loop
body: <p>I have a large vector, I want to add noise with normal distribution to it. what I am doing now is trivial for loop:</p>
  
  <pre><code>for (int i=0 ; i&lt;size ; i++){    //size is of order 1000000
      boost::mt19937 gen;
      gen.seed(i);
      boost::normal_distribution&lt;&gt;  nd(0.0 , 1.0);
      boost::variate_generator&lt;boost::mt19937&amp;, boost::normal_distribution&lt;&gt; &gt;
                                                           randNormal (gen,nd);
  
      noise = randNormal();  
      nsyData[i] = data[i] + sd*noise; 
      }
  </code></pre>
  
  <p>Is there an efficient way to do this? like what MATLAB does?</p>