Drop the redundant literal_pow forwards - #241
Open
jishnub wants to merge 1 commit into
Open
Conversation
These forwarded `x .^ k` on infinite fills to `DefaultArrayStyle` to retain the
FillArrays simplification, for the all-infinite, mixed-2D and square-infinite axis
shapes.
They are no longer needed. FillArrays attaches its `literal_pow` rules to the
operation rather than to a style, so `x .^ k` is simplified before any style is
consulted, and LazyArrays' generic forward covers `LazyArrayStyle{N}` against
`AbstractFill{T,N}` with no axis constraint besides.
Verified against FillArrays 1.18 with LazyArrays master: the `literal_pow` testset
covering 1D, 2D all-infinite, both mixed-2D orders and 3D still passes with these
methods removed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Depends on JuliaArrays/FillArrays.jl#385 (FillArrays 1.18) — not on #444. Nothing here calls the new
simplify_broadcastedentry point, so the compat bound is raised only toFillArrays = "1.18", and this can land a step ahead of the rest of the chain. CI will not resolve until #385 is merged and released.Why
infarrays.jlcarried four methods forwardingx .^ kon infinite fills toDefaultArrayStyle, one for the all-infinite axis shape and three for the mixed-2D and square-infinite ones, purely to retain the FillArrays simplification.They are now redundant twice over:
literal_powrules to the operation rather than to a style (as of #385), sox .^ kis simplified before any style is consulted;LazyArrayStyle{N}againstAbstractFill{T,N}with no axis constraint.Verification
Rather than trusting the test suite alone, I checked the specific shapes. Against FillArrays 1.18 with LazyArrays master, and with these four methods deleted, the
literal_powtestset still passes across 1D, 2D all-infinite, both mixed-2D axis orders and 3D:A behavioural probe over those shapes plus
Ones(∞) .* (1:∞),Fill(2,∞) .* (1:∞)andmuladd.(Ones(∞), Ones(∞), Ones(∞))is unchanged.Full test suite passes.
🤖 Generated with Claude Code