Commit Graph

9 Commits

Author SHA1 Message Date
Sergiu Deitsch c8658c8992 Modernize more
Apply clang-tidy Google and modernize fixes without trailing return type
using:

$ clang-tidy -p <build-dir> \
  -checks='-*,google-*,modernize-*,-modernize-use-trailing-return-type' {} -fix

Change-Id: I7450cc58ea9abf928f73a467e87876083217fa26
2022-02-26 22:16:56 +00:00
Sergiu Deitsch c6158e0ab5 Replace NULL by nullptr
Change-Id: I200a40678091b984a01635d8637a487b7ad5cc13
2022-02-14 19:22:21 +01:00
Sameer Agarwal 4362a21699 Run clang-format on the public headers.
Also update copyright year.

Change-Id: I8508d4fd4564c646ec2281a1b3b2c36136b54b46
2019-12-03 14:50:37 -08:00
Johannes Beck 939253c208 Fix Eigen alignment issues.
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
2019-04-15 22:09:24 +02:00
Johannes Beck 8eef94de4e Sized cost function using variadic templates
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
2018-10-23 20:46:16 +02:00
Johannes Graeter 956fd1aca7 Solver:Support autodiff for dyn. NUM_RESIDUALS
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
2018-09-25 18:47:50 +02:00
Sameer Agarwal e49507cbea More C++ification.
"> >" -> ">>"
"> > >" -> ">>>"

Change-Id: Id1ddd9dbf030fe21d57207741b4ca8403068e55b
2018-04-03 10:58:15 -07:00
Rodrigo Queiro 237eb17bdd Consistently use quotes to include Eigen
This makes these files match the convention in the rest of the codebase.

Change-Id: I3a0634274e0e604c575dd3c78fa87f485770e7ff
2018-01-12 18:25:16 +00:00
Keir Mierle 40effe3b15 Tiny solver autodiff adapter
Change-Id: I29fe736d53b2be32a101ba128cf557726def9a00
2017-10-14 15:51:14 -07:00