Last active
July 19, 2018 01:14
-
-
Save Pyromuffin/8a71d4d400edb8e3af2aadc7e477f6a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[numthreads(64, 1, 1)] | |
void BallotExample(uint gtid : SV_GroupThreadID) | |
{ | |
// assuming GCN architecture with WAVE_SIZE == 64 | |
bool firstHalf = gtid < 32; | |
uint2 ballotResult = WaveActiveBallot(firstHalf); | |
// ballotResult == 0x0000 0000 FFFF FFFF in ALL threads. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment