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

add syntax sugar doc for static assignment #585

Merged
merged 4 commits into from
Mar 18, 2020

Conversation

KLozes
Copy link
Collaborator

@KLozes KLozes commented Mar 12, 2020

Related issue id = #574

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Thank you so much! This looks really great. I'll merge this in once v0.5.8 (with #575) is released. (Once merged in master this will be reflected immediately in the docs, hence the delay.)

docs/syntax_sugars.rst Show resolved Hide resolved
docs/syntax_sugars.rst Outdated Show resolved Hide resolved
docs/index.rst Show resolved Hide resolved
@KLozes
Copy link
Collaborator Author

KLozes commented Mar 12, 2020

@archibate good point. While I think objective data orient programing will be the most common use case, I should come up with something more general. perhaps:

ti.static() makes it possible to retain python style pointer assignment within Taichi kernels and functions. This allows local variables to alias global variables and functions, which can then be used throughout the kernel instead.

show static assignment of global tensor and function...

This is also particularly useful for objective data-oriented programming, which inherits the python syntax of requiring self for class member access.

show self simplification example ...

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Thank you @KLozes and @archibate! Merging this in since v0.5.8 is ready very soon.

@yuanming-hu yuanming-hu merged commit 39b2f49 into taichi-dev:master Mar 18, 2020
@KLozes KLozes deleted the ptr_assign_doc branch June 23, 2021 20:32
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.

3 participants