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
Now that we are using c++11, it is safer to use override in subclasses
instead of virtual.
This CL does it for the interface, a follow up CL will do it for
other parts of the code base.
Change-Id: Ice8d0f4355cb700019d7a9c1566fbff0099e97d6
This PR changes the implementation of the current fixed array to the
abseil one, which has proper allocator support.
Some minor changes are made to make the fixed array implementation
self-contained (no dependent to abseil):
- No address sanitizer support (red zones, etc.)
- Remove of noexecpt specified for copy and move constructor.
- Remove of 'at' function as Ceres does not use exceptions.
- Use std::tuple instead of absl::CompressedTuple as it uses the abseil
utility header which includes a whole bunch of other headers.
Change-Id: I43445b42c37f944509b5353a587d0efce74cbccf
This header defined integral types in the pre-C++11 days, and can
be replaced with <cstdint> and the types defined therein.
Also remove a shallow (and incorrect) typedef in include/ceres/types.h
https://github.com/ceres-solver/ceres-solver/issues/409
Change-Id: I398c652f74d24bbeea459672508bf28f591b100f
In the process also move some documentation from the file header to
just above the class declaration.
This change is in response to https://github.com/ceres-solver/ceres-solver/issues/233
Change-Id: I08cff1a94c57b67dd2bd8be4dba8c3fce46b68ab
This adds a new wrapper class called DynamicCostFunctionToFunctor
that closes a gap in the current API: the existing
CostFunctionToFunctor can only be used with a SizedCostFunction, where
the number and sizes of all parameter vectors are known at compile-time.
The DynamicCostFunctionToFunctor allows you to wrap a generic
CostFunction into a templated functor which can then be used in a
DynamicAutoDiffCostFunction.
Also updates the existing CostFunctionToFunctor class to internally use
DynamicCostFunctionToFunctor.
Change-Id: I088adc3271c58d2519126c27037c3576965a36d6