Conversation
Jutho
approved these changes
Mar 30, 2026
Member
Author
|
Failures seem to be unrelated so will just merge this. |
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.
This PR is an attempt to centralize the code for gaugefixing the QR/LQ (
positive = truecase).The secondary purpose is to avoid scalar indexing, mostly to bypass the discussion in #202 by just making
JLArrayswork. I tested this locally and this seems to be the case now.There are a number of subtleties associated with the implementation through broadcasting and avoiding copies and inputs aliasing each other leading to hidden copies in the broadcasting machinery, that I attempted to avoid as best as I can.
There is a secondary point that it might be useful to have an
uppertriangular!(dst, src)implementation to avoid having to visit thesrctwice, which I left for future improvements.I think in the end none of this really matters, so I would say that it is reasonable to stick with the generic implementation of
gauge_fixhere, and if ever this ends up showing up on someone's profiler it is quite easy to specialize for specific array types and improve from there.As an aside, I will say that this fixes #202 since from the things I tried locally, that actually does seem to work now.