Skip to content

Commit

Permalink
Fix the ceres.bzl to add missing cc files.
Browse files Browse the repository at this point in the history
Thanks to nate-thirdwave@ for pointing this out and offering
a fix.

Also add a TODO about an odd loop in covariance_impl.cc which was
revealed as I was testing the bazel build

https: //github.com//issues/800
Change-Id: I87d17155ee43ea2a52b8031177d6b3ac5ae1460a
  • Loading branch information
sandwichmaker committed May 19, 2022
1 parent 39ec5e8 commit 30b4d5d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
15 changes: 12 additions & 3 deletions bazel/ceres.bzl
Expand Up @@ -32,8 +32,8 @@ CERES_SRCS = ["internal/ceres/" + filename for filename in [
"accelerate_sparse.cc",
"array_utils.cc",
"block_evaluate_preparer.cc",
"block_jacobian_writer.cc",
"block_jacobi_preconditioner.cc",
"block_jacobian_writer.cc",
"block_random_access_dense_matrix.cc",
"block_random_access_diagonal_matrix.cc",
"block_random_access_matrix.cc",
Expand All @@ -53,10 +53,13 @@ CERES_SRCS = ["internal/ceres/" + filename for filename in [
"context_impl.cc",
"coordinate_descent_minimizer.cc",
"corrector.cc",
"cost_function.cc",
"covariance.cc",
"covariance_impl.cc",
"cxsparse.cc",
"dense_cholesky.cc",
"dense_normal_cholesky_solver.cc",
"dense_qr.cc",
"dense_qr_solver.cc",
"dense_sparse_matrix.cc",
"detect_structure.cc",
Expand All @@ -65,25 +68,30 @@ CERES_SRCS = ["internal/ceres/" + filename for filename in [
"dynamic_compressed_row_sparse_matrix.cc",
"dynamic_sparse_normal_cholesky_solver.cc",
"eigensparse.cc",
"evaluation_callback.cc",
"evaluator.cc",
"file.cc",
"first_order_function.cc",
"float_cxsparse.cc",
"float_suitesparse.cc",
"function_sample.cc",
"gradient_checker.cc",
"gradient_checking_cost_function.cc",
"gradient_problem.cc",
"gradient_problem_solver.cc",
"is_close.cc",
"implicit_schur_complement.cc",
"inner_product_computer.cc",
"is_close.cc",
"iteration_callback.cc",
"iterative_refiner.cc",
"iterative_schur_complement_solver.cc",
"levenberg_marquardt_strategy.cc",
"line_search.cc",
"line_search_direction.cc",
"line_search_minimizer.cc",
"line_search_preprocessor.cc",
"linear_least_squares_problems.cc",
"linear_operator.cc",
"line_search_preprocessor.cc",
"linear_solver.cc",
"local_parameterization.cc",
"loss_function.cc",
Expand All @@ -92,6 +100,7 @@ CERES_SRCS = ["internal/ceres/" + filename for filename in [
"minimizer.cc",
"normal_prior.cc",
"parallel_for_cxx.cc",
"parallel_for_nothreads.cc",
"parallel_for_openmp.cc",
"parallel_utils.cc",
"parameter_block_ordering.cc",
Expand Down
3 changes: 3 additions & 0 deletions internal/ceres/covariance_impl.cc
Expand Up @@ -480,6 +480,9 @@ bool CovarianceImpl::ComputeCovarianceSparsity(
// Iterate over the covariance blocks contained in this row block
// and count the number of columns in this row block.
int num_col_blocks = 0;

// TODO(sameeragarwal): num_columns is being computed but not
// being used.
int num_columns = 0;
for (int j = i; j < covariance_blocks.size(); ++j, ++num_col_blocks) {
const std::pair<const double*, const double*>& block_pair =
Expand Down

0 comments on commit 30b4d5d

Please sign in to comment.