Solved buf in sparse matrix multiplication