mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
368a738e52
Add Ownership semantics to the AutoDiffCostFunction This allows several benefits, such as pointer ordering always being the same for numerical repeatability (due to blocks being ordered by pointer address), memory adjacency for better cache performance, and reduced allocator pressure / overhead. This is then made use of in libmv by preallocating the errors and cost functions into vectors Change-Id: Ia5b97e7249b55a463264b6e26f7a02291927c9f2