Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially fixes #314 (source 1: the general/Arnoldi branch).
The complex-
texpv!method took only the Hessenberg buffer fromExpvCacheand then calledexponential!(t * cache, expmethod). That allocatedt * Hand a fresh Padé workspace on every call. Now, when the cache eltype can holdt * H(e.g.ExpvCache{ComplexF64}), it does what the real-tmethod does:get_expcache!, thenlmul!(t, Hcopy), then_exponential!with the cached workspace. The first column goes intocache.expcol. Caches that can't hold the product (e.g.ExpvCache{Float64}with a real non-HermitianH) keep the old allocating path, so results don't change.The issue's benchmark (n = 200, m = 30, Julia 1.13.4):
ExpvCache{ComplexF64},t = 0.01ExpvCache{ComplexF64},t = -0.01imI left the Hermitian/Lanczos branch (source 2, the ~18 KB from
eigen!(SymTridiagonal(...))and its temporaries) out of this PR. It is a separate change that would movesymtridiag_eigen!buffers intoExpvCache.Tests: a new testset in
test/basictests.jlchecks complex-tresults againstexp(t * A) * bfor Arnoldi and Lanczos, with no cache, a small (resized) cache and a real-eltype fallback cache. It also checks that the cached Padé workspace is reused, that warmed complex-tallocations stay close to real-tallocations, the zero-vector case and the invalid-cache error.GROUP=CoreandGROUP=QApass locally, and Runic and typos are clean.