-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[Example] Enhance stable_fluid.py with BFECC, RK2, RK3 and Taichi's new syntax #1617
Conversation
|
||
|
||
@ti.kernel | ||
def pressure_jacobi(pf: ti.template(), new_pf: ti.template()): | ||
ti.cache_read_only(pf) |
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.
Btw, can we document this feature somewhere? I'm puzzled, despite it brings a bit of FPS improvements, and I guess I'm using it correct...
taichi_lang_core.cache(1, v.ptr) | ||
def cache_read_only(*args): | ||
for v in args: | ||
taichi_lang_core.cache(1, v.loop_range().ptr) | ||
|
||
|
||
def assume_in_range(val, base, low, high): |
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.
What is this function used for? Can we have a section performance.rst
in Advanced programming
explaining these cool APIs? Or they're just incomplete or even buggy for now?
Codecov Report
@@ Coverage Diff @@
## master #1617 +/- ##
==========================================
- Coverage 46.01% 44.20% -1.81%
==========================================
Files 40 41 +1
Lines 5544 5843 +299
Branches 1002 1011 +9
==========================================
+ Hits 2551 2583 +32
- Misses 2840 3106 +266
- Partials 153 154 +1
Continue to review full report at Codecov.
|
Related issue = #
[Click here for the format server]
Btw, who wrote this cool example?