-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adding more formats to GrB_Format #83
Comments
Yeah, this is missing, and awkward to do. |
What's the performance like relative to a dense copy? I bet not ideal. Because of this I've dropped a GrB only version for now. I may try again after working on IndexBinary |
I have placeholders for I got it to work but of course didn't add it because it's not in the spec. Exporting a matrix in dense format would be a single parallel memcpy (if it's in the right format already). If the matrix had any entries missing, my proposal was that an error would be returned ( If the matrix was not in a dense format already, or if held by row and the export is by-column, then I make a copy. I could have relaxed the former case but didn't get to it. That is, if a matrix is in sparse compressed-column format with all entries present, and a So if you ask me to export a matrix in CSR format, but its in a dense row format, I just make a temporary copy, convert it in place to CSR, and then memcpy that to the user output (yes, that's a double or triple copy that I could avoid, but I decided that was not worth optimizing since the API needs to be fixed anyway). |
One option that might not break the API much: if you export in CSR format but pass in NULL pointers for some of the outputs, then those are not exported. Currently that is an error. Then, if you know the matrix has all entries present, you could just export the values and not the pattern (by passing in NULL for the Ap and Ai components, as I call them). End result is the export of a dense matrix held by row. |
In trying to implement a "GrB_only" mode a gigantic headache is
Matrix_import
andMatrix_export
. Full is an obvious inclusion, and the doubly compressed formats are fairly well known at this point.I think it's feasible for us to allow an implementation to return
GrB_NOT_IMPLEMENTED
for doubly compressed without any issue. But lack of Full is a real footgun I feel (unless I'm missing the "obvious" way to do this).The text was updated successfully, but these errors were encountered: