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

[mesh] [opt] Support nested mesh-for #3990

Merged
merged 4 commits into from
Jan 11, 2022

Conversation

g1n0st
Copy link
Contributor

@g1n0st g1n0st commented Jan 10, 2022

Related issue = #3608

Before this PR, do the neighbor query loop in mesh-for must resort to nested range-for, like:

for u in model.verts:
  for i in u.verts.size:
    u.x += u.verts[i].y

This PR implemented the nested mesh-for loop, the code above could be rewritten as:

for u in model.verts:
  for v in u.verts:
    u.x += v.y

Note that the nested mesh-for loop would not be un-looped.

@g1n0st g1n0st added the mesh MeshTaichi label Jan 10, 2022
@g1n0st g1n0st self-assigned this Jan 10, 2022
@netlify
Copy link

netlify bot commented Jan 10, 2022

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: 26fdd8a

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61dc784de99705000703eec0

Copy link
Collaborator

@BillXu2000 BillXu2000 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mesh MeshTaichi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants