="nf">device</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span><span class="w">  </span><span class="c1">// switch to the device context 1</span>

<span class="w">  </span><span class="c1">// create a stream under device context 1</span>
<span class="w">  </span><span class="n">cudaStream_t</span><span class="w"> </span><span class="n">stream</span><span class="p">;</span>
<span class="w">  </span><span class="n">cudaStreamCreate</span><span class="p">(</span><span class="o">&a