-
Notifications
You must be signed in to change notification settings - Fork 229
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
compiler: Uncache data carriers #1913
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1913 +/- ##
=======================================
Coverage 89.64% 89.65%
=======================================
Files 211 211
Lines 35634 35639 +5
Branches 5369 5369
=======================================
+ Hits 31945 31951 +6
Misses 3189 3189
+ Partials 500 499 -1
Continue to review full report at Codecov.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
7b61c6b
to
5b9adbe
Compare
@@ -303,7 +303,7 @@ | |||
" for (int y = y_m; y <= y_M; y += 1)\n", | |||
" {\n", | |||
" float r3 = -2.0F*u[time][x + 2][y + 2];\n", | |||
" u[time + 1][x + 2][y + 2] = dt*(r0*u[time][x + 2][y + 2] + c*(r1*r3 + r1*u[time][x + 1][y + 2] + r1*u[time][x + 3][y + 2] + r2*r3 + r2*u[time][x + 2][y + 1] + r2*u[time][x + 2][y + 3]));\n", | |||
" u[time + 1][x + 2][y + 2] = dt*(c*(r1*r3 + r1*u[time][x + 1][y + 2] + r1*u[time][x + 3][y + 2] + r2*r3 + r2*u[time][x + 2][y + 1] + r2*u[time][x + 2][y + 3]) + r0*u[time][x + 2][y + 2]);\n", |
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.
Is this change of order deterministic?
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.
Looks gtg. Not sue why the symbol order changes from ascending to descending, I guess id
's related.
# Obviously: | ||
assert foo0 is not foo1 | ||
assert foo0 is not foo2 | ||
assert foo1 is not foo2 |
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.
Should the dtype and value be checked too for safety?
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.
"checked" how? like foo0.dtype is foo1.dtype
? that's obvious imho
Oh, it boils down to how SymPy internally orders objects... it uses the |
Scalar data carriers are unique, so why attempt to cache them?