| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
An array that is itself a non-linear view (a = a.rows(0, 3)) lost every element assignment: createSubArray copies a non-linear parent before slicing it, so the write landed in a temporary. The assignment path now copies such an output to a linear array first. Fixes #3534.
| Back | FazBrowse Home | New Git URL |
Assigning an element into an array that is itself a non-linear view silently did nothing on every backend: after a = a.rows(0, 3), a(0, 0) = 1234 leaves a unchanged (#3534). The sequence-assignment path slices the output with createSubArray, which copies a non-linear parent before slicing it, so the write landed in a temporary. When the output is not linear it is now copied to a linear array first, the same thing that already happens when the output is shared. Adds a regression test covering sequence and index-array assignment into a view.
Verified on the CPU backend and on OpenCL (Intel Arc B580 and UHD 770): the new test fails on master and passes with the fix, and the assign suite passes in full on all three.