Open Nelson-numerical-software opened 5 years ago
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:
nzmax, ir, jc should be uint64 and not int32 v7.3 matfile uses uint64 and not int32 index