Nested dissection for ACCELERATE_SPARSE & EIGEN_SPARSE

Change-Id: Iec8ea6b0a537559b48b59bcfc91b94b58cb2070e
This commit is contained in:
Sameer Agarwal
2022-05-22 10:58:35 -07:00
parent d87fd551bc
commit fbc2eea166
10 changed files with 192 additions and 64 deletions
+6 -2
View File
@@ -40,6 +40,7 @@
#include "ceres/context.h"
#include "ceres/context_impl.h"
#include "ceres/detect_structure.h"
#include "ceres/eigensparse.h"
#include "ceres/gradient_checking_cost_function.h"
#include "ceres/internal/export.h"
#include "ceres/parameter_block_ordering.h"
@@ -109,8 +110,11 @@ bool CommonOptionsAreValid(const Solver::Options& options, string* error) {
}
bool IsNestedDissectionAvailable(SparseLinearAlgebraLibraryType type) {
return (type == SUITE_SPARSE) &&
internal::SuiteSparse::IsNestedDissectionAvailable();
return (((type == SUITE_SPARSE) &&
internal::SuiteSparse::IsNestedDissectionAvailable()) ||
(type == ACCELERATE_SPARSE) ||
((type == EIGEN_SPARSE) &&
internal::EigenSparse::IsNestedDissectionAvailable()));
}
bool TrustRegionOptionsAreValid(const Solver::Options& options, string* error) {