For proper alignment on the heap Eigen needs to have a custom
allocator. There are two forms, new and in-place new. To make sure
that memory is aligned using new, one needs to overload new by
adding EIGEN_MAKE_ALIGNED_OPERATOR_NEW to any struct which contains a
fixed size Eigen type either through inheritance or as a direct or
indirect member. For the in-place new one need to use the
Eigen::aligned_allocator (e.g. for std::vector, std::list,
FixedArray, etc.). For more details see:
https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html
This CL adds EIGEN_MAKE_ALIGNED_OPERATOR_NEW to all structs, which
contain fixed-size Eigen types and uses the Eigen::aligned_allocator
for containers which stores structs of fixed-size Eigen types.
Change-Id: I06c6c4fc74a6835918d5d1c571b7814a14c029d8
This PR changes the interface of sized_cost_fucntion,
autodiff_cost_function and numeric_diff_costfunction from using ten
hardcoded parameter blocks to a variable number of parameter blocks
using variadic templates.
Trailing parameter blocks of size zero are now considered as error.
Change-Id: I37b9a0a420ef0eda6476a46672bbf6bd57e19760
Enable use of dynamic number of residuals for autodiff.
Implemented with "Substitution failure is not an error" similar
to tiny_solver.h .
Move test from tiny_solver_test.cc to
tiny_solver_autodiff_function_test.cc .
Use cpplint.py from C++ Google Style Guide for formatting.
Change-Id: I2e1a159d17118552943c6ac7a833c5bbd0c927ec