Skip to content
Open
Changes from all commits
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
6 changes: 3 additions & 3 deletions src/enginearrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function engine(p::AbstractEngineArray;bcdims=nothing)
end
end
Base.parent(p::EngineArray) = p.parent
DiskArrays.readblock!(a::EngineArray,xout,r::OrdinalRange...) = DiskArrays.readblock!(a.parent,xout,r...)
DiskArrays.writeblock!(a::EngineArray,xout,r::OrdinalRange...) = DiskArrays.writeblock!(a.parent,xout,r...)
DiskArrays.readblock!(a::EngineArray,xout,r::OrdinalRange...) = a.parent isa AbstractDiskArray ? DiskArrays.readblock!(a.parent,xout,r...) : xout .= a.parent[r...]
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be isdisk(a.parent) instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That sounds about right.

Copy link

Choose a reason for hiding this comment

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

Well, parent(a) should be preferred, keep the getproperty in one place

DiskArrays.writeblock!(a::EngineArray,xout,r::OrdinalRange...) = a.parent isa AbstractDiskArray ? DiskArrays.writeblock!(a.parent,xout,r...) : a.parent[r...] = xout
Base.size(a::EngineArray) = size(a.parent)
DiskArrays.eachchunk(a::EngineArray) = DiskArrays.eachchunk(a.parent)
bcdims(a::EngineArray) = a.bcdims[]
Expand All @@ -36,7 +36,7 @@ function collect_bcdims(A)
end
end
oc = collect(o)
allunique(first.(oc)) || error("Lengths don't match")
allunique(last.(oc)) || error("Lengths don't match")
sort!(oc,by=last)
first.(oc), last.(oc)
end
Expand Down