Changes TBB to use tbb::task_arena instead of tbb::task_scheduler_init.

Fixes the current implementation where the desired number of threads may
not be honored if another tbb::task_scheduler_init is instantiated. We
are using tbb::task_arena to solve this which is only available in newer
versions of TBB.

Also increases the performance by not creating/destroying the TBB setup
via tbb::task_scheduler_init on every iteration evaluation. This
increases the performance in single threaded mode using TBB by 10x.

By not specifically calling tbb::task_scheduler_init, this will either
respect any active tbb::task_scheduler_init instantiations or use the
default TBB settings which is hardware dependent. Ceres will honor the
user's requested number of threads through the task_arenas.

Tested via compiling with TBB enabled and ran the unit tests.

Change-Id: I5538407563449cdb5a0eaf8b8ccab62263912110
4 files changed
tree: ba903341079cc4f97ab815a2257fb9d97ff1c193
  1. cmake/
  2. config/
  3. data/
  4. docs/
  5. examples/
  6. include/
  7. internal/
  8. jni/
  9. scripts/
  10. .gitignore
  11. CMakeLists.txt
  12. LICENSE
  13. package.xml
  14. README.md
README.md

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.

WARNING - Do not make GitHub pull requests!

Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.

The upstream Gerrit repository is

https://ceres-solver.googlesource.com/ceres-solver