@cuda.jit def incrementa(vetor, valor): tx = cuda.threadIdx.x ty = cuda.blockIdx.x bw = cuda.blockDim.x pos = tx + ty * bw if pos < vetor.size: vetor[pos] += valor
@cuda.jit def incrementa(vetor, valor): tx = cuda.threadIdx.x ty = cuda.blockIdx.x bw = cuda.blockDim.x pos = tx + ty * bw if pos < vetor.size: vetor[pos] += valor
Comments