Add more missing headers

Change-Id: I35875ca856b7b80c622562a1c14b4c8ced10f740
diff --git a/internal/ceres/block_jacobi_preconditioner.cc b/internal/ceres/block_jacobi_preconditioner.cc
index 8f8893f..c608ba2 100644
--- a/internal/ceres/block_jacobi_preconditioner.cc
+++ b/internal/ceres/block_jacobi_preconditioner.cc
@@ -36,6 +36,7 @@
 #include <vector>
 
 #include "Eigen/Dense"
+#include "absl/log/check.h"
 #include "ceres/block_random_access_diagonal_matrix.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/block_structure.h"
diff --git a/internal/ceres/compressed_row_jacobian_writer.cc b/internal/ceres/compressed_row_jacobian_writer.cc
index 007346d..95076b7 100644
--- a/internal/ceres/compressed_row_jacobian_writer.cc
+++ b/internal/ceres/compressed_row_jacobian_writer.cc
@@ -37,6 +37,8 @@
 #include <utility>
 #include <vector>
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/casts.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/parameter_block.h"
diff --git a/internal/ceres/coordinate_descent_minimizer.cc b/internal/ceres/coordinate_descent_minimizer.cc
index 53986ee..37cd04c 100644
--- a/internal/ceres/coordinate_descent_minimizer.cc
+++ b/internal/ceres/coordinate_descent_minimizer.cc
@@ -39,6 +39,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "ceres/evaluator.h"
 #include "ceres/linear_solver.h"
 #include "ceres/minimizer.h"
