Commit Graph

7 Commits

Author SHA1 Message Date
Sameer Agarwal caf614a6c1 Modernize code using c++17 constructs
Mostly done using

find . \( -name '*.cc' -o -name '*.h' \) -a -type f -exec clang-tidy -p \
cmake-build -checks='-*,google-*,modernize-*,-modernize-use-nodiscard,-modernize-use-trailing-return-type' {} -fix \;

Change-Id: Ifccbcabe7a1d9a32a09d28ac4f3f8466696c1a50
2022-04-22 06:11:18 -07:00
Sergiu Deitsch f90833f5fa Simplify symbol export
Currently, the logic for exporting symbols is rather complicated: when
tests are enabled internal symbols are exported in addition to the
public symbols. Such logic causes several problems. (1) Test binaries
link against a Ceres build that is different from the final release
since fewer optimizations are applied if more symbols are exported. (2)
Also, some toolchains hide symbols by default breaking the existing
logic eventually causing linker errors.

Since internal symbols are not intended to be used outside of the
project, we can compile them into object files and use exactly the same
binary code both for the final build and the tests without relying on
conditionals.

By default, all symbols are now hidden unless annotated as public.
Internal symbols are explicitly marked as not being exported in case
users chose not to hide symbols by default.

Change-Id: I589dd10be2f6f438508783cf99d141af0120057b
2022-02-14 20:19:08 +01:00
Sameer Agarwal 2b32b32124 Revert "Group specializations into groups of four"
This reverts commit 4ba244cdbc.

Reason for revert: This commit causes CI failures.

Change-Id: I954f2b8f093e39e3b52ca91b331591b73e646554
2021-02-17 18:38:43 +00:00
Tobias Schlüter 4ba244cdbc Group specializations into groups of four
Genrerate the specialization files by grouping the specializations into
five groups, cutting build time by three minutes (roughly 20%) in my
tests.

Change-Id: Ifd6a4523a47346c5e84c1cda15b7abba60d8e953
2021-02-12 19:56:53 +09:00
Sameer Agarwal 6d9e9843d8 Remove inclusion of ceres/eigen.h
The initial reason for this is because of a previous reformatting CL
triggered a macro redefinition warning in the schur eliminator. But
actually it was worse because the reordering had caused the macro
definition to be ignored and caused a performance regression.

This simplifies the generated files, fixes some formatting errors
and recovers the performance.

Change-Id: I9dbeffc38743b3f24b25843feec2e26a73188413
2020-09-28 19:20:24 +00:00
Nikolaus Demmel d3f66d77f4 fix formatting generated files (best effort)
- update file generator scripts / templates so generated files adhere
  to clang-format
- A few exceptions are not fixed, where the file generation results in
  lines of different width. To properly fix this would make the code
  more complicated and it's not that important for generated files
  anyway.
- note that generated files are excluded in ./scripts/format_all.sh

Change-Id: I4f42c83d1fec01242eada5e7ce6c1a5192234d37
2020-09-28 02:24:43 +02:00
Sameer Agarwal 5a56d522e8 Add the 3,3,3 template specialization.
Change-Id: I32bd528ee5b1c267d6dc7aa3ab58768851748e24
2019-03-07 15:42:28 +00:00