mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Insert missing CUDA guards.
Change-Id: If97c51557376385e3958863072cfcf76dd810d15
This commit is contained in:
@@ -724,12 +724,14 @@ void Solver::Solve(const Solver::Options& options,
|
||||
Program* program = problem_impl->mutable_program();
|
||||
PreSolveSummarize(options, problem_impl, summary);
|
||||
|
||||
#ifndef CERES_NO_CUDA
|
||||
if (IsCudaRequired(options)) {
|
||||
if (!problem_impl->context()->InitCUDA(&summary->message)) {
|
||||
LOG(ERROR) << "Terminating: " << summary->message;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif // CERES_NO_CUDA
|
||||
|
||||
// If gradient_checking is enabled, wrap all cost functions in a
|
||||
// gradient checker and install a callback that terminates if any gradient
|
||||
|
||||
Reference in New Issue
Block a user