From a796f897aec2929cd66327ad63394f166197150f Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Tue, 30 Apr 2024 13:15:27 +0200 Subject: [PATCH] fix var names --- src/host/linalg.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/host/linalg.jl b/src/host/linalg.jl index f0bb2436..54960b9d 100644 --- a/src/host/linalg.jl +++ b/src/host/linalg.jl @@ -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 @@ -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 @@ -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