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

mat_sparse_t should be extended to manage 64 bits index #102

Open
Nelson-numerical-software opened this issue Feb 17, 2019 · 4 comments
Open

Comments

@Nelson-numerical-software

nzmax, ir, jc should be uint64 and not int32
v7.3 matfile uses uint64 and not int32 index

@tbeu
Copy link
Owner

tbeu commented Feb 18, 2019

Confirmed, the design of the mat_sparse_t structures is broken w.r.t. the dimension types.

Furthermore, there is no need to store isComplex, isGlobal, isLogical and mem_conserve as int32 in matvar_t. This would save 12 bytes out of the 72 bytes of matvar_t.

Unfortunately, both changes are not backward-compatibel and so far I am not sure if it is a good idea to break compatibility. There are tools out there (e.g., C# wrappers) that depend on a certain memory layout of both structures.

@Nelson-numerical-software
Copy link
Author

Unfortunately, both changes are not backward-compatibel and so far I am not sure if it is a good idea to break compatibility. There are tools out there (e.g., C# wrappers) that depend on a certain memory layout of both structures.

With an compilation flags, it should be possible to choose indexing mode.
64 bit indexing for sparse is available since 2006.

@tbeu
Copy link
Owner

tbeu commented Feb 19, 2019

Which leaves the question, what to make the default case.

@Nelson-numerical-software
Copy link
Author

It could be something as:

  • current version 1.5.13
  • next version 1.6.0 with compilation flag with index 64 bit disabled by default but with a warning during build indicating the next change.
  • 2.0.0 64 bit index by default

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