diff --git a/internal/ceres/cuda_block_structure.cc b/internal/ceres/cuda_block_structure.cc
index 3685775..2a42d90 100644
--- a/internal/ceres/cuda_block_structure.cc
+++ b/internal/ceres/cuda_block_structure.cc
@@ -32,6 +32,9 @@
 
 #ifndef CERES_NO_CUDA
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
+
 namespace ceres::internal {
 namespace {
 // Dimension of a sorted array of blocks
diff --git a/internal/ceres/cuda_kernels_bsm_to_crs.cu.cc b/internal/ceres/cuda_kernels_bsm_to_crs.cu.cc
index ee574f0..03abe3b 100644
--- a/internal/ceres/cuda_kernels_bsm_to_crs.cu.cc
+++ b/internal/ceres/cuda_kernels_bsm_to_crs.cu.cc
@@ -34,6 +34,7 @@
 #include <thrust/execution_policy.h>
 #include <thrust/scan.h>
 
+#include "absl/log/log.h"
 #include "ceres/block_structure.h"
 #include "ceres/cuda_kernels_utils.h"
 
diff --git a/internal/ceres/cuda_partitioned_block_sparse_crs_view.cc b/internal/ceres/cuda_partitioned_block_sparse_crs_view.cc
index c0c1dc8..4d75031 100644
--- a/internal/ceres/cuda_partitioned_block_sparse_crs_view.cc
+++ b/internal/ceres/cuda_partitioned_block_sparse_crs_view.cc
@@ -32,6 +32,7 @@
 
 #ifndef CERES_NO_CUDA
 
+#include "absl/log/check.h"
 #include "ceres/cuda_block_structure.h"
 #include "ceres/cuda_kernels_bsm_to_crs.h"
 
diff --git a/internal/ceres/cuda_sparse_cholesky.cc b/internal/ceres/cuda_sparse_cholesky.cc
index d4a285b..d829242 100644
--- a/internal/ceres/cuda_sparse_cholesky.cc
+++ b/internal/ceres/cuda_sparse_cholesky.cc
@@ -39,6 +39,8 @@
 #include <type_traits>
 
 #include "Eigen/Core"
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/cuda_buffer.h"
 #include "ceres/linear_solver.h"
diff --git a/internal/ceres/cuda_sparse_matrix.cc b/internal/ceres/cuda_sparse_matrix.cc
index 33685a4..b55495b 100644
--- a/internal/ceres/cuda_sparse_matrix.cc
+++ b/internal/ceres/cuda_sparse_matrix.cc
@@ -41,6 +41,7 @@
 
 #include <memory>
 
+#include "absl/log/check.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/context_impl.h"
diff --git a/internal/ceres/cuda_streamed_buffer.h b/internal/ceres/cuda_streamed_buffer.h
index 37bcf4a..e6296aa 100644
--- a/internal/ceres/cuda_streamed_buffer.h
+++ b/internal/ceres/cuda_streamed_buffer.h
@@ -37,6 +37,7 @@
 
 #include <algorithm>
 
+#include "absl/log/check.h"
 #include "ceres/cuda_buffer.h"
 
 namespace ceres::internal {
diff --git a/internal/ceres/cuda_vector.cc b/internal/ceres/cuda_vector.cc
index 08217b2..e7d9907 100644
--- a/internal/ceres/cuda_vector.cc
+++ b/internal/ceres/cuda_vector.cc
@@ -37,6 +37,7 @@
 
 #include <math.h>
 
+#include "absl/log/check.h"
 #include "ceres/context_impl.h"
 #include "ceres/internal/export.h"
 #include "ceres/types.h"
diff --git a/internal/ceres/dense_cholesky.cc b/internal/ceres/dense_cholesky.cc
index 7ecff03..a5edec8 100644
--- a/internal/ceres/dense_cholesky.cc
+++ b/internal/ceres/dense_cholesky.cc
@@ -36,6 +36,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/internal/config.h"
 #include "ceres/iterative_refiner.h"
diff --git a/internal/ceres/eigensparse.cc b/internal/ceres/eigensparse.cc
index 67b6ec5..b037037 100644
--- a/internal/ceres/eigensparse.cc
+++ b/internal/ceres/eigensparse.cc
@@ -44,6 +44,7 @@
 
 #include "Eigen/SparseCholesky"
 #include "Eigen/SparseCore"
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/linear_solver.h"
diff --git a/internal/ceres/evaluation_benchmark.cc b/internal/ceres/evaluation_benchmark.cc
index c679885..13cddb3 100644
--- a/internal/ceres/evaluation_benchmark.cc
+++ b/internal/ceres/evaluation_benchmark.cc
@@ -33,6 +33,8 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "benchmark/benchmark.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/bundle_adjustment_test_util.h"
diff --git a/internal/ceres/gradient_checker.cc b/internal/ceres/gradient_checker.cc
index 131e4c2..16eef1b 100644
--- a/internal/ceres/gradient_checker.cc
+++ b/internal/ceres/gradient_checker.cc
@@ -39,6 +39,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/is_close.h"
 #include "ceres/stringprintf.h"
diff --git a/internal/ceres/gradient_checker_test.cc b/internal/ceres/gradient_checker_test.cc
index 509ea18..5d2ea14 100644
--- a/internal/ceres/gradient_checker_test.cc
+++ b/internal/ceres/gradient_checker_test.cc
@@ -37,6 +37,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/cost_function.h"
 #include "ceres/problem.h"
diff --git a/internal/ceres/gradient_problem_evaluator.h b/internal/ceres/gradient_problem_evaluator.h
index fe99767..8b03015 100644
--- a/internal/ceres/gradient_problem_evaluator.h
+++ b/internal/ceres/gradient_problem_evaluator.h
@@ -35,6 +35,7 @@
 #include <memory>
 #include <string>
 
+#include "absl/log/check.h"
 #include "ceres/evaluator.h"
 #include "ceres/execution_summary.h"
 #include "ceres/gradient_problem.h"
diff --git a/internal/ceres/gradient_problem_solver.cc b/internal/ceres/gradient_problem_solver.cc
index d78a719..9275547 100644
--- a/internal/ceres/gradient_problem_solver.cc
+++ b/internal/ceres/gradient_problem_solver.cc
@@ -34,6 +34,7 @@
 #include <memory>
 #include <string>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/callbacks.h"
 #include "ceres/gradient_problem.h"
diff --git a/internal/ceres/implicit_schur_complement.h b/internal/ceres/implicit_schur_complement.h
index b4eb0b0..2f18635 100644
--- a/internal/ceres/implicit_schur_complement.h
+++ b/internal/ceres/implicit_schur_complement.h
@@ -36,6 +36,7 @@
 
 #include <memory>
 
+#include "absl/log/check.h"
 #include "ceres/internal/disable_warnings.h"
 #include "ceres/internal/eigen.h"
 #include "ceres/internal/export.h"
diff --git a/internal/ceres/inner_product_computer.cc b/internal/ceres/inner_product_computer.cc
index 59b5d94..56a5a1e 100644
--- a/internal/ceres/inner_product_computer.cc
+++ b/internal/ceres/inner_product_computer.cc
@@ -33,6 +33,7 @@
 #include <algorithm>
 #include <memory>
 
+#include "absl/log/check.h"
 #include "ceres/small_blas.h"
 
 namespace ceres::internal {
diff --git a/internal/ceres/levenberg_marquardt_strategy_test.cc b/internal/ceres/levenberg_marquardt_strategy_test.cc
index 78bbd8c..8ef2964 100644
--- a/internal/ceres/levenberg_marquardt_strategy_test.cc
+++ b/internal/ceres/levenberg_marquardt_strategy_test.cc
@@ -33,6 +33,7 @@
 #include <memory>
 
 #include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/internal/eigen.h"
 #include "ceres/linear_solver.h"
 #include "ceres/trust_region_strategy.h"
diff --git a/internal/ceres/line_search_preprocessor.cc b/internal/ceres/line_search_preprocessor.cc
index 3109c48..1107f24 100644
--- a/internal/ceres/line_search_preprocessor.cc
+++ b/internal/ceres/line_search_preprocessor.cc
@@ -33,6 +33,7 @@
 #include <numeric>
 #include <string>
 
+#include "absl/log/check.h"
 #include "ceres/casts.h"
 #include "ceres/context_impl.h"
 #include "ceres/evaluator.h"
diff --git a/internal/ceres/parallel_invoke.h b/internal/ceres/parallel_invoke.h
index 398f8f2..f076631 100644
--- a/internal/ceres/parallel_invoke.h
+++ b/internal/ceres/parallel_invoke.h
@@ -39,6 +39,8 @@
 #include <tuple>
 #include <type_traits>
 
+#include "absl/log/check.h"
+
 namespace ceres::internal {
 
 // InvokeWithThreadId handles passing thread_id to the function
diff --git a/internal/ceres/parallel_vector_operations_benchmark.cc b/internal/ceres/parallel_vector_operations_benchmark.cc
index 2f6e28f..b658ea5 100644
--- a/internal/ceres/parallel_vector_operations_benchmark.cc
+++ b/internal/ceres/parallel_vector_operations_benchmark.cc
@@ -28,6 +28,7 @@
 
 #include <algorithm>
 
+#include "absl/log/check.h"
 #include "benchmark/benchmark.h"
 #include "ceres/eigen_vector_ops.h"
 #include "ceres/parallel_for.h"
diff --git a/internal/ceres/parallel_vector_ops.h b/internal/ceres/parallel_vector_ops.h
index 812950a..43071fc 100644
--- a/internal/ceres/parallel_vector_ops.h
+++ b/internal/ceres/parallel_vector_ops.h
@@ -35,6 +35,7 @@
 #include <mutex>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "ceres/context_impl.h"
 #include "ceres/internal/eigen.h"
 #include "ceres/internal/export.h"
diff --git a/internal/ceres/parameter_block_test.cc b/internal/ceres/parameter_block_test.cc
index 0bb9b40..bbe7a6b 100644
--- a/internal/ceres/parameter_block_test.cc
+++ b/internal/ceres/parameter_block_test.cc
@@ -30,6 +30,7 @@
 
 #include "ceres/parameter_block.h"
 
+#include "absl/log/log.h"
 #include "ceres/internal/eigen.h"
 #include "gtest/gtest.h"
 
diff --git a/internal/ceres/partitioned_matrix_view_template.py b/internal/ceres/partitioned_matrix_view_template.py
index 9af4c0e..e3e8885 100644
--- a/internal/ceres/partitioned_matrix_view_template.py
+++ b/internal/ceres/partitioned_matrix_view_template.py
@@ -120,6 +120,7 @@
 FACTORY_FILE_HEADER = """
 #include <memory>
 
+#include "absl/log/log.h"
 #include "ceres/linear_solver.h"
 #include "ceres/partitioned_matrix_view.h"
 
diff --git a/internal/ceres/problem_impl.h b/internal/ceres/problem_impl.h
index 733f26e..73a4a05 100644
--- a/internal/ceres/problem_impl.h
+++ b/internal/ceres/problem_impl.h
@@ -46,6 +46,7 @@
 #include <unordered_set>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "ceres/context_impl.h"
 #include "ceres/internal/disable_warnings.h"
 #include "ceres/internal/export.h"
diff --git a/internal/ceres/program.cc b/internal/ceres/program.cc
index a5a243d..26c5cfb 100644
--- a/internal/ceres/program.cc
+++ b/internal/ceres/program.cc
@@ -36,6 +36,8 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/array_utils.h"
 #include "ceres/casts.h"
 #include "ceres/compressed_row_sparse_matrix.h"
diff --git a/internal/ceres/program_evaluator.h b/internal/ceres/program_evaluator.h
index 5d549a7..366d1bf 100644
--- a/internal/ceres/program_evaluator.h
+++ b/internal/ceres/program_evaluator.h
@@ -92,6 +92,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/log.h"
 #include "ceres/evaluation_callback.h"
 #include "ceres/execution_summary.h"
 #include "ceres/internal/eigen.h"
diff --git a/internal/ceres/residual_block.cc b/internal/ceres/residual_block.cc
index f5ad125..da6b88e 100644
--- a/internal/ceres/residual_block.cc
+++ b/internal/ceres/residual_block.cc
@@ -35,6 +35,8 @@
 #include <cstddef>
 #include <vector>
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/corrector.h"
 #include "ceres/cost_function.h"
 #include "ceres/internal/eigen.h"
diff --git a/internal/ceres/schur_complement_solver.cc b/internal/ceres/schur_complement_solver.cc
index e113040..c62633c 100644
--- a/internal/ceres/schur_complement_solver.cc
+++ b/internal/ceres/schur_complement_solver.cc
@@ -39,6 +39,7 @@
 
 #include "Eigen/Dense"
 #include "Eigen/SparseCore"
+#include "absl/log/check.h"
 #include "ceres/block_random_access_dense_matrix.h"
 #include "ceres/block_random_access_matrix.h"
 #include "ceres/block_random_access_sparse_matrix.h"
diff --git a/internal/ceres/schur_eliminator.h b/internal/ceres/schur_eliminator.h
index 3832fe6..06eb47b 100644
--- a/internal/ceres/schur_eliminator.h
+++ b/internal/ceres/schur_eliminator.h
@@ -37,6 +37,7 @@
 #include <vector>
 
 #include "Eigen/Dense"
+#include "absl/log/check.h"
 #include "ceres/block_random_access_matrix.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/block_structure.h"
diff --git a/internal/ceres/schur_eliminator_template.py b/internal/ceres/schur_eliminator_template.py
index 99e6f3e..e3d1987 100644
--- a/internal/ceres/schur_eliminator_template.py
+++ b/internal/ceres/schur_eliminator_template.py
@@ -122,6 +122,7 @@
 FACTORY_FILE_HEADER = """
 #include <memory>
 
+#include "absl/log/log.h"
 #include "ceres/linear_solver.h"
 #include "ceres/schur_eliminator.h"
 
diff --git a/internal/ceres/single_linkage_clustering.cc b/internal/ceres/single_linkage_clustering.cc
index 06e76df..8ebbbb9 100644
--- a/internal/ceres/single_linkage_clustering.cc
+++ b/internal/ceres/single_linkage_clustering.cc
@@ -33,6 +33,7 @@
 #include <unordered_map>
 #include <unordered_set>
 
+#include "absl/log/check.h"
 #include "ceres/graph.h"
 #include "ceres/graph_algorithms.h"
 
diff --git a/internal/ceres/solver.cc b/internal/ceres/solver.cc
index a8de046..9089aef 100644
--- a/internal/ceres/solver.cc
+++ b/internal/ceres/solver.cc
@@ -38,6 +38,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/casts.h"
 #include "ceres/context.h"
diff --git a/internal/ceres/sparse_cholesky.cc b/internal/ceres/sparse_cholesky.cc
index f20aa99..f1b2c88 100644
--- a/internal/ceres/sparse_cholesky.cc
+++ b/internal/ceres/sparse_cholesky.cc
@@ -33,6 +33,7 @@
 #include <memory>
 #include <utility>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/accelerate_sparse.h"
 #include "ceres/cuda_sparse_cholesky.h"
diff --git a/internal/ceres/sparse_cholesky_test.cc b/internal/ceres/sparse_cholesky_test.cc
index 10efd28..586febe 100644
--- a/internal/ceres/sparse_cholesky_test.cc
+++ b/internal/ceres/sparse_cholesky_test.cc
@@ -37,6 +37,7 @@
 
 #include "Eigen/Dense"
 #include "Eigen/SparseCore"
+#include "absl/log/check.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/cuda_sparse_cholesky.h"
diff --git a/internal/ceres/sparse_normal_cholesky_solver_test.cc b/internal/ceres/sparse_normal_cholesky_solver_test.cc
index 987272e..f3d6c09 100644
--- a/internal/ceres/sparse_normal_cholesky_solver_test.cc
+++ b/internal/ceres/sparse_normal_cholesky_solver_test.cc
@@ -31,6 +31,7 @@
 #include <memory>
 
 #include "Eigen/Cholesky"
+#include "absl/log/check.h"
 #include "ceres/block_sparse_matrix.h"
 #include "ceres/casts.h"
 #include "ceres/context_impl.h"
diff --git a/internal/ceres/spmv_benchmark.cc b/internal/ceres/spmv_benchmark.cc
index 6a4efa7..092df5a 100644
--- a/internal/ceres/spmv_benchmark.cc
+++ b/internal/ceres/spmv_benchmark.cc
@@ -33,6 +33,7 @@
 #include <string>
 
 #include "Eigen/Dense"
+#include "absl/log/check.h"
 #include "benchmark/benchmark.h"
 #include "ceres/block_jacobi_preconditioner.h"
 #include "ceres/block_sparse_matrix.h"
diff --git a/internal/ceres/subset_preconditioner.cc b/internal/ceres/subset_preconditioner.cc
index 52b79f7..2e5e49e 100644
--- a/internal/ceres/subset_preconditioner.cc
+++ b/internal/ceres/subset_preconditioner.cc
@@ -34,6 +34,7 @@
 #include <string>
 #include <utility>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/compressed_row_sparse_matrix.h"
 #include "ceres/inner_product_computer.h"
diff --git a/internal/ceres/suitesparse.cc b/internal/ceres/suitesparse.cc
index 3595b29..6f4a8c9 100644
--- a/internal/ceres/suitesparse.cc
+++ b/internal/ceres/suitesparse.cc
@@ -37,6 +37,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
 #include "absl/log/log.h"
 #include "ceres/compressed_col_sparse_matrix_utils.h"
 #include "ceres/compressed_row_sparse_matrix.h"
diff --git a/internal/ceres/test_util.h b/internal/ceres/test_util.h
index 95aaa55..32de4e3 100644
--- a/internal/ceres/test_util.h
+++ b/internal/ceres/test_util.h
@@ -33,6 +33,7 @@
 
 #include <string>
 
+#include "absl/log/check.h"
 #include "ceres/internal/disable_warnings.h"
 #include "ceres/internal/export.h"
 #include "ceres/problem.h"
diff --git a/internal/ceres/thread_token_provider.cc b/internal/ceres/thread_token_provider.cc
index 6217e2b..133767d 100644
--- a/internal/ceres/thread_token_provider.cc
+++ b/internal/ceres/thread_token_provider.cc
@@ -30,6 +30,8 @@
 
 #include "ceres/thread_token_provider.h"
 
+#include "absl/log/check.h"
+
 namespace ceres::internal {
 
 ThreadTokenProvider::ThreadTokenProvider(int num_threads) {
diff --git a/internal/ceres/trust_region_preprocessor.cc b/internal/ceres/trust_region_preprocessor.cc
index e07e369..9f45664 100644
--- a/internal/ceres/trust_region_preprocessor.cc
+++ b/internal/ceres/trust_region_preprocessor.cc
@@ -34,6 +34,8 @@
 #include <string>
 #include <vector>
 
+#include "absl/log/check.h"
+#include "absl/log/log.h"
 #include "ceres/callbacks.h"
 #include "ceres/context_impl.h"
 #include "ceres/evaluator.h"