Sparse matrix inplace operation test