You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionscaling_csc!(A::SparseMatrixCSC{T}, s::Vector{T}) where T
n =length(s)
@assertsize(A,2) == n
for j =1:n
acc =zero(T)
@inbounds@simdfor i = A.colptr[j]:(A.colptr[j +1] -1)
acc += A.nzval[i] * A.nzval[i]
end
s[j] =sqrt(acc)
if acc ≠zero(T)
@inbounds@simdfor i = A.colptr[j]:(A.colptr[j +1] -1)
A.nzval[i] /= s[j]
endendendend
functionscaling_csc!(A::CuSparseMatrixCSC{T}, s::CuVector{T}) where T
n =length(s)
@assertsize(A,2) == n
for j =1:n
acc =zero(T)
@inbounds@simdfor i = A.colPtr[j]:(A.colPtr[j +1] -1)
acc += A.nzVal[i] * A.nzVal[i]
end
s[j] =sqrt(acc)
if acc ≠zero(T)
@inbounds@simdfor i = A.colPtr[j]:(A.colPtr[j +1] -1)
A.nzVal[i] /= s[j]
endendendend
functionscaling_csr!(A::CuSparseMatrixCSR{T}, s::CuVector{T}) where T
m =length(s)
@assertsize(A,1) == m
for j =1:m
acc =zero(T)
@inbounds@simdfor i = A.rowPtr[j]:(A.rowPtr[j +1] -1)
acc += A.nzVal[i] * A.nzVal[i]
end
s[j] =sqrt(acc)
if acc ≠zero(T)
@inbounds@simdfor i = A.rowPtr[j]:(A.rowPtr[j +1] -1)
A.nzVal[i] /= s[j]
endendendend
cc @michel2323
The text was updated successfully, but these errors were encountered: