><span class="lineno">   29</span>&#160;    cudaCheckErrorsAsync(cudaGetDeviceCount(&amp;cudaDeviceCount),-1,-1);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">if</span>(cuda_device &gt;= 0 &amp;&amp; cuda_device &lt; cudaDeviceCount){ cudaCheckErrors(cudaSetDevice(cuda_device),-1,-1); } <span class="comment">//unless user specifies, driver auto-magically selects free GPU to run on</span></div><div class="line"><a name="l00031"></a><span cla