Lines Matching refs:options
68 const Solver::Options& options, in TrustRegionMinimize() argument
74 Minimizer::Options minimizer_options(options); in TrustRegionMinimize()
86 options.minimizer_progress_to_stdout); in TrustRegionMinimize()
87 if (options.logging_type != SILENT) { in TrustRegionMinimize()
93 if (options.update_state_every_iteration) { in TrustRegionMinimize()
109 options.initial_trust_region_radius; in TrustRegionMinimize()
110 trust_region_strategy_options.max_radius = options.max_trust_region_radius; in TrustRegionMinimize()
111 trust_region_strategy_options.min_lm_diagonal = options.min_lm_diagonal; in TrustRegionMinimize()
112 trust_region_strategy_options.max_lm_diagonal = options.max_lm_diagonal; in TrustRegionMinimize()
114 options.trust_region_strategy_type; in TrustRegionMinimize()
115 trust_region_strategy_options.dogleg_type = options.dogleg_type; in TrustRegionMinimize()
138 const Solver::Options& options, in LineSearchMinimize() argument
142 Minimizer::Options minimizer_options(options); in LineSearchMinimize()
151 options.minimizer_progress_to_stdout); in LineSearchMinimize()
152 if (options.logging_type != SILENT) { in LineSearchMinimize()
158 if (options.update_state_every_iteration) { in LineSearchMinimize()
184 void SolverImpl::Solve(const Solver::Options& options, in Solve() argument
196 if (options.minimizer_type == TRUST_REGION) { in Solve()
197 TrustRegionSolve(options, problem_impl, summary); in Solve()
199 LineSearchSolve(options, problem_impl, summary); in Solve()
220 Solver::Options options(original_options); in TrustRegionSolve() local
223 if (options.num_threads > 1) { in TrustRegionSolve()
228 options.num_threads = 1; in TrustRegionSolve()
230 if (options.num_linear_solver_threads > 1) { in TrustRegionSolve()
235 options.num_linear_solver_threads = 1; in TrustRegionSolve()
240 summary->num_threads_used = options.num_threads; in TrustRegionSolve()
242 if (options.trust_region_minimizer_iterations_to_dump.size() > 0 && in TrustRegionSolve()
243 options.trust_region_problem_dump_format_type != CONSOLE && in TrustRegionSolve()
244 options.trust_region_problem_dump_directory.empty()) { in TrustRegionSolve()
271 if (options.check_gradients) { in TrustRegionSolve()
276 options.numeric_derivative_relative_step_size, in TrustRegionSolve()
277 options.gradient_check_relative_precision)); in TrustRegionSolve()
284 if (options.linear_solver_ordering.get() != NULL) { in TrustRegionSolve()
285 if (!IsOrderingValid(options, problem_impl, &summary->message)) { in TrustRegionSolve()
291 options.linear_solver_ordering.reset(new ParameterBlockOrdering); in TrustRegionSolve()
297 options.linear_solver_ordering->AddElementToGroup(it->first, 0); in TrustRegionSolve()
304 scoped_ptr<Program> reduced_program(CreateReducedProgram(&options, in TrustRegionSolve()
314 OrderingToGroupSizes(options.linear_solver_ordering.get(), in TrustRegionSolve()
328 VLOG_IF(1, options.logging_type != SILENT) << summary->message; in TrustRegionSolve()
343 linear_solver(CreateLinearSolver(&options, &summary->message)); in TrustRegionSolve()
350 summary->linear_solver_type_used = options.linear_solver_type; in TrustRegionSolve()
352 summary->preconditioner_type = options.preconditioner_type; in TrustRegionSolve()
353 summary->visibility_clustering_type = options.visibility_clustering_type; in TrustRegionSolve()
357 summary->num_linear_solver_threads_used = options.num_linear_solver_threads; in TrustRegionSolve()
360 options.dense_linear_algebra_library_type; in TrustRegionSolve()
362 options.sparse_linear_algebra_library_type; in TrustRegionSolve()
364 summary->trust_region_strategy_type = options.trust_region_strategy_type; in TrustRegionSolve()
365 summary->dogleg_type = options.dogleg_type; in TrustRegionSolve()
367 scoped_ptr<Evaluator> evaluator(CreateEvaluator(options, in TrustRegionSolve()
379 if (options.use_inner_iterations) { in TrustRegionSolve()
385 CreateInnerIterationMinimizer(options, in TrustRegionSolve()
402 TrustRegionMinimize(options, in TrustRegionSolve()
465 Solver::Options options(original_options); in LineSearchSolve() local
471 options.linear_solver_type = CGNR; in LineSearchSolve()
475 if (options.num_threads > 1) { in LineSearchSolve()
480 options.num_threads = 1; in LineSearchSolve()
485 summary->num_threads_used = options.num_threads; in LineSearchSolve()
492 if (options.linear_solver_ordering.get() != NULL) { in LineSearchSolve()
493 if (!IsOrderingValid(options, problem_impl, &summary->message)) { in LineSearchSolve()
498 options.linear_solver_ordering.reset(new ParameterBlockOrdering); in LineSearchSolve()
504 options.linear_solver_ordering->AddElementToGroup(it->first, 0); in LineSearchSolve()
516 if (options.check_gradients) { in LineSearchSolve()
521 options.numeric_derivative_relative_step_size, in LineSearchSolve()
522 options.gradient_check_relative_precision)); in LineSearchSolve()
531 scoped_ptr<Program> reduced_program(CreateReducedProgram(&options, in LineSearchSolve()
548 VLOG_IF(1, options.logging_type != SILENT) << summary->message; in LineSearchSolve()
564 scoped_ptr<Evaluator> evaluator(CreateEvaluator(options, in LineSearchSolve()
577 LineSearchMinimize(options, reduced_program.get(), evaluator.get(), summary); in LineSearchSolve()
600 bool SolverImpl::IsOrderingValid(const Solver::Options& options, in IsOrderingValid() argument
603 if (options.linear_solver_ordering->NumElements() != in IsOrderingValid()
615 if (!options.linear_solver_ordering in IsOrderingValid()
623 if (IsSchurType(options.linear_solver_type) && in IsOrderingValid()
624 options.linear_solver_ordering->NumGroups() > 1) { in IsOrderingValid()
627 options.linear_solver_ordering->group_to_elements().begin()->second; in IsOrderingValid()
662 Program* SolverImpl::CreateReducedProgram(Solver::Options* options, in CreateReducedProgram() argument
666 CHECK_NOTNULL(options->linear_solver_ordering.get()); in CreateReducedProgram()
695 options->linear_solver_ordering.get(); in CreateReducedProgram()
701 options->inner_iteration_ordering.get(); in CreateReducedProgram()
706 if (IsSchurType(options->linear_solver_type) && in CreateReducedProgram()
719 if (options->linear_solver_type == ITERATIVE_SCHUR) { in CreateReducedProgram()
720 options->preconditioner_type = in CreateReducedProgram()
722 options->preconditioner_type); in CreateReducedProgram()
725 options->linear_solver_type = in CreateReducedProgram()
727 options->linear_solver_type); in CreateReducedProgram()
730 if (IsSchurType(options->linear_solver_type)) { in CreateReducedProgram()
732 options->linear_solver_type, in CreateReducedProgram()
733 options->sparse_linear_algebra_library_type, in CreateReducedProgram()
743 if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY && in CreateReducedProgram()
744 !options->dynamic_sparsity) { in CreateReducedProgram()
746 options->sparse_linear_algebra_library_type, in CreateReducedProgram()
760 LinearSolver* SolverImpl::CreateLinearSolver(Solver::Options* options, in CreateLinearSolver() argument
762 CHECK_NOTNULL(options); in CreateLinearSolver()
763 CHECK_NOTNULL(options->linear_solver_ordering.get()); in CreateLinearSolver()
766 if (options->trust_region_strategy_type == DOGLEG) { in CreateLinearSolver()
767 if (options->linear_solver_type == ITERATIVE_SCHUR || in CreateLinearSolver()
768 options->linear_solver_type == CGNR) { in CreateLinearSolver()
777 if (options->linear_solver_type == DENSE_NORMAL_CHOLESKY && in CreateLinearSolver()
778 options->dense_linear_algebra_library_type == LAPACK) { in CreateLinearSolver()
784 if (options->linear_solver_type == DENSE_QR && in CreateLinearSolver()
785 options->dense_linear_algebra_library_type == LAPACK) { in CreateLinearSolver()
791 if (options->linear_solver_type == DENSE_SCHUR && in CreateLinearSolver()
792 options->dense_linear_algebra_library_type == LAPACK) { in CreateLinearSolver()
800 if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY && in CreateLinearSolver()
801 options->sparse_linear_algebra_library_type == SUITE_SPARSE) { in CreateLinearSolver()
807 if (options->preconditioner_type == CLUSTER_JACOBI) { in CreateLinearSolver()
813 if (options->preconditioner_type == CLUSTER_TRIDIAGONAL) { in CreateLinearSolver()
821 if (options->linear_solver_type == SPARSE_NORMAL_CHOLESKY && in CreateLinearSolver()
822 options->sparse_linear_algebra_library_type == CX_SPARSE) { in CreateLinearSolver()
829 if (options->max_linear_solver_iterations <= 0) { in CreateLinearSolver()
833 if (options->min_linear_solver_iterations <= 0) { in CreateLinearSolver()
837 if (options->min_linear_solver_iterations > in CreateLinearSolver()
838 options->max_linear_solver_iterations) { in CreateLinearSolver()
846 options->min_linear_solver_iterations; in CreateLinearSolver()
848 options->max_linear_solver_iterations; in CreateLinearSolver()
849 linear_solver_options.type = options->linear_solver_type; in CreateLinearSolver()
850 linear_solver_options.preconditioner_type = options->preconditioner_type; in CreateLinearSolver()
852 options->visibility_clustering_type; in CreateLinearSolver()
854 options->sparse_linear_algebra_library_type; in CreateLinearSolver()
856 options->dense_linear_algebra_library_type; in CreateLinearSolver()
857 linear_solver_options.use_postordering = options->use_postordering; in CreateLinearSolver()
858 linear_solver_options.dynamic_sparsity = options->dynamic_sparsity; in CreateLinearSolver()
866 options->sparse_linear_algebra_library_type == SUITE_SPARSE) { in CreateLinearSolver()
871 linear_solver_options.num_threads = options->num_linear_solver_threads; in CreateLinearSolver()
872 options->num_linear_solver_threads = linear_solver_options.num_threads; in CreateLinearSolver()
874 OrderingToGroupSizes(options->linear_solver_ordering.get(), in CreateLinearSolver()
889 const Solver::Options& options, in CreateEvaluator() argument
894 evaluator_options.linear_solver_type = options.linear_solver_type; in CreateEvaluator()
896 (options.linear_solver_ordering->NumGroups() > 0 && in CreateEvaluator()
897 IsSchurType(options.linear_solver_type)) in CreateEvaluator()
898 ? (options.linear_solver_ordering in CreateEvaluator()
902 evaluator_options.num_threads = options.num_threads; in CreateEvaluator()
903 evaluator_options.dynamic_sparsity = options.dynamic_sparsity; in CreateEvaluator()
908 const Solver::Options& options, in CreateInnerIterationMinimizer() argument
919 if (options.inner_iteration_ordering.get() == NULL) { in CreateInnerIterationMinimizer()
924 ordering_ptr = options.inner_iteration_ordering.get(); in CreateInnerIterationMinimizer()