引用第8楼小俊于2009-08-08 23:40发表的 :这样?atomicAdd((int *)&out[tid], smem[tid]);atomicAdd((int *)&out[tid + 128], smem[tid + 128]);