-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce StructArrays
#170
Comments
One concern is that we do not recommend direct access to the fields of the |
There are some justified use cases for this (e.g., filtering, per-channel algorithms), if I'm also considering hyperspectral images where pixel doesn't necessarily have traditionally colorant information. @maxfreu wondering if you have tried this package before? |
@Tokazama might also be interested in this...? |
WRT the interoperability between planar and packed (interleaved) formats, I was looking for a good way to handle chroma subsampling. Chroma subsampling requires more sophisticated processing than |
There are some really nice things about |
Would you mind explaining this a bit more? I'm not sure what specific limitations you're talking about. The unavoidable extra memory allocation, or something else? |
Yes, for rearranging storage layout of particles in 3D space in an MD sim. I can imagine how it could help e.g. with efficient transformations of keypoints in augmentor, but I do not yet see how it helps with multispectral images. But I'm clearly lacking experience here. |
ColorTypes.jl was designed with this possibility in mind; in particular, the struct MyHSCamera <: Color{N0f16,8}
channeldata::NTuple{8,N0f16}
end and implement a few traits, and you'd theoretically be good to go. |
I'm mostly referring to allocations, but it also depends on a lot of the Tables ecosystem. The only benefit this provides over MappedArrays is that it allows you to access each channel using |
I've also noticed performance gaps between |
We only have native support for an array of struct layout, the struct of array layout uses
channelview
/colorview
but it losses the colorant information.We might want to introduce
StructArray
to do some internal memory layout shifting without affecting the interface; it's still array of colorant but storing in a struct of array layout.Of course, need some more sophiscate benchmark to decide this.
The text was updated successfully, but these errors were encountered: