Skip to content

Conversation

@felixcremer
Copy link
Collaborator

We want the readblock and writeblock of an EngineArray backed by a in memory array to work.
This special cases the non-DiskArray case to use normal getindex instead of readblock!.

We want the readblock and writeblock of an EngineArray backed by a in memory array to work.
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

@lazarusA
Copy link
Collaborator

lazarusA commented Oct 3, 2025

@felixcremer is this outdated? or?

@felixcremer
Copy link
Collaborator Author

Let me have a look.

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

Successfully merging this pull request may close these issues.

5 participants