-
Notifications
You must be signed in to change notification settings - Fork 125
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
Computer graphics issue fix #203
Computer graphics issue fix #203
Conversation
overloadExists returns true when there is no overload present so it should be called noOverloadExists
When custom derivatives of a function exists it does not need to be checked for multi-args
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
==========================================
+ Coverage 83.92% 83.96% +0.04%
==========================================
Files 13 13
Lines 2650 2651 +1
==========================================
+ Hits 2224 2226 +2
+ Misses 426 425 -1
|
Thanks for the PR, looks good to me. Since we do not still have an infrastructure to check fixed assertions (see #157) we will do it manually next week. |
The PR seems to fix the issue. Could you add this diff to it to make sure we see consistent behavior in the bots: diff --git a/test/Misc/RunDemos.C b/test/Misc/RunDemos.C
index da13c67..2815cb6 100644
--- a/test/Misc/RunDemos.C
+++ b/test/Misc/RunDemos.C
@@ -2,6 +2,7 @@
// RUN: %cladclang %S/../../demos/ControlFlow.cpp -I%S/../../include 2>&1
// RUN: %cladclang %S/../../demos/DebuggingClad.cpp -I%S/../../include 2>&1
// RUN: %cladclang %S/../../demos/RosenbrockFunction.cpp -I%S/../../include 2>&1
+// RUN: %cladclang %S/../../demos/ComputerGraphics/SmallPT.cpp -I%S/../../include 2>&1
//-----------------------------------------------------------------------------/
@@ -95,4 +96,4 @@
//-----------------------------------------------------------------------------/
// Demo: ODE Solver Sensitivity
//-----------------------------------------------------------------------------/
-// RUN: %cladclang -lstdc++ %S/../../demos/ODESolverSensitivity.cpp -I%S/../../include -oODESolverSensitivity.out
\ No newline at end of file
+// RUN: %cladclang -lstdc++ %S/../../demos/ODESolverSensitivity.cpp -I%S/../../include -oODESolverSensitivity.out |
@vgvassilev sure |
Could you also add regression tests for the fixed cases? |
@vgvassilev I am also working on a fix for pow in reverse mode can I add the tests after I fix that or would it be better to do it right now? |
Please add it at your convenience. Definitely should be before merging this PR though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks!
Fixes #167
Modify 'ForwardModeVisitor::VisitCallExpr' to delay the multi-arg assert to ensure the corresponding 'custom_derivative' is found.
P.S. there is a minor refactoring to make the overloadExists function name match its return value.