-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pointer to no longer assume contiguity #36405
Conversation
As I went through this, I realized that there's a question mark in how
To me, julia/base/permuteddimsarray.jl Lines 56 to 61 in 52c55d7
I'm really just trying to fix #36402 in this PR (and intentionally structured this to allow for further improvements to pointer, and we could re-enable PermutedDimsArray later, too), but I just wanted to call this ambiguity out. Cc @timholy and #20385. |
It's intended to be the index of the ith element ( |
Codecov Report
@@ Coverage Diff @@
## master #36405 +/- ##
=======================================
Coverage 86.13% 86.14%
=======================================
Files 349 349
Lines 65323 65401 +78
=======================================
+ Hits 56265 56337 +72
- Misses 9058 9064 +6
Continue to review full report at Codecov.
|
65f4046
to
5485207
Compare
Good to go? |
Yes, this is good to go on my side once tests pass. |
* Fix pointer to no longer assume contiguity (cherry picked from commit 59b8dde)
* origin/master: (232 commits) Add passthrough for non-Markdown docs (JuliaLang#36091) Fix pointer to no longer assume contiguity (JuliaLang#36405) Ensure string-hashing is defined before it gets used (JuliaLang#36411) Make compilecache atomic (JuliaLang#36416) add a test for JuliaLang#30739 (JuliaLang#36395) Fix broken links in docstring of `repeat` (JuliaLang#36376) fix and de-dup cached calls to `methods_by_ftype` in compiler (JuliaLang#36404) ml-matches: skip unnecessary work, when possible (JuliaLang#36413) gf: fix some issues with the move from using a tree to a hash lookup of leaf types (JuliaLang#36413) Add news and manual entry for sincospi (JuliaLang#36403) Check axes in Array(::AbstractArray) (fixes JuliaLang#36220) (JuliaLang#36397) add versions of `code_typed` and `which` that accept tuple types (JuliaLang#36389) Fix spelling of readdir. (JuliaLang#36409) add sincospi (JuliaLang#35816) fix showing methods with unicode gensymed variable names (JuliaLang#36396) Add doctest: eachslice (JuliaLang#36386) fix documentation typo ("Ingeger") Refactor `abstract_eval` to separate out statements and values (JuliaLang#36350) fix return type of `get!` on `IdDict` (JuliaLang#36383) Allow single option with REPL.TerminalMenus (JuliaLang#36369) ...
Followup to #36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in #36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`. The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
Followup to #36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in #36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`. The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
Followup to #36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in #36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`. The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
Followup to #36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in #36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`. The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets. (cherry picked from commit d9b7d7e)
* Fix pointer to no longer assume contiguity
…rt (JuliaLang#36757) Followup to JuliaLang#36739 (and currently built atop it), this restores the `pointer(::SubArray{<:Any,<:Any,<:Array,<:Tuple{Vararg{RangeIndex}}}, ::Tuple)` method that was removed in JuliaLang#36405. It does so, however, as a deprecated method, with the actual method being implemented on `(::SubArray{...}, ::CartesianIndex)`. The rationale here is because the `::Tuple` method was undocumented and only supported on that one _highly_ specific `SubArray` type. I am keeping this patch as minimal as possible for backporting; in the future I aim to support `Vararg{CartesianIndex, Integer}` locations to make this more `getindex`-y and move farther away from the conflation with memory offsets.
Fixes #36402. Turns out this affected both
pointer(::SubArray)
as well aspointer(::AbstractArray, i)
.