Skip to content

Commit

Permalink
fix var names
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Apr 30, 2024
1 parent 09ed7da commit a796f89
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/host/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ function generic_matmatmul!(C::AbstractArray{R}, A::AbstractArray{T}, B::Abstrac

@inbounds if i <= size(A,1) && j <= size(B,2)
z2 = zero(A[i, 1]*B[1, j] + A[i, 1]*B[1, j])
Ctmp = convert(promote_type(R, typeof(z2)), z2)
Cij = convert(promote_type(R, typeof(z2)), z2)
for k in 1:size(A,2)
Ctmp += A[i, k]*B[k, j]
Cij += A[i, k]*B[k, j]
end
C[i,j] = add(Ctmp, C[i,j])
C[i,j] = add(Cij, C[i,j])
end

return
Expand Down Expand Up @@ -416,7 +416,7 @@ function generic_trimatmul!(C::AbstractGPUVecOrMat{R}, uploc, isunitc, tfun::Fun
Cij = convert(promote_type(R, typeof(z2)), z2)
Cij += (unit ? one(Cij) : A[i,i]) * B[i,j]
for k in (upper ? (i + 1) : 1):(upper ? m : (i - 1))
Ctmp += A[k,i] * B[k,j]
Cij += A[k,i] * B[k,j]
end
C[i,j] += Cij
end
Expand Down Expand Up @@ -479,12 +479,12 @@ function generic_mattrimul!(C::AbstractGPUVecOrMat{R}, uploc, isunitc, tfun::Fun

@inbounds if i <= size(A,1) && j <= size(B,2)
z2 = zero(A[i, 1]*B[1, j] + A[i, 1]*B[1, j])
Ctmp = convert(promote_type(R, typeof(z2)), z2)
Ctmp += A[i, j] * (unit ? one(Ctmp) : B[j, j])
Cij = convert(promote_type(R, typeof(z2)), z2)
Cij += A[i, j] * (unit ? one(Cij) : B[j, j])
for k in (upper ? 1 : (j + 1)):(upper ? (j - 1) : (size(A,2)))
Ctmp += A[i, k]*B[k, j]
Cij += A[i, k]*B[k, j]
end
C[i,j] += Ctmp
C[i,j] += Cij
end

return
Expand Down

0 comments on commit a796f89

Please sign in to comment.