Skip to content

Commit

Permalink
Speed up copyto!(::HermOrSym, ::HermOrSym) (JuliaLang#54476)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch authored and lazarusA committed Jul 12, 2024
1 parent 89ddc26 commit e8588a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/src/symmetric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ copy(A::Hermitian) = (Hermitian(parentof_applytri(copy, A), sym_uplo(A.uplo)))

function copyto!(dest::Symmetric, src::Symmetric)
if src.uplo == dest.uplo
copyto!(dest.data, src.data)
copytrito!(dest.data, src.data, src.uplo)
else
transpose!(dest.data, Base.unalias(dest.data, src.data))
end
Expand All @@ -356,7 +356,7 @@ end

function copyto!(dest::Hermitian, src::Hermitian)
if src.uplo == dest.uplo
copyto!(dest.data, src.data)
copytrito!(dest.data, src.data, src.uplo)
else
adjoint!(dest.data, Base.unalias(dest.data, src.data))
end
Expand Down

0 comments on commit e8588a1

Please sign in to comment.