matmult_p fully functional