mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Refactor PartitionedMatrixView to cache the partitions
The constructor now takes a LinearSolver::Options as input and uses that to compute the partitioning once and uses it for its lifetime. Change-Id: I9ef30df0b60f8fa91c8b5601c397b2d9314a2cc7
This commit is contained in:
@@ -132,7 +132,7 @@ std::unique_ptr<PartitionedMatrixViewBase> PartitionedMatrixViewBase::Create(
|
||||
#ifndef CERES_RESTRICT_SCHUR_SPECIALIZATION
|
||||
"""
|
||||
FACTORY = """ return std::make_unique<PartitionedMatrixView<%s,%s, %s>>(
|
||||
matrix, options.elimination_groups[0]);"""
|
||||
options, matrix);"""
|
||||
|
||||
FACTORY_FOOTER = """
|
||||
#endif
|
||||
@@ -142,7 +142,7 @@ FACTORY_FOOTER = """
|
||||
return std::make_unique<PartitionedMatrixView<Eigen::Dynamic,
|
||||
Eigen::Dynamic,
|
||||
Eigen::Dynamic>>(
|
||||
matrix, options.elimination_groups[0]);
|
||||
options, matrix);
|
||||
};
|
||||
|
||||
} // namespace ceres::internal
|
||||
|
||||
Reference in New Issue
Block a user