mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
-new: recursive costs system, useful to determine automatically
when to evaluate arguments and when to meta-unroll. -use it in Product to determine when to eval args. not yet used to determine when to unroll. for now, not used anywhere else but that'll follow. -fix badness of my last commit
This commit is contained in:
@@ -16,13 +16,8 @@ void echelon(MatrixBase<Derived>& m)
|
||||
.maxCoeff(&rowOfBiggest, &colOfBiggest);
|
||||
m.row(k).swap(m.row(k+rowOfBiggest));
|
||||
m.col(k).swap(m.col(k+colOfBiggest));
|
||||
// important performance tip:
|
||||
// in a complex expression such as below it can be very important to fine-tune
|
||||
// exactly where evaluation occurs. The parentheses and .eval() below ensure
|
||||
// that the quotient is computed only once, and that the evaluation caused
|
||||
// by operator* occurs last.
|
||||
m.corner(BottomRight, cornerRows-1, cornerCols)
|
||||
-= m.col(k).end(cornerRows-1) * (m.row(k).end(cornerCols) / m(k,k)).eval();
|
||||
-= m.col(k).end(cornerRows-1) * (m.row(k).end(cornerCols) / m(k,k));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user