Adds a Ceres Context structure.

A Ceres Context holds common global state that can be re-used within
Ceres.  The Context current contains a thread pool if compiling with
C++11 threading support.  Threads are expensive to create and destroy so
it is good to maintain across multiple Ceres solves.

Tested by compiling with and without TBB support and ran unit tests. Ran
bazel as well.

Change-Id: I82f598dfae642aa0e81a6039dc174608a5e8dbfb
This commit is contained in:
Mike Vitus
2018-02-22 10:28:39 -08:00
parent f217ccfb69
commit f408f89e8b
43 changed files with 458 additions and 85 deletions
+3 -4
View File
@@ -35,12 +35,12 @@
#include <string>
#include <vector>
#include "ceres/crs_matrix.h"
#include "ceres/internal/disable_warnings.h"
#include "ceres/internal/macros.h"
#include "ceres/internal/port.h"
#include "ceres/iteration_callback.h"
#include "ceres/ordered_groups.h"
#include "ceres/types.h"
#include "ceres/internal/disable_warnings.h"
namespace ceres {
@@ -1059,9 +1059,8 @@ class CERES_EXPORT Solver {
};
// Helper function which avoids going through the interface.
CERES_EXPORT void Solve(const Solver::Options& options,
Problem* problem,
Solver::Summary* summary);
CERES_EXPORT void Solve(const Solver::Options& options, Problem* problem,
Solver::Summary* summary);
} // namespace ceres