Refactor the automatic differentiation benchmarks.

1. Merge them into a single binary.
2. All benchmarks now do the Residual and the Residual + Jacobian
evaluation.
3. Re-organize and simplify the CMake file in this directory.
4. Fix a bug in the file where the Clang compiler was not being matched.

autodiff_benchmarks
---------------------------------------------------------------------------
Benchmark                                 Time             CPU   Iterations
---------------------------------------------------------------------------
BM_Linear1CodeGen/0                    3.02 ns         3.01 ns    233870456
BM_Linear1CodeGen/1                    3.02 ns         3.01 ns    233059100
BM_Linear1AutoDiff/0                   3.78 ns         3.77 ns    185791712
BM_Linear1AutoDiff/1                   14.0 ns         13.8 ns     53927875
BM_Linear10CodeGen/0                   5.10 ns         5.10 ns    126745007
BM_Linear10CodeGen/1                   29.1 ns         29.1 ns     23949310
BM_Linear10AutoDiff/0                  6.50 ns         6.49 ns    107516972
BM_Linear10AutoDiff/1                   169 ns          169 ns      4153218
BM_Rat43AutoDiff/0                     52.7 ns         51.2 ns     16444586
BM_Rat43AutoDiff/1                     91.8 ns         91.5 ns      7302316
BM_SnavelyReprojectionCodeGen/0        38.0 ns         36.2 ns     21131501
BM_SnavelyReprojectionCodeGen/1         113 ns          112 ns      5627779
BM_SnavelyReprojectionAutoDiff/0       34.4 ns         34.3 ns     20476937
BM_SnavelyReprojectionAutoDiff/1        242 ns          240 ns      2930611
BM_BrdfCodeGen/0                       53.9 ns         53.7 ns     11950083
BM_BrdfCodeGen/1                        507 ns          505 ns      1396732
BM_BrdfAutoDiff/0                      58.3 ns         57.8 ns     12220670
BM_BrdfAutoDiff/1                      2034 ns         1999 ns       257003

autodiff_benchmarks_fast_math
---------------------------------------------------------------------------
Benchmark                                 Time             CPU   Iterations
---------------------------------------------------------------------------
BM_Linear1CodeGen/0                    3.19 ns         3.16 ns    215313065
BM_Linear1CodeGen/1                    2.78 ns         2.76 ns    201497994
BM_Linear1AutoDiff/0                   3.27 ns         3.26 ns    206154598
BM_Linear1AutoDiff/1                   13.2 ns         13.1 ns     57257840
BM_Linear10CodeGen/0                   5.70 ns         5.51 ns    121849325
BM_Linear10CodeGen/1                   33.9 ns         33.3 ns     21829295
BM_Linear10AutoDiff/0                  6.85 ns         6.78 ns    106813153
BM_Linear10AutoDiff/1                   173 ns          171 ns      3849877
BM_Rat43AutoDiff/0                     44.8 ns         44.2 ns     15577017
BM_Rat43AutoDiff/1                     96.2 ns         94.6 ns      7374864
BM_SnavelyReprojectionCodeGen/0        33.9 ns         33.5 ns     20508373
BM_SnavelyReprojectionCodeGen/1        89.7 ns         88.4 ns      7620624
BM_SnavelyReprojectionAutoDiff/0       36.5 ns         35.8 ns     20546176
BM_SnavelyReprojectionAutoDiff/1        257 ns          252 ns      3044325
BM_BrdfCodeGen/0                       61.1 ns         58.5 ns     11334013
BM_BrdfCodeGen/1                        265 ns          265 ns      2625459
BM_BrdfAutoDiff/0                      52.5 ns         52.5 ns     12938763
BM_BrdfAutoDiff/1                      1560 ns         1560 ns       440909

Change-Id: I2d1a4293d3245a50f73af6cf5e5138084321ae6f
8 files changed
tree: 60f8e752b54a9ce2fa01cb36f0835ee795a12601
  1. bazel/
  2. cmake/
  3. config/
  4. data/
  5. docs/
  6. examples/
  7. include/
  8. internal/
  9. scripts/
  10. travis/
  11. .clang-format
  12. .gitignore
  13. .travis.yml
  14. BUILD
  15. CMakeLists.txt
  16. CONTRIBUTING.md
  17. LICENSE
  18. package.xml
  19. README.md
  20. WORKSPACE
README.md

Build Status

Ceres Solver

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.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see ceres-solver.org for more information.