Skip to content

Commit 1997bbe

Browse files
Add atomic op in transpose product
1 parent c364a12 commit 1997bbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SparseMatrixCSR.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ function tmul!(y::AbstractVector,A::Adjoint{<:Any, <:SparseMatrixCSR},v::Abstrac
429429
@batch for row = 1:size(P, 1)
430430
for nz in nzrange(P,row)
431431
col = P.colval[nz]+o
432-
y[col] += P.nzval[nz]*v[row]
432+
@atomic y[col] += P.nzval[nz]*v[row]
433433
end
434434
end
435435
return y

0 commit comments

Comments
 (0)