Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VisitWithExplicitNoDfDx and replace it with plain Visit. #1226

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

PetroZarytskyi
Copy link
Collaborator

In the reverse mode, VisitWithExplicitNoDfDx(const Stmt* S) visits S while pushing nullptr to the dfdx() stack. This is exactly the behaviour we get when calling Visit(const Stmt* S, Expr* dfdS = nullptr) with a single parameter. In other words, VisitWithExplicitNoDfDx(S) is the same as Visit(S). This PR removes this function.

In the reverse mode, ``VisitWithExplicitNoDfDx(const Stmt* S)`` visits ``S`` while pushing ``nullptr`` to the ``dfdx()`` stack. This is exactly the behaviour we get when calling ``Visit(const Stmt* S, Expr* dfdS = nullptr)`` with a single parameter. In other words, ``VisitWithExplicitNoDfDx(S)`` is the same as ``Visit(S)``. This PR removes this function.
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.59%. Comparing base (b36f56d) to head (d39027e).
Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1226      +/-   ##
==========================================
- Coverage   94.60%   94.59%   -0.01%     
==========================================
  Files          51       51              
  Lines        8929     8924       -5     
==========================================
- Hits         8447     8442       -5     
  Misses        482      482              
Files with missing lines Coverage Δ
include/clad/Differentiator/ReverseModeVisitor.h 98.09% <ø> (-0.09%) ⬇️
lib/Differentiator/ReverseModeVisitor.cpp 95.42% <100.00%> (ø)
Files with missing lines Coverage Δ
include/clad/Differentiator/ReverseModeVisitor.h 98.09% <ø> (-0.09%) ⬇️
lib/Differentiator/ReverseModeVisitor.cpp 95.42% <100.00%> (ø)

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Owner

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@vgvassilev vgvassilev merged commit 277e13c into vgvassilev:master Jan 23, 2025
186 checks passed
@PetroZarytskyi PetroZarytskyi deleted the dfds branch January 23, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants