You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead, the right thing to do is to use the default definitions of these functions, which create Transpose and Adjointwrappers around the matrix without making a copy.
Ideally, one then defines specialized methods for Adjoint{<:SkewHermitian} which exploit the fact that it is merely a sign flip.
The text was updated successfully, but these errors were encountered:
No, you shouldn't need to mimic that whole file — that defines lots of methods for Adjoint{<:AbstractMatrix} that should automatically apply to Adjoint{<:SkewHermitian}.
What is needed is that whenever you have a specialized matrix method for SkewHermitian, you might need to also define one for Adjoint{<:SkewHermitian} that just flips the sign of the result (e.g. for multiplying two matrices).
Still requires a fair amount of code, so I'm not 100% sure if it's worth it. On the other hand, the usual expectation in Julia is that A' doesn't make a copy.
Currently we override
transpose
andadjoint
to make copies here: https://github.com/JuliaLinearAlgebra/SkewLinearAlgebra.jl/blob/main/src/skewhermitian.jl#L115-L116Instead, the right thing to do is to use the default definitions of these functions, which create
Transpose
andAdjoint
wrappers around the matrix without making a copy.Ideally, one then defines specialized methods for
Adjoint{<:SkewHermitian}
which exploit the fact that it is merely a sign flip.The text was updated successfully, but these errors were encountered: