692692# the aggressive constprop pushes tA and tB into gemm_wrapper!, which is needed for wrap calls within it
693693# to be concretely inferred
694694Base. @constprop :aggressive function syrk_wrapper! (C:: StridedMatrix{T} , tA:: AbstractChar , A:: StridedVecOrMat{T} ,
695- alpha :: Number , beta :: Number ) where {T<: BlasFloat }
695+ α :: Number , β :: Number ) where {T<: BlasFloat }
696696 nC = checksquare (C)
697697 tA_uc = uppercase (tA) # potentially convert a WrapperChar to a Char
698698 if tA_uc == ' T'
@@ -708,16 +708,16 @@ Base.@constprop :aggressive function syrk_wrapper!(C::StridedMatrix{T}, tA::Abst
708708
709709 # BLAS.syrk! only updates symmetric C
710710 # alternatively, make non-zero β a show-stopper for BLAS.syrk!
711- if iszero (beta ) || issymmetric (C)
712- α, β = promote (alpha, beta , zero (T))
711+ if iszero (β ) || issymmetric (C)
712+ alpha, beta = promote (α, β , zero (T))
713713 if (alpha isa Union{Bool,T} &&
714714 beta isa Union{Bool,T} &&
715715 stride (A, 1 ) == stride (C, 1 ) == 1 &&
716716 _fullstride2 (A) && _fullstride2 (C))
717717 return copytri! (BLAS. syrk! (' U' , tA, alpha, A, beta, C), ' U' )
718718 end
719719 end
720- return gemm_wrapper! (C, tA, tAt, A, A, alpha, beta )
720+ return gemm_wrapper! (C, tA, tAt, A, A, α, β )
721721end
722722# legacy method
723723syrk_wrapper! (C:: StridedMatrix{T} , tA:: AbstractChar , A:: StridedVecOrMat{T} , _add:: MulAddMul = MulAddMul ()) where {T<: BlasFloat } =
@@ -743,7 +743,7 @@ Base.@constprop :aggressive function herk_wrapper!(C::Union{StridedMatrix{T}, St
743743 # Result array does not need to be initialized as long as beta==0
744744 # C = Matrix{T}(undef, mA, mA)
745745
746- if iszero (β) || issymmetric (C)
746+ if iszero (β) || ishermitian (C)
747747 alpha, beta = promote (α, β, zero (T))
748748 if (alpha isa Union{Bool,T} &&
749749 beta isa Union{Bool,T} &&
@@ -932,7 +932,7 @@ function __generic_matvecmul!(f::F, C::AbstractVector, A::AbstractVecOrMat, B::A
932932 @inbounds begin
933933 if length (B) == 0
934934 for k = eachindex (C)
935- @stable_muladdmul _modify! (MulAddMul (alpha,beta), false , C, k)
935+ @stable_muladdmul _modify! (MulAddMul (alpha,beta), zero ( eltype (C)) , C, k)
936936 end
937937 else
938938 for k = eachindex (C)
@@ -953,7 +953,7 @@ function __generic_matvecmul!(::typeof(identity), C::AbstractVector, A::Abstract
953953 @inbounds begin
954954 for i in eachindex (C)
955955 if length (B) == 0
956- C[i] = false
956+ C[i] = zero ( eltype (C))
957957 else
958958 @stable_muladdmul _modify! (MulAddMul (alpha, beta), A[i]* B[1 ], C, i)
959959 end
0 commit comments