Skip to content
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

Choice of memory layout for VectorOfArray #256

Open
muendlein opened this issue Mar 25, 2023 · 1 comment
Open

Choice of memory layout for VectorOfArray #256

muendlein opened this issue Mar 25, 2023 · 1 comment

Comments

@muendlein
Copy link

From the docs:

A[i] # Returns the ith array in the vector of arrays
A[j, i] # Returns the jth component in the ith array
A[j1, ..., jN, i] # Returns the (j1,...,jN) component of the ith array

which presents itself as a column-major matrix with the columns being the arrays from the vector.

What is the reasoning behind this memory layout? Can one use a tranposed memory layout, i.e. each component is represented by a column? What are the performance implications when trying to access A[j1, :] for max(i) >> max(j), i.e. timeseries data?

Perhaps the answers to those questions should be included in the docs.

@ChrisRackauckas
Copy link
Member

The reasoning is just that it's the column-major form and Julia's matrices are column major.

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

No branches or pull requests

2 participants