Combines entries of Jacobians with the same identifier. More...
#include <duplicateJacobianRemover.hpp>
Public Types | |
| using | ArgumentSize = Config::ArgumentSize |
| Definition of ArgumentSize type. | |
| using | Identifier = T_Identifier |
| See DuplicateJacobianRemover. | |
| using | Real = T_Real |
| See DuplicateJacobianRemover. | |
Public Member Functions | |
| DuplicateJacobianRemover ()=default | |
| Constructor. | |
| inlinevoid | pushData (Real const &jacobian, Identifier const &index) |
| For all added items, check if one matches the identifier. If yes combine, if no append. | |
| template<typename Vec> | |
| inlinevoid | storeData (Vec &vec) |
Combines entries of Jacobians with the same identifier.
This class is used in the storing process of the Jacobians for an expression. For each pushData, it checks if a Jacobian with the same identifier has already been pushed. If so, then it combines these Jacobians.
This behavior can be enabled with -DCODI_RemoveDuplicateJacobianArguments=1. See JacobianBaseTape::pushJacobians for details.
| T_Real | The computation type of a tape, usually chosen as ActiveType::Real. |
| T_Identifier | The adjoint/tangent identifier type of a tape, usually chosen as ActiveType::Identifier. |
|
inline |
Add the data to the provided vector. Resets the internal data for a new statement push.
| Vec | DataInterface with Chunk2<Real, Identifier> as data. |