GraphBLAS binding for Go

I am happy to announce a library that we have been working on at Intel.

It is a Go binding for the GraphBLAS C API that calls into the widely used SuiteSparse:GraphBLAS C library.

You can find the Go binding at forGraphBLASGo and some example algorithms at forLAGraphGo.

GraphBLAS is a specification for an API that defines standard building blocks for expressing graph algorithms in the language of linear algebra. It consists of data types for opaque representations of sparse matrices, vectors and scalars over the usual elementary types (Booloans, integers, floating point numbers), as well as user-defined element types. Operations on those data types include matrix-vector, vector-matrix, matrix-matrix multiplications, element-wise addition and multiplication, and so on. Apart from the usual integer and floating point addition and multiplication, client programs can use other arbitrary operators with these high-level operations, represented as monoids or semirings, to express a wide range of powerful algorithms.

SuiteSparse:GraphBLAS is a complete implementation of GraphBLAS in the C programming language. It is used heavily in production. For example, it is used as the underlying graph engine in RedisGraph, and as the built-in sparse matrix multiply in MATLAB. Several bindings exist for SuiteSparse:GraphBLAS for Python, Julia, and PostgreSQL.

The forGraphBLASGo library is a binding that defines a Go API for GraphBLAS and the SuiteSparse:GraphBLAS extensions. It strives to adhere to Go programming style as much as possible. Most prominently, it uses type parameters that have been introduced in Go 1.18 to make the various GraphBLAS object types generic, for added type safety. Other supported Go features include: support for both method and function notation; using multiple return values instead of reference parameters; and Go-style error handling.

We consider the forGraphBLASGo library as quite mature. However, we haven’t yet assigned the version number 1.0.0 to it yet. If you have any feedback or suggestions for improvement, please let us know.

The forLAGraphGo library is less mature and still work in progress.

Looking forward to hearing what you think about this library.

Thanks a lot,