Commit Graph

12 Commits

Author SHA1 Message Date
Sameer Agarwal caf614a6c1 Modernize code using c++17 constructs
Mostly done using

find . \( -name '*.cc' -o -name '*.h' \) -a -type f -exec clang-tidy -p \
cmake-build -checks='-*,google-*,modernize-*,-modernize-use-nodiscard,-modernize-use-trailing-return-type' {} -fix \;

Change-Id: Ifccbcabe7a1d9a32a09d28ac4f3f8466696c1a50
2022-04-22 06:11:18 -07:00
Sameer Agarwal 4705159858 Add missing includes for config.h
covariance.h was using SUITE_SPARSE even when SUITESPARSE
was disabled because it did not have config.h included in it
so it did not see that CERES_NO_SUITESPARSE was defined.

Add more config.h includes to files that are using these
configuration macros.

Change-Id: I6b1d2c2bd9e559de40a6332cd6be85ad4da3377b
2022-03-12 15:55:19 -08:00
Sameer Agarwal ae65219e04 ClangTidy cleanups
1. NULL -> nullptr
2. foo.reset(new Bar) -> = foo = std::make_unique<Bar>()
3. Missing std library includes & prefixes

Change-Id: I260b261b484554be681ee5a7398126fdb3b3a789
2022-02-09 10:06:49 -08:00
Sameer Agarwal 8547cbd55f Make EventLogger more efficient.
If VLOG(3) is not enabled, then eliminate all work done by the
EventLogger constructor.

Change-Id: I0f8512dcb275b68ad443b2e26bc1da58a3238b0a
2019-12-15 14:40:53 -08:00
Thomas Gamper 28b1147a1d Use high-resolution timer on Windows
This fixes a Windows specific issue where the
problem-summary reports timings as zero, as long as
the time difference in question is smaller than one
second.

Change-Id: Ibd91874294423af6acda2575eae80f01aabed6d3
2017-09-26 13:10:54 +00:00
Keir Mierle 7492b0d8de Update copyright headers with new year and URL
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.

Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
2015-03-18 05:43:23 +00:00
Sameer Agarwal 05a07ecc77 Remove using std::string from port.h
Change-Id: I7376f5e7eace22ec1fc05a61eaa858594f08682d
2015-01-07 15:10:46 -08:00
Sameer Agarwal 9f9488b162 Add iteration and time reporting for inner iterations.
Also

1. Remove an inadvertent LOG(INFO) from trust_region_minimizer.cc
2. Refactor some of the code in FullReport to reduce duplication
   across line search and trust region minimizers.
3. Consistent capitalization.

Change-Id: I9078b1704efab23d2858530636f524e60c7d9016
2013-05-23 21:03:31 +00:00
Sameer Agarwal c58e6dc3ea More refined event logging in solver_impl.cc
Change-Id: Ie3061c921c006d2600d16185c690f52ccf816f68
2013-02-11 18:23:27 -08:00
Sameer Agarwal f102a68e41 Remove extraneous initial and final evals.
Change-Id: I80ed87435f399cbf452c68be7ea1e7139696aa4a
2013-02-11 15:19:21 -08:00
Sameer Agarwal 42a84b87fa Expand reporting of timing information.
1. Add an ExecutionSummary object to record execution
   information about Ceres objects.
2. Add an EventLogger object to log events in a function call.
3. Add a ScopedExecutionTimer object to log times in ExecutionSummary.
4. Instrument ProgramEvaluator and all the linear solvers
   to report their timing statistics.
5. Connect the timing statistics to Summary::FullReport.
6. Add high precision timer on unix systems using
   gettimeofday() call.
7. Various minor clean ups all around.

Change-Id: I5e09804b730b09535484124be7dbc1c58eccd1d4
2013-02-06 01:00:38 -08:00
Petter Strandmark 76533b3c46 Adding high-precision timer using OpenMP
(fixes issue #41)

Change-Id: Ieffe5f789a591c1e766ae619b75f0d7f6cd890f4
2012-09-13 18:10:57 -07:00