Last active
December 14, 2015 06:38
-
-
Save allanmac/5043569 to your computer and use it in GitHub Desktop.
The `setp` and `selp` instructions are your friends.
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
extern "C" | |
__global__ | |
void natural(const unsigned int b, | |
const unsigned int c, | |
const unsigned int y, | |
const unsigned int z, | |
const unsigned int id, | |
unsigned int* const out) | |
{ | |
const bool flag = (id == 1); | |
const unsigned int a = flag ? b : c; | |
const unsigned int x = flag ? y : z; | |
out[0] = a; | |
out[1] = x; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cuobjdump.exe -sass natural.cubin