<p>In <a href="https://github.com/mlpack/mlpack/pull/635#discussion_r63330727">src/mlpack/core/optimizers/parallel_sgd/sgdp_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +  const size_t numFunctions = function.NumFunctions();
&gt; +
&gt; +  // To keep track of where we are and how things are going.
&gt; +  double overallObjective = 0;
&gt; +  //get maximum number of threads that will be running. with is defined by OMP_NUM_THREADS
&gt; +  size_t num_thread=omp_get_max_threads();
&gt; +
&gt; +
&gt; +  //vector of iterate. length of tIterate is same as number of threads available.
&gt; +  std::vector&lt;arma::mat&gt; tIterate; 
&gt; +
&gt; +  //initializing each element of tIterate with initial iterate value 
&gt; +  for(size_t i=0;i&lt;num_thread;i++)
&gt; +  {
&gt; +    tIterate.push_back(iterate);
&gt; +  }
</pre>
<p>Yes It can be done.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/635/files/9758b9622355ff97e8afa07b907e3083869fce17#r63330727">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMmSwGJz2mYQtSrEsCtP0RqFROE_ks5qCDxpgaJpZM4IXDrG.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/635/files/9758b9622355ff97e8afa07b907e3083869fce17#r63330727"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>