-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sparse::updateData
reads nnz from nnz_expanded_
if the is_expanded_
flag is set
#176
Comments
this issue is also related to the the newer code in #175 and #174 instead treats my proposal for this is the following:
the rationale is the following: it's more efficient to have a guaranteed single source of truth for the current number of used indices than it is to have two separate locations that you need to branch on to get the number of used indices. additionally, this is the usual case anyway, it doesn't seem to me that most code will care about the number of indices used in the smallest possible representation (the effective behavior of the current code with respect to one variant of this proposal is to instead merge the functionality of |
CC @kswirydo |
There is really no need for |
when determining size of the buffers to copy data to,
Sparse::updateData
reads the number of nonzero values within the matrix from thennz_expanded_
field if the matrix is marked as expanded, when it should be usingnnz_
in all cases, for if the matrix is expanded,nnz_
should be set tonnz_expanded_
anyway. this is confusing behavior, and that branch should be removed in all copies of theSparse::updateData
source to remediate it, which should not fail on correctly behaving code. this branch is present in all copies of this methodThe text was updated successfully, but these errors were encountered: