Faster LBFGS.
1. Use column major storage for the various matrices used by
LowRankInverseHessian. Since all the operations are on columns.
2. Use a circular buffer to keep track of history of the LBFGS updates
so that an update does not require copying the entire history. This
makes the updates O(1) rather than O(rank).
The implementation has been checked against the denoising code
where it gives numerically identical results. The overhead of the
LBFGS code is now near negligible as compared to the gradient evaluation.
On a sample problem
before 1050ms after: 630ms
Change-Id: I537ba506ac35fc4960b304c10d923a8dea2ae031
2 files changed