roblems k is finished (id(k)==true), transfer k from the GPU to the output array</h2><pre>and delete it from the current job description</pre><pre class="codeinput">    <span class="keyword">if</span> max(ids(:))
        <span class="keyword">if</span> ~isempty(opts.gpu_id)
            X(:,rds(ids)) = gather(x(:,ids));
        <span class="keyword">else</span>
            X(:,rds(ids)) = x(:,ids);
        <span class="keyword">end</span>
        rds = rds(~ids);
        x=x(:,~ids);
        h=h(:,~ids);
   