This is a library plus a test harness for collecting algorithms that use the GraphBLAS. For test coverage reports, see https://graphblas.org/LAGraph/ . Documentation: https://lagraph.readthedocs.org
Other
225
stars
59
forks
source link
Rewrote LAGraph_IncidenceMatrix to not rely on main loop; added types for E matrix #225
Rewrote code to eliminate main loop populating tuple list for resulting E matrix. Instead, use an approach that relies on 2 GrB_Matrix_builds and a GrB_Matrix_eWiseAdd. The idea is to build half of the E matrix using the row indices as the columns of the input adjacency matrix, and the other half using the column indices, and then add them at the end.
Based on benchmarks, this new method is slightly faster than the old code (improving the runtime of a single coarsening step by ~200 ms for $5 \times 10^7$ edges)
Finally made the E matrix adhere to the type of the input A matrix. This was way easier than initially thought, since the entries of the A matrix can simply be typecast into doubles when doing GrB_Matrix_extractTuples, and they are automatically cast back when building the result.
Other changes:
Some changes to LAGraph_MaximalMatching to accommodate the E matrix type. For some reason, this slightly decreases accuracy on some tests - the corresponding thresholds were slightly adjusted.
Changes to
LAGraph_IncidenceMatrix
:GrB_Matrix_build
s and aGrB_Matrix_eWiseAdd
. The idea is to build half of the E matrix using the row indices as the columns of the input adjacency matrix, and the other half using the column indices, and then add them at the end.GrB_Matrix_extractTuples
, and they are automatically cast back when building the result.Other changes:
LAGraph_MaximalMatching
to accommodate the E matrix type. For some reason, this slightly decreases accuracy on some tests - the corresponding thresholds were slightly adjusted.