diff options
Diffstat (limited to 'extern/ceres/internal/ceres/gradient_checking_cost_function.h')
-rw-r--r-- | extern/ceres/internal/ceres/gradient_checking_cost_function.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/extern/ceres/internal/ceres/gradient_checking_cost_function.h b/extern/ceres/internal/ceres/gradient_checking_cost_function.h index 497f8e2a594..e9a34f7eb9f 100644 --- a/extern/ceres/internal/ceres/gradient_checking_cost_function.h +++ b/extern/ceres/internal/ceres/gradient_checking_cost_function.h @@ -32,12 +32,12 @@ #ifndef CERES_INTERNAL_GRADIENT_CHECKING_COST_FUNCTION_H_ #define CERES_INTERNAL_GRADIENT_CHECKING_COST_FUNCTION_H_ +#include <mutex> #include <string> #include "ceres/cost_function.h" #include "ceres/iteration_callback.h" #include "ceres/local_parameterization.h" -#include "ceres/mutex.h" namespace ceres { namespace internal { @@ -52,7 +52,7 @@ class GradientCheckingIterationCallback : public IterationCallback { // Will return SOLVER_CONTINUE until a gradient error has been detected, // then return SOLVER_ABORT. - virtual CallbackReturnType operator()(const IterationSummary& summary); + CallbackReturnType operator()(const IterationSummary& summary) final; // Notify this that a gradient error has occurred (thread safe). void SetGradientErrorDetected(std::string& error_log); @@ -63,8 +63,7 @@ class GradientCheckingIterationCallback : public IterationCallback { private: bool gradient_error_detected_; std::string error_log_; - // Mutex protecting member variables. - ceres::internal::Mutex mutex_; + std::mutex mutex_; }; // Creates a CostFunction that checks the Jacobians that cost_function computes |