<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'>> + const size_t numFunctions = function.NumFunctions();
> +
> + // To keep track of where we are and how things are going.
> + double overallObjective = 0;
> + //get maximum number of threads that will be running. with is defined by OMP_NUM_THREADS
> + size_t num_thread=omp_get_max_threads();
> +
> +
> + //vector of iterate. length of tIterate is same as number of threads available.
> + std::vector<arma::mat> tIterate;
> +
> + //initializing each element of tIterate with initial iterate value
> + for(size_t i=0;i<num_thread;i++)
> + {
> + tIterate.push_back(iterate);
> + }
</pre>
<p>Yes It can be done.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<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>