Skip to content

Taichi splits kernel in several for loops? #7303

Answered by bobcao3
unwise-fish asked this question in Q&A
Discussion options

You must be logged in to vote

Because Taichi for loop is parallel, when you do += it's doing an atomic add so summation will work over parallel loop. However keep in mind in parallelized loops, the order of execution in the loop is considered random. Thus the value you read from sum[None] will appear in a random order

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by unwise-fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants