Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/permute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ struct PermutedDiskArray{T,N,P<:PermutedDimsArray{T,N}} <: AbstractPermutedDiskA
end

# Base methods
Base.size(a::AbstractPermutedDiskArray) = size(a.a)
Base.parent(a::AbstractPermutedDiskArray) = a.a.parent
permuteddimsarray(a) = a.a
Base.size(a::AbstractPermutedDiskArray) = size(permuteddimsarray(a))
Base.parent(a::AbstractPermutedDiskArray) = parent(permuteddimsarray(a))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should merge my other PR first, it actually changes this so there is no separate array. Maybe thats a problem?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think that's a problem at all! The permuteddimsarray was only necessary to get the perm and iperm anyway.

# DiskArrays interface

haschunks(a::AbstractPermutedDiskArray) = haschunks(parent(a))
Expand All @@ -43,10 +44,10 @@ function DiskArrays.writeblock!(a::AbstractPermutedDiskArray, v, i::OrdinalRange
return nothing
end

_getperm(a::AbstractPermutedDiskArray) = _getperm(a.a)
_getperm(a::AbstractPermutedDiskArray) = _getperm(permuteddimsarray(a))
_getperm(::PermutedDimsArray{<:Any,<:Any,perm}) where {perm} = perm

_getiperm(a::AbstractPermutedDiskArray) = _getiperm(a.a)
_getiperm(a::AbstractPermutedDiskArray) = _getiperm(permuteddimsarray(a))
_getiperm(::PermutedDimsArray{<:Any,<:Any,<:Any,iperm}) where {iperm} = iperm

# Implementaion macros
Expand Down
Loading