Fix the generated cmake-config file to look for the used Abseil-cpp
config files providing the needed targets.
When using Abseil from system (or locally installed and set via
`absl_DIR`) the used targets like `absl::log` need to be made available
in downstream projects using `ceres-solver`.
For system packages with no `absl_VERSION` info check for the required
target `absl::absl_vlog_is_on`, just like we do in `CMakeLists.txt`.
Error on installation/export of "no-absl-VERSION" as we can't check
version mismatches.
When using `abseil-cpp` as submodule the abseil-configs are added to the
install target as well. Use these config files to make the needed Abseil
targets available.
In the submodule case extract the `absl_VERSION` variable from its
`CMakeLists.txt` file for us to check against in the generated
cmake-config-file.
Fixes: https://github.com/ceres-solver/ceres-solver/issues/1089
Change-Id: I3e3d079ddf931e7fe1b57783471c32c19e4d31b6
Using preprocessor directives in a macro expansion is a (non-standard)
language extension that is not supported by MSVC.
Change-Id: I6e158b108a9c13cd277afb96cab2017ac192e3a2
Previously the find_package call was followed by a manual version
check because we were using a Major.Minor version. Just checking
for Major version works.
Change-Id: If83f8d1c6001d0ac3d53d9b24946b9168eb4932b
Previously these classes in analogy with ceres::Problem's interface
had interfaces to allow bare pointers as well as unique_ptrs. This
CL changes the API to always use unique_ptr, this is less error prone
and makes the default ownership semantics clearer.
Change-Id: I7577a90761f341c7e009c248c820f0fec2e6f32d
Add special handling when `absl_VERSION` is empty. This is
the case when the `master` branch of `abseil-cpp` was installed using
`CMake`. In that case check for VLOG availability through the CMake
target `absl::absl_vlog_is_on`.
Fixes: https://github.com/ceres-solver/ceres-solver/issues/1098
Change-Id: I3367aeb65caceb11558d8d6265dafe3ecc9a4875
1. The required version of Abseil is now 20240116.0 instead of 20240116.2.
This was an oversight. Thanks to @NeroBurner for pointing this out.
Both CMake and Bazel builds are updated.
2. Unbreak the Bazel build which had become stale.
Change-Id: I274bbad2f94f7710387f9693de9c66b035758970
Starting with SuiteSparse version 7.4.0 CHOLMOD has support for single
precision matrices. This allows us to have single precision and mixed
precision solves when using the SUITE_SPARSE backend.
This CL also fixes sparse_cholesky_test which was completely broken for
single precision testing.
Sample performance on my Mac.
/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt
<SNIP>
Cost:
Initial 9.099334e+07
Final 4.161838e+06
Change 8.683150e+07
Minimizer iterations 6
Successful steps 4
Unsuccessful steps 2
Time (in seconds):
Preprocessor 2.528222
Residual only evaluation 0.142804 (5)
Jacobian & residual evaluation 0.424014 (4)
Linear solver 54.083396 (5)
Minimizer 54.895752
Postprocessor 0.024564
Total 57.448539
Termination: NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)
59.04 real 341.24 user 5.49 sys
5776375808 maximum resident set size
<SNIP>
616329634071 instructions retired
929475980510 cycles elapsed
5375034560 peak memory footprint
/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt -mixed_precision_solves
<SNIP>
Cost:
Initial 9.099334e+07
Final 4.148930e+06
Change 8.684441e+07
Minimizer iterations 6
Successful steps 4
Unsuccessful steps 2
Time (in seconds):
Preprocessor 2.580217
Residual only evaluation 0.144098 (5)
Jacobian & residual evaluation 0.396723 (4)
Linear solver 23.636074 (5)
Minimizer 24.427163
Postprocessor 0.023790
Total 27.031170
Termination: NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)
28.58 real 128.53 user 2.37 sys
4818386944 maximum resident set size
<SNIP>
395186936091 instructions retired
368802808856 cycles elapsed
4327029824 peak memory footprint
Change-Id: I1f137b0dd12da8da7f9ced338dd8f20f4bbdf99d
The dependencies and the API have changed enough that
it is worth incrementing the version number.
Change-Id: I4e2911a91988d97f47320c56072ad1546e20030b
If the user has checked out the submodules in third_party, they will be
used, otherwise we will try and find the system installed versions of
these dependencies and use them if they are modern enough.
Change-Id: I52164bc48a6ea804b85cdda05fee9cb94632f6c0
Generator expressions were introduced in CMake version 3.24. Without
them including absl::log_flags as an internal dependency causes
linking problems on some platforms. So for platforms with an older
CMake version we make absl::log_flags a public dependency.
Change-Id: I686f41e76b0ac17a03f1cd1d614372a7f130dfd9
Previously this header was included in absl/log/log.h
but going forward this header will not be included.
Change-Id: Ie663b221d90e32a852fb00dfe20f731dcd1dcf6b
Replace WallTimeInSeconds with absl::Now and use
absl::Time and absl::Duration objects instead of doubles.
wall_time.h/cc -> event_logger.h/cc
Change-Id: I41279961368840fbdf6bb3456ffdbdf2f9bfb85b
Replace ceres::String* with their more modern and performant
absl strings library equivalent and delete our string
manipulation library.
Change-Id: Iecbdba9864e0abf329778f81fdc0708f78f7594f
Ceres Solver was using an old forked version of FixedArray,
now that we are using absl, we can use the official version
that ships with it.
Change-Id: Ic88d7f6e8a49b928d611f7cbb04172452b322b01
1. Add abseil-cpp as a submodule. We are tracking the latest LTS
release, which is lts_2024_01_16.
2. Replace glog/gflags with absl::log and absl::flags.
3. Remove miniglog
4. Also take a whack at making the bazel build work with
abseil-cpp and gtest.
There are a number of TODOs in this CL that still need to be resolved.
Change-Id: I39355ed7d61375be4ebcbc8596d9cc70acc1c678
cuDSS could be used as an alternative for SuiteSparse and EigenSparse
in case if CUDA capable GPU is available.
Change-Id: I7a567093ce91363478118153e181134ed5804573