Implementation of the SparseMatrix add operation