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

Update README to clarify multi-line blocks #142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Emmanuel-R8
Copy link

No description provided.

Comment on lines +282 to +285
@tullio D[i, j] := begin
TMP[i, j, m, n] = A[i, j, k, l] * B[k, l, m, n]
TMP[i, j, m, n] * C[m, n]
end
Copy link
Owner

Choose a reason for hiding this comment

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

I guess this one is safe, but I'm not keen to encourage such use. Tullio will often multi-thread over indices it deems safe, but it is not smart enough to notice that this is writing into an array. If it had TMP[j, m, n] = , this would introduce data races.

Copy link
Author

Choose a reason for hiding this comment

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

Then I think I should had a comment to that effect. It is another difference with single liners.

Copy link
Author

@Emmanuel-R8 Emmanuel-R8 left a comment

Choose a reason for hiding this comment

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

Add text about data races when using the same symbol within a block.

@mcabbott mcabbott added the documentation Improvements or additions to documentation label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants