commit | 600262e8f8d855c361bc4df039d261f54239da33 | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Wed Aug 30 00:06:39 2017 -0700 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Mon Sep 25 17:44:15 2017 +0000 |
tree | 110b54e2eb31d0bf620ae712977187733bdfb54c | |
parent | 4ffec20a4400197c015fe7bbdb3a3836265d46a0 [diff] |
Delete cost and loss functions when not in use. Delete CostFunctions and LossFunctions when there are no more ResidualBlocks referring to them. This is done by maintaining a map with reference counts for CostFunctions and LossFunctions. The same maps are also used at the time of the destruction of the ProblemImpl object itself. Previously vectors of these objects were constructed, uniqed and the objects destroyed. The update to the maps increases the cost of calling AddResidualBlock, this has been mitigated, actually making AddResidualBlock faster, by reusing a temporary vector rather than allocating one on the stack every time. Change-Id: I28b5287511713d28069ae428e2ff69224c0d03b4
Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.
Please see ceres-solver.org for more information.
Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.
The upstream Gerrit repository is
https://ceres-solver.googlesource.com/ceres-solver