Jutho / StridedViews.jl

A Julia package to represent strided views over a parent DenseArray
MIT License
6 stars 2 forks source link

Support `ReinterpretArray` #4

Open eschnett opened 11 months ago

eschnett commented 11 months ago

I see that StridedArray requires a DenseArray as target. Base.ReinterpretArray is dense (possibly depending on how it was constructed), but it is not declared as subtype of DenseArray. It would be convenient if StridedArray supported this as well.

Jutho commented 11 months ago

As far as I can tell, ReinterpretArray is simply yet another wrapper, whose parent can be any of the other kind of arrays, so Array, but also some not dense (or even not strided) SubArray, … 

The best way to support ReinterpretArray for StridedViews.jl, would be to reimplement the behaviour so that the reinterpretation can also be captured in the StridedView type (similar to how it can capture the conj flag). As I have not needed this much myself, I have not really studied how difficult that would be.