Skip to content

Conversation

@mbauman
Copy link
Member

@mbauman mbauman commented Jul 17, 2020

Not all AbstractArrays define elsize. Cf. #35900, #36714.

Not all `AbstractArray`s define elsize.  Cf. #35900, #36714.
@JeffBezanson
Copy link
Member

Uhoh, now that I think about it this opens a bigger can of worms. When the dimension 1 stride is not 1, we write elements individually (no alignment padding), and otherwise in memory chunks (yes alignment padding). For SubArrays of Arrays, we should probably change that to always include the padding. I can open a separate PR for that.

Similarly, there might be many other types besides Array that need to use elsize here, so we should probably add a fallback for all AbstractArray types.

@JeffBezanson JeffBezanson merged commit d806fb9 into master Jul 20, 2020
@JeffBezanson JeffBezanson deleted the mb/sizeofsubarray branch July 20, 2020 20:12
JeffBezanson pushed a commit that referenced this pull request Jul 21, 2020
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
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.

4 participants