Commit Graph

4 Commits

Author SHA1 Message Date
Taylor Braun-Jones 3f6d273676 Unify symbol visibility configuration for all compilers
This makes it possible to build unit tests with shared libraries on MSVC.

Change-Id: I1db66a80b2c78c4f3d354e35235244d17bac9809
2020-10-15 16:56:07 -04:00
Nikolaus Demmel 7b8f675bfd fix formatting for (non-generated) internal source files
- Change formatting standard to Cpp11. Main difference is not having
  the space between two closing >> for nested templates. We don't
  choose c++14, because older versions of clang-format (version 9
  and earlier) don't know this value yet, and it doesn't make a
  difference in the formatting.
- Apply clang-format to all (non generated) internal source files.
- Manually fix some code sections (clang-format on/off) and c-strings
- Exclude some embedded external files with very different formatting
  (gtest/gmock)
- Add script to format all source files

Change-Id: Ic6cea41575ad6e37c9e136dbce176b0d505dc44d
2020-09-21 02:52:07 +02:00
Sameer Agarwal c8202e6926 Get rid of redundant function evaluations in LineSearchMinimizer
1. Replace LineSearch::Summary::optimal_step_size with
   LineSearch:Summary::optimal_point which is a FunctionSample.
2. Add the actual vector position and vector gradient of the
   point in the FunctionSample
3. Use the above two to get rid of an extraneous function evalation
   in LineSearchMinimizer.

Runtime performance is almost 2x improved as a result.

Thanks to @svenpilz for reporting this.

https://github.com/ceres-solver/ceres-solver/issues/296

Change-Id: Iebf2db7acecb2c95c9b1683b73cdc5faab78b02e
2017-07-05 15:40:58 -07:00
Sameer Agarwal 621b79b972 Refactor FunctionSample & LineSearchFunction
1. Move FunctionSample to its own .h/.cc files.
2. Migrate LineSearchFunction::Evaluate to use FunctionSample
   for input and output.

Change-Id: I8bfb97e1900d95a4686c9621dda5b584458b45c0
2017-07-05 07:56:58 -07:00