Compute & report timing information for line searches.
- We now compute & report the cumulative time spent performing the
following tasks as part of a line search:
- Evaluation of the univariate cost function value & gradient.
- Minimization of the interpolating polynomial.
- Total time spent performing line searches.
- This information is now reported for all minimizers, although only in
the case of a constrained problem for the TR minimizer.
- Remove LineSearch::Function abstraction in place of using
LineSearchFunction implementation directly, and remove virtual
functions from LineSearchFunction.
-- LineSearch::Function added an unnecessary level of abstraction since
the user always had to create a LineSearchFunction anyway to use a
Ceres Evaluator, and it added an unncessary virtual function call.
Change-Id: Ia4e1921d78f351ae119875aa97a3ea5e8b5d9877
diff --git a/include/ceres/solver.h b/include/ceres/solver.h
index a5efa2a..791630d 100644
--- a/include/ceres/solver.h
+++ b/include/ceres/solver.h
@@ -832,6 +832,26 @@
// Time (in seconds) spent doing inner iterations.
double inner_iteration_time_in_seconds;
+ // Cumulative timing information for line searches performed as part of the
+ // solve. Note that in addition to the case when the Line Search minimizer
+ // is used, the Trust Region minimizer also uses a line search when
+ // solving a constrained problem.
+
+ // Time (in seconds) spent evaluating the univariate cost function as part
+ // of a line search.
+ double line_search_cost_evaluation_time_in_seconds;
+
+ // Time (in seconds) spent evaluating the gradient of the univariate cost
+ // function as part of a line search.
+ double line_search_gradient_evaluation_time_in_seconds;
+
+ // Time (in seconds) spent minimizing the interpolating polynomial
+ // to compute the next candidate step size as part of a line search.
+ double line_search_polynomial_minimization_time_in_seconds;
+
+ // Total time (in seconds) spent performing line searches.
+ double line_search_total_time_in_seconds;
+
// Number of parameter blocks in the problem.
int num_parameter_blocks;
@@ -871,6 +891,9 @@
// Number of residuals in the reduced problem.
int num_residuals_reduced;
+ // Is the reduced problem bounds constrained.
+ bool is_constrained;
+
// Number of threads specified by the user for Jacobian and
// residual evaluation.
int num_threads_given;