s="p">);</span>
<span class="p">}</span></pre><p>Each iteration <code>i</code> is independent of each other and is assigned one kernel thread to run the callable. Since the callable runs on GPU, it must be declared with a <code>__device__</code> specifier. The following example creates a kernel that assigns each entry of <code>gpu_data</code> to 1 over the range [0, 100) with step size 1.</p><pre class="m-code"><span class="c1">// assigns each element in gpu_data to 1 over the range [0, 100) with step size 