matio
matio copied to clipboard
mat_sparse_t should be extended to manage 64 bits index
nzmax, ir, jc should be uint64 and not int32 v7.3 matfile uses uint64 and not int32 index
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.
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.
Which leaves the question, what to make the default case.
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