Skip to content

Commit ae7fc6c

Browse files
committed
Remove some unnecessary type conversions
1 parent b3b2111 commit ae7fc6c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stdlib/LinearAlgebra/src/matmul.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ Base.@constprop :aggressive function gemv!(y::StridedVector{T}, tA::AbstractChar
464464
if _in(tA_uc, ('S', 'H'))
465465
# re-wrap again and use plain ('N') matvec mul algorithm,
466466
# because _generic_matvecmul! can't handle the HermOrSym cases specifically
467-
return _generic_matvecmul!(y, oftype(tA, 'N'), wrap(A, tA), x, MulAddMul(α, β))
467+
return _generic_matvecmul!(y, 'N', wrap(A, tA), x, MulAddMul(α, β))
468468
else
469469
return _generic_matvecmul!(y, tA, A, x, MulAddMul(α, β))
470470
end
@@ -516,7 +516,7 @@ Base.@constprop :aggressive function gemv!(y::StridedVector{Complex{T}}, tA::Abs
516516
elseif _in(tA_uc, ('S', 'H'))
517517
# re-wrap again and use plain ('N') matvec mul algorithm,
518518
# because _generic_matvecmul! can't handle the HermOrSym cases specifically
519-
return _generic_matvecmul!(y, oftype(tA, 'N'), wrap(A, tA), x, MulAddMul(α, β))
519+
return _generic_matvecmul!(y, 'N', wrap(A, tA), x, MulAddMul(α, β))
520520
else
521521
return _generic_matvecmul!(y, tA, A, x, MulAddMul(α, β))
522522
end
@@ -530,10 +530,10 @@ Base.@constprop :aggressive function syrk_wrapper!(C::StridedMatrix{T}, tA::Abst
530530
tA_uc = uppercase(tA) # potentially convert a WrapperChar to a Char
531531
if tA_uc == 'T'
532532
(nA, mA) = size(A,1), size(A,2)
533-
tAt = oftype(tA, 'N')
533+
tAt = 'N'
534534
else
535535
(mA, nA) = size(A,1), size(A,2)
536-
tAt = oftype(tA, 'T')
536+
tAt = 'T'
537537
end
538538
if nC != mA
539539
throw(DimensionMismatch(lazy"output matrix has size: $(nC), but should have size $(mA)"))
@@ -571,10 +571,10 @@ Base.@constprop :aggressive function herk_wrapper!(C::Union{StridedMatrix{T}, St
571571
tA_uc = uppercase(tA) # potentially convert a WrapperChar to a Char
572572
if tA_uc == 'C'
573573
(nA, mA) = size(A,1), size(A,2)
574-
tAt = oftype(tA, 'N')
574+
tAt = 'N'
575575
else
576576
(mA, nA) = size(A,1), size(A,2)
577-
tAt = oftype(tA, 'C')
577+
tAt = 'C'
578578
end
579579
if nC != mA
580580
throw(DimensionMismatch(lazy"output matrix has size: $(nC), but should have size $(mA)"))

0 commit comments

Comments
 (0)