Ax=b solver using conjugate gradient method