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

Enable GraphBLAS binding to write arrays directly #36

Merged
merged 1 commit into from
Jul 10, 2023
Merged

Conversation

alugowski
Copy link
Owner

Previous implementation would always write a coordinate file due to GraphBLAS iterators sometimes throwing GrB_NOT_IMPLEMENTED. Turns out that only throws when the matrix is GxB_BY_ROW, as Matrix Market requires column-major order and GraphBLAS appears to only support iterating on the native direction.

Note that this change is only efficient if the matrix is GxB_BY_COL as that is the only case where an iterator can be used. If the matrix is GxB_BY_ROW, then a full copy and sort is necessary, a very inefficient operation, but still better than writing a coordinate version of that matrix.

Previous implementation would always write a coordinate file due to GraphBLAS iterators sometimes throwing GrB_NOT_IMPLEMENTED. Turns out that only throws when the matrix is GxB_BY_ROW, as Matrix Market requires column-major order and GraphBLAS appears to only support iterating on the native direction.

Note that this change is only efficient if the matrix is GxB_BY_COL as that is the only case where an iterator can be used. If the matrix is GxB_BY_ROW, then a full copy and sort is necessary, a very inefficient operation, but still better than writing a coordinate version of that matrix.
@alugowski alugowski merged commit 4e48fc9 into main Jul 10, 2023
@alugowski alugowski deleted the graphblasarray branch July 10, 2023 05:06
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

Successfully merging this pull request may close these issues.

1 participant