Repository navigation
Respect custom strides in scalar compound assignment - #2939
Open
CAOShurong wants to merge 1 commit into
Open
CAOShurong wants to merge 1 commit into
CAOShurong wants to merge 1 commit into
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.
Checklist
Description
Fixes #2773.
Scalar compound assignment currently writes the storage prefix even when an adaptor has padded strides. Use logical iteration for non-dense strides, while preserving physical iteration for dense layouts, including custom axis permutations. Dense-layout traversal preserves the behavior of aliased scalars and stateful, noncopyable functors.
Tests cover padded rows and columns, empty adaptors, scalar aliasing and functor state for both dynamic- and fixed-rank adaptors.
Validation: 26 adaptor cases (114 assertions), installed CMake consumers, and 224 owned-buffer checks under AddressSanitizer passed. A partial broader run passed 1,219 cases from the 77 test modules that compile on MSVC 19.42; the full build encounters the same baseline errors in
test_xfunctionandtest_xvectorize.Local microbenchmarks found up to ~1.7 ns overhead for 16-element arrays; large-array candidate/baseline ratios reached 1.13x. Linux and macOS validation remains to CI.