add a matrix compute cython util