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 excessive parameters from Derive functions #1110

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

PetroZarytskyi
Copy link
Collaborator

@PetroZarytskyi PetroZarytskyi commented Oct 3, 2024

Derive functions have access to the original function and the diff request through m_DiffRef, there's no need to pass those as parameters. The same applies to m_Functor as it's also stored in m_DiffRef.

Partially addresses #721.

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 99.28058% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.21%. Comparing base (2e5560e) to head (9fc62a4).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
lib/Differentiator/HessianModeVisitor.cpp 98.73% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1110      +/-   ##
==========================================
- Coverage   94.24%   94.21%   -0.03%     
==========================================
  Files          55       48       -7     
  Lines        8447     8131     -316     
==========================================
- Hits         7961     7661     -300     
+ Misses        486      470      -16     
Files with missing lines Coverage Δ
...clude/clad/Differentiator/BaseForwardModeVisitor.h 33.33% <ø> (ø)
include/clad/Differentiator/HessianModeVisitor.h 100.00% <ø> (ø)
include/clad/Differentiator/ReverseModeVisitor.h 97.22% <ø> (-0.96%) ⬇️
include/clad/Differentiator/VisitorBase.h 100.00% <ø> (ø)
lib/Differentiator/BaseForwardModeVisitor.cpp 98.73% <100.00%> (+0.60%) ⬆️
lib/Differentiator/DerivativeBuilder.cpp 100.00% <100.00%> (ø)
lib/Differentiator/ReverseModeForwPassVisitor.cpp 98.74% <100.00%> (-0.03%) ⬇️
lib/Differentiator/ReverseModeVisitor.cpp 95.45% <100.00%> (-2.33%) ⬇️
lib/Differentiator/HessianModeVisitor.cpp 99.51% <98.73%> (-0.03%) ⬇️

... and 33 files with indirect coverage changes

Files with missing lines Coverage Δ
...clude/clad/Differentiator/BaseForwardModeVisitor.h 33.33% <ø> (ø)
include/clad/Differentiator/HessianModeVisitor.h 100.00% <ø> (ø)
include/clad/Differentiator/ReverseModeVisitor.h 97.22% <ø> (-0.96%) ⬇️
include/clad/Differentiator/VisitorBase.h 100.00% <ø> (ø)
lib/Differentiator/BaseForwardModeVisitor.cpp 98.73% <100.00%> (+0.60%) ⬆️
lib/Differentiator/DerivativeBuilder.cpp 100.00% <100.00%> (ø)
lib/Differentiator/ReverseModeForwPassVisitor.cpp 98.74% <100.00%> (-0.03%) ⬇️
lib/Differentiator/ReverseModeVisitor.cpp 95.45% <100.00%> (-2.33%) ⬇️
lib/Differentiator/HessianModeVisitor.cpp 99.51% <98.73%> (-0.03%) ⬇️

... and 33 files with indirect coverage changes

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
lib/Differentiator/HessianModeVisitor.cpp Show resolved Hide resolved
@vgvassilev
Copy link
Owner

Can you fix the clang-tidy and code-cov complaints? Also please mention in the commit message that this partially addresses #721.

Copy link
Contributor

github-actions bot commented Oct 5, 2024

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

Copy link
Contributor

github-actions bot commented Oct 5, 2024

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 8ed2707 into vgvassilev:master Oct 6, 2024
90 checks passed
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