Implementation for PSolveLinear and PLeastSquares