CUDA kernel - nested for loop

后端 未结 3 1261
[愿得一人]
[愿得一人] 2020-12-08 09:01

Hello I\'m trying to write a CUDA kernel to perform the following piece of code.

for (n = 0; n < (total-1); n++)
{
  a = values[n];

  for ( i = n+1; i &         


        
3条回答
  •  -上瘾入骨i
    2020-12-08 09:41

    I'll probably be way wrong but the n < (total-1) check in

    for (int n = idx; n < (total-1); n += blockDim.x*gridDim.x)
    

    seems different than the original version.

提交回复
热议问题