vgvassilev / clad

clad -- automatic differentiation for C/C++
GNU Lesser General Public License v3.0
266 stars 113 forks source link

Pass the DiffRequest down to the visitors. NFC. #933

Closed vgvassilev closed 3 weeks ago

vgvassilev commented 3 weeks ago

The intent of this patch is to centralize the information about the diff request in one place. This will help upcoming patches to reduce the state of the visitors and refactor some of the implementation in a common place.

That will unblock work on #721.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.72%. Comparing base (340ad91) to head (72052cb).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/vgvassilev/clad/pull/933/graphs/tree.svg?width=650&height=150&src=pr&token=9f6Q4em8hE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev)](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) ```diff @@ Coverage Diff @@ ## master #933 +/- ## ======================================= Coverage 93.72% 93.72% ======================================= Files 53 54 +1 Lines 7773 7781 +8 ======================================= + Hits 7285 7293 +8 Misses 488 488 ``` | [Files](https://app.codecov.io/gh/vgvassilev/clad/pull/933?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | Coverage Δ | | |---|---|---| | [demos/ErrorEstimation/CustomModel/CustomModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=demos%2FErrorEstimation%2FCustomModel%2FCustomModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-ZGVtb3MvRXJyb3JFc3RpbWF0aW9uL0N1c3RvbU1vZGVsL0N1c3RvbU1vZGVsLmg=) | `100.00% <100.00%> (ø)` | | | [demos/ErrorEstimation/PrintModel/PrintModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=demos%2FErrorEstimation%2FPrintModel%2FPrintModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-ZGVtb3MvRXJyb3JFc3RpbWF0aW9uL1ByaW50TW9kZWwvUHJpbnRNb2RlbC5o) | `100.00% <100.00%> (ø)` | | | [...clude/clad/Differentiator/BaseForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FBaseForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0Jhc2VGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | [include/clad/Differentiator/DiffPlanner.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FDiffPlanner.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0RpZmZQbGFubmVyLmg=) | `68.18% <100.00%> (+1.51%)` | :arrow_up: | | [include/clad/Differentiator/EstimationModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FEstimationModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0VzdGltYXRpb25Nb2RlbC5o) | `100.00% <100.00%> (ø)` | | | [include/clad/Differentiator/HessianModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FHessianModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0hlc3NpYW5Nb2RlVmlzaXRvci5o) | `100.00% <100.00%> (ø)` | | | [...clude/clad/Differentiator/PushForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FPushForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1B1c2hGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | [...e/clad/Differentiator/ReverseModeForwPassVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FReverseModeForwPassVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1JldmVyc2VNb2RlRm9yd1Bhc3NWaXNpdG9yLmg=) | `100.00% <ø> (ø)` | | | [include/clad/Differentiator/ReverseModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FReverseModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1JldmVyc2VNb2RlVmlzaXRvci5o) | `97.84% <ø> (ø)` | | | [...clad/Differentiator/VectorPushForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FVectorPushForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1ZlY3RvclB1c2hGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | ... and [12 more](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | | | [Files](https://app.codecov.io/gh/vgvassilev/clad/pull/933?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | Coverage Δ | | |---|---|---| | [demos/ErrorEstimation/CustomModel/CustomModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=demos%2FErrorEstimation%2FCustomModel%2FCustomModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-ZGVtb3MvRXJyb3JFc3RpbWF0aW9uL0N1c3RvbU1vZGVsL0N1c3RvbU1vZGVsLmg=) | `100.00% <100.00%> (ø)` | | | [demos/ErrorEstimation/PrintModel/PrintModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=demos%2FErrorEstimation%2FPrintModel%2FPrintModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-ZGVtb3MvRXJyb3JFc3RpbWF0aW9uL1ByaW50TW9kZWwvUHJpbnRNb2RlbC5o) | `100.00% <100.00%> (ø)` | | | [...clude/clad/Differentiator/BaseForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FBaseForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0Jhc2VGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | [include/clad/Differentiator/DiffPlanner.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FDiffPlanner.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0RpZmZQbGFubmVyLmg=) | `68.18% <100.00%> (+1.51%)` | :arrow_up: | | [include/clad/Differentiator/EstimationModel.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FEstimationModel.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0VzdGltYXRpb25Nb2RlbC5o) | `100.00% <100.00%> (ø)` | | | [include/clad/Differentiator/HessianModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FHessianModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL0hlc3NpYW5Nb2RlVmlzaXRvci5o) | `100.00% <100.00%> (ø)` | | | [...clude/clad/Differentiator/PushForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FPushForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1B1c2hGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | [...e/clad/Differentiator/ReverseModeForwPassVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FReverseModeForwPassVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1JldmVyc2VNb2RlRm9yd1Bhc3NWaXNpdG9yLmg=) | `100.00% <ø> (ø)` | | | [include/clad/Differentiator/ReverseModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FReverseModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1JldmVyc2VNb2RlVmlzaXRvci5o) | `97.84% <ø> (ø)` | | | [...clad/Differentiator/VectorPushForwardModeVisitor.h](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree&filepath=include%2Fclad%2FDifferentiator%2FVectorPushForwardModeVisitor.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-aW5jbHVkZS9jbGFkL0RpZmZlcmVudGlhdG9yL1ZlY3RvclB1c2hGb3J3YXJkTW9kZVZpc2l0b3IuaA==) | `100.00% <ø> (ø)` | | | ... and [12 more](https://app.codecov.io/gh/vgvassilev/clad/pull/933?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | |