-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update examples in waveballot.md and waveactivecountbits.md #2077
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
base: docs
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -58,7 +58,7 @@ This function is supported from shader model 6.0 in all shader stages. | |||||||
| This can be implemented more efficiently than a full WaveActiveSum, as described in the following example: | ||||||||
|
|
||||||||
| ``` syntax | ||||||||
| result = WaveActiveCountBits( WaveActiveBallot( bBit ) ); | ||||||||
| result = countbits( WaveActiveBallot( bBit ) ); | ||||||||
|
||||||||
| result = countbits( WaveActiveBallot( bBit ) ); | |
| uint4 counts = countbits( WaveActiveBallot( bBit ) ); | |
| result = counts.x + counts.y + counts.z + counts.w; |
This is because WaveActiveBallow returns a uint4 in order to have one bit for every potential lane in the widest possible lane width of 128.
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.
Thanks! Updated.
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.
Maybe this line should be clarified that this is meant to demonstrate what this operation does:
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.
Tried another way to put this, hopefully this is clearer?