Commit Graph

8 Commits

Author SHA1 Message Date
Sameer Agarwal fbc2eea166 Nested dissection for ACCELERATE_SPARSE & EIGEN_SPARSE
Change-Id: Iec8ea6b0a537559b48b59bcfc91b94b58cb2070e
2022-05-27 06:50:12 -07:00
Sameer Agarwal 84e1696f4e Add final specifier to internal classes.
This should help the compiler devirtualize a bunch of function
calls.

https://github.com/ceres-solver/ceres-solver/issues/747

Change-Id: I9913e68d85e0e9c9f955a249cc710a657875c869
2022-02-18 18:07:06 +00: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
Nikolaus Demmel 7b8f675bfd fix formatting for (non-generated) internal source files
- Change formatting standard to Cpp11. Main difference is not having
  the space between two closing >> for nested templates. We don't
  choose c++14, because older versions of clang-format (version 9
  and earlier) don't know this value yet, and it doesn't make a
  difference in the formatting.
- Apply clang-format to all (non generated) internal source files.
- Manually fix some code sections (clang-format on/off) and c-strings
- Exclude some embedded external files with very different formatting
  (gtest/gmock)
- Add script to format all source files

Change-Id: Ic6cea41575ad6e37c9e136dbce176b0d505dc44d
2020-09-21 02:52:07 +02:00
Sameer Agarwal 2ffddaccfe Use override & final instead of just using virtual.
This is safer than using virtual and this lead to a minor
bug fixes.

Change-Id: Id69cb1cc569bf6bf245f22f029c7871b6c712568
2019-07-25 16:29:14 -07:00
Alex Stewart 82d325b731 Avoid memory allocations in Accelerate Sparse[Refactor/Solve]().
- Maintain scratch workspaces for solving/refactoring instead of
  forcing Sparse[Refactor/Solve]() to reallocate space on each call.

Change-Id: Idb9eda9c9c6cc7570cfdf851e59e5bf6b39521ce
2019-07-16 11:10:36 +00:00
Alex Stewart e86f5a4d46 Recycle numeric factorisation when using Accelerate Sparse.
Change-Id: Id94d77f9437e31c37ae99f48d28800fc9ce841ec
2018-07-05 09:17:16 +01:00
Alex Stewart 8f41ca6abc Add Apple's Accelerate framework as a sparse linear algebra library.
- Currently DynamicSparseNormalCholeskySolver is unsupported for
  Accelerate.

Change-Id: I03b5a86bb22fef249c4aecd48947a613e8eff7a5
2018-06-29 09:43:03 +01:00