-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Commit 57e9a0d to reduce allocations in syevr!
seems to have a potential negative impact on the method
eigen(A::RealHermSymComplexHerm, vl::Real, vh::Real)
when the interval is such that a small number of eigenvalues/vectors are returned. The resizing and reshaping of the storage passed to LAPACK in syevr!
means that space for an
With 1.12.0-rc1 the following code illustrates this:
using LinearAlgebra
n = 2000
A = Hermitian(randn(n,n))
e, V = eigen(A)
println("All eigenvectors:")
@show size(V)
@show Base.summarysize(V)
println("\nEigenvectors in [-1,1]:")
e1, V1 = eigen(A, -1, 1)
@show size(V1)
@show Base.summarysize(V1)
println("\nEigenvectors in [-1,1], copied:")
V1 = copy(V1)
@show size(V1)
@show Base.summarysize(V1)
The output is:
All eigenvectors:
size(V) = (2000, 2000)
Base.summarysize(V) = 32000048
Eigenvectors in [-1,1]:
size(V1) = (2000, 30)
Base.summarysize(V1) = 32000048
Eigenvectors in [-1,1], copied:
size(V1) = (2000, 30)
Base.summarysize(V1) = 480048
Metadata
Metadata
Assignees
Labels
No labels