MCPcopy Create free account
hub / github.com/ceres-solver/ceres-solver / SetLinearSolver

Function SetLinearSolver

examples/bundle_adjuster.cc:149–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147namespace {
148
149void SetLinearSolver(Solver::Options* options) {
150 CHECK(StringToLinearSolverType(CERES_GET_FLAG(FLAGS_linear_solver),
151 &options->linear_solver_type));
152 CHECK(StringToPreconditionerType(CERES_GET_FLAG(FLAGS_preconditioner),
153 &options->preconditioner_type));
154 CHECK(StringToVisibilityClusteringType(
155 CERES_GET_FLAG(FLAGS_visibility_clustering),
156 &options->visibility_clustering_type));
157 CHECK(StringToSparseLinearAlgebraLibraryType(
158 CERES_GET_FLAG(FLAGS_sparse_linear_algebra_library),
159 &options->sparse_linear_algebra_library_type));
160 CHECK(StringToDenseLinearAlgebraLibraryType(
161 CERES_GET_FLAG(FLAGS_dense_linear_algebra_library),
162 &options->dense_linear_algebra_library_type));
163 CHECK(
164 StringToLinearSolverOrderingType(CERES_GET_FLAG(FLAGS_ordering_type),
165 &options->linear_solver_ordering_type));
166 options->use_explicit_schur_complement =
167 CERES_GET_FLAG(FLAGS_explicit_schur_complement);
168 options->use_mixed_precision_solves =
169 CERES_GET_FLAG(FLAGS_mixed_precision_solves);
170 options->max_num_refinement_iterations =
171 CERES_GET_FLAG(FLAGS_max_num_refinement_iterations);
172 options->max_linear_solver_iterations =
173 CERES_GET_FLAG(FLAGS_max_linear_solver_iterations);
174 options->use_spse_initialization =
175 CERES_GET_FLAG(FLAGS_use_spse_initialization);
176 options->spse_tolerance = CERES_GET_FLAG(FLAGS_spse_tolerance);
177 options->max_num_spse_iterations =
178 CERES_GET_FLAG(FLAGS_max_num_spse_iterations);
179}
180
181void SetOrdering(BALProblem* bal_problem, Solver::Options* options) {
182 const int num_points = bal_problem->num_points();

Callers 1

Tested by

no test coverage detected