mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Default to any other sparse libraries over Accelerate
- Accelerate currently does not support dynamic sparsity, whereas the other sparse linear algebra libraries do (outstanding issue to update) - Previously we preferred Accelerate to all but SuiteSparse if it was available, which breaks the dynamic_sparsity_test if SuiteSparse is *not* available (even if others are) as Accelerate does not support dynamic sparsity. Change-Id: Ibc2dd2f14f83cffbecca38097d02bb2188aaaa05
This commit is contained in:
@@ -222,10 +222,16 @@ bool TrustRegionOptionsAreValid(const Solver::Options& options, string* error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (options.dynamic_sparsity &&
|
||||
options.linear_solver_type != SPARSE_NORMAL_CHOLESKY) {
|
||||
*error = "Dynamic sparsity is only supported with SPARSE_NORMAL_CHOLESKY.";
|
||||
return false;
|
||||
if (options.dynamic_sparsity) {
|
||||
if (options.linear_solver_type != SPARSE_NORMAL_CHOLESKY) {
|
||||
*error = "Dynamic sparsity is only supported with SPARSE_NORMAL_CHOLESKY.";
|
||||
return false;
|
||||
}
|
||||
if (options.sparse_linear_algebra_library_type == ACCELERATE_SPARSE) {
|
||||
*error = "ACCELERATE_SPARSE is not currently supported with dynamic "
|
||||
"sparsity.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user