diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h index 0300220ca..4914f6ba8 100644 --- a/Eigen/src/Core/SolveTriangular.h +++ b/Eigen/src/Core/SolveTriangular.h @@ -107,32 +107,32 @@ struct triangular_solver_selector * meta-unrolling implementation ***************************************************************************/ -template +template struct triangular_solver_unroller; -template -struct triangular_solver_unroller { +template +struct triangular_solver_unroller { enum { IsLower = ((Mode&Lower)==Lower), - RowIndex = IsLower ? Index : Size - Index - 1, + RowIndex = IsLower ? LoopIndex : Size - LoopIndex - 1, S = IsLower ? 0 : RowIndex+1 }; static void run(const Lhs& lhs, Rhs& rhs) { - if (Index>0) - rhs.coeffRef(RowIndex) -= lhs.row(RowIndex).template segment(S).transpose() - .cwiseProduct(rhs.template segment(S)).sum(); + if (LoopIndex>0) + rhs.coeffRef(RowIndex) -= lhs.row(RowIndex).template segment(S).transpose() + .cwiseProduct(rhs.template segment(S)).sum(); if(!(Mode & UnitDiag)) rhs.coeffRef(RowIndex) /= lhs.coeff(RowIndex,RowIndex); - triangular_solver_unroller::run(lhs,rhs); + triangular_solver_unroller::run(lhs,rhs); } }; -template -struct triangular_solver_unroller { +template +struct triangular_solver_unroller { static void run(const Lhs&, Rhs&) {} };