20 karma · joined Apr 9, 2019 (7y ago) · 4 submissions
comment 6y ago · link · parent
https://github.com/GraphBLAS/LAGraph/blob/master/Source/Algo...
https://github.com/GraphBLAS/LAGraph/blob/master/Source/Algo...
https://github.com/GraphBLAS/LAGraph/blob/master/Source/Algo... (that one has 6 algorithms inside)
https://github.com/GraphBLAS/LAGraph/blob/master/Source/Algo...
We're working on the GPU version, and all the built-in semirings very work nicely on the GPU. For user-defined semirings, we will need the user operators defined as strings containing C code. Then they can all be done on the GPU too.
comment 6y ago · link · parent
comment 7y ago · link · parent
A kernel is a vector x so that Ax = 0. There are places where y<m> = Ax = 0 is useful to compute (m is a mask, like a bulk-if statement, where y(i) is modified only if m(i)=1). If x is a set of nodes then A'x is the set union of the neighbors of x (assuming A(i,j) is the edge (i,j), which is typical but not required). Then if x has no neighbors in the set m, then y = 0. I use this in the GraphBLAS implementation of Luby's independent set algorithm (in my Demo/ folder of SuiteSparse/GraphBLAS).
There are lots of connections between linear algebra and graph theory. In this case, the idea of a kernel does find its place in a graph algorithm, but it's a special case. It's not something that appears everywhere in every graph algorithm.
comment 7y ago · link · parent
SuiteSparse:GraphBLAS does have a fast incremental update mechanism, but it's not (yet) as flexible as other approaches. But the beauty of GraphBLAS is that the data structure is entirely opaque to the user, so if a library implementor such as myself wants to plunk in an entire new one, then the user code that relies on GraphBLAS doesn't change. It would be possible, even, to use lua-graph internally (or anything else, license permitting), and then to select the fastest format for the problem at hand. Or, lua-graph (or any graph library) could be augmented to support a GraphBLAS API to its functionality.
Currently, SuiteSparse:GraphBLAS has four matrix formats: CSR, CSC, hypersparse CSR, and hypersparse CSC. The CSR and CSC formats take O(|V|+|E|) space, and the hypersparse formats take O(|E|) space. Hypersparse matrices arise in some problems, and subgraphs are often hypersparse. In the future, I would like to add a CSB format as well. I select between standard and hypersparse formats automatically. The default is CSR and I don't pick CSC automatically. In some cases, it would make sense to hold the matrix in both CSR and CSC formats, simultaneously, thus allowing fast access to both the in- and out-adjacency lists at the same time (at the cost of double the memory). I don't do that yet, however.