You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I made this PR to base some good points were brought up about what we knew about parent(x) compared to x. With a few exceptions (that we should probably clean up), we simply use parent_type as convenient syntax for communicating the type of the underlying data buffer/collection. An informal search through juliahub shows that a handful of packages define something very similar independent of this package, so it's clearly something that has utility already. I'd like to know if we could do better.
The biggest hangup here is how we succinctly describe what assumptions persists between x and parent(x). The only approachable idea I have is a method like is_lazy_wrapper when we can assume that the wrapper type changes nothing. However, that seems extremely limiting and questionably useful.
A more approachable aspect to this is describing the kind of type that is parent_type(x). For example, sub-typing something like BufferStyle with these subtypes:
WrappedBuffer: single wrapped buffer like SubArray.
MultiBuffer: multiple distinct buffers like Tridiagonal
ComputedBuffer: buffer is computed on the fly and isn't stored in memory (e.g., FillArrays).
However, creating traits for describing parent_type(x) isn't terribly useful until we have a generic approach for doing f(x) = f(parent(x)).
The text was updated successfully, but these errors were encountered:
When I made this PR to base some good points were brought up about what we knew about
parent(x)
compared tox
. With a few exceptions (that we should probably clean up), we simply useparent_type
as convenient syntax for communicating the type of the underlying data buffer/collection. An informal search through juliahub shows that a handful of packages define something very similar independent of this package, so it's clearly something that has utility already. I'd like to know if we could do better.The biggest hangup here is how we succinctly describe what assumptions persists between
x
andparent(x)
. The only approachable idea I have is a method likeis_lazy_wrapper
when we can assume that the wrapper type changes nothing. However, that seems extremely limiting and questionably useful.A more approachable aspect to this is describing the kind of type that is
parent_type(x)
. For example, sub-typing something likeBufferStyle
with these subtypes:WrappedBuffer
: single wrapped buffer likeSubArray
.MultiBuffer
: multiple distinct buffers likeTridiagonal
ComputedBuffer
: buffer is computed on the fly and isn't stored in memory (e.g., FillArrays).However, creating traits for describing
parent_type(x)
isn't terribly useful until we have a generic approach for doingf(x) = f(parent(x))
.The text was updated successfully, but these errors were encountered: