Skip to content

centralize QR/LQ gaugefixing#203

Merged
lkdvos merged 1 commit intomainfrom
jlarray
Mar 30, 2026
Merged

centralize QR/LQ gaugefixing#203
lkdvos merged 1 commit intomainfrom
jlarray

Conversation

@lkdvos
Copy link
Copy Markdown
Member

@lkdvos lkdvos commented Mar 30, 2026

This PR is an attempt to centralize the code for gaugefixing the QR/LQ (positive = true case).
The secondary purpose is to avoid scalar indexing, mostly to bypass the discussion in #202 by just making JLArrays work. 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 the src twice, 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_fix here, 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.

@lkdvos
Copy link
Copy Markdown
Member Author

lkdvos commented Mar 30, 2026

Failures seem to be unrelated so will just merge this.

@lkdvos lkdvos merged commit ee479b3 into main Mar 30, 2026
12 of 15 checks passed
@lkdvos lkdvos deleted the jlarray branch March 30, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling JLArrays.jl inputs

2 participants