Skip to content
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

Incorrect offsets of views of OffsetArrays #277

Closed
chriselrod opened this issue May 30, 2022 · 0 comments
Closed

Incorrect offsets of views of OffsetArrays #277

chriselrod opened this issue May 30, 2022 · 0 comments
Assignees

Comments

@chriselrod
Copy link
Collaborator

julia> using ArrayInterface, OffsetArrays, ArrayInterfaceOffsetArrays

julia> A = OffsetArrays.centered([1, 2, 3, 4, 5]);

julia> out = @view OffsetArrays.centered(zeros(eltype(A), 5, 5))[:, begin]; # SubArray of OffsetArray

julia> ArrayInterface.offsets(A)
(-2,)

julia> ArrayInterface.offsets(out)
(static(1),)

julia> @less ArrayInterface.offsets(out)

julia> ArrayInterface.axes_types(out)
Tuple{Base.OneTo{Int64}}

julia> ArrayInterface.axes_types(A)
Tuple{OffsetArrays.IdOffsetRange{Int64, Base.OneTo{Int64}}}

julia> typeof(axes(out))
Tuple{Base.IdentityUnitRange{OffsetArrays.IdOffsetRange{Int64, Base.OneTo{Int64}}}}

julia> typeof(axes(A))
Tuple{OffsetArrays.IdOffsetRange{Int64, Base.OneTo{Int64}}}

JuliaSIMD/LoopVectorization.jl#406

@Tokazama Tokazama self-assigned this May 30, 2022
Tokazama added a commit that referenced this issue May 30, 2022
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

No branches or pull requests

2 participants