I kind of found different opinions on this topic, which is why that is why I decided to ask here. My question starts with what computing capabilities are supported by int64_t on CUDA. I am running cuda 5 on a Quadro770M and the following code works without problems, although I read that 64-bit unsigned are supported, starting with the ability to compute 1.3. So what is the real answer to this question?
__device__ void printBinary(int64_t a) { int bits[64]; int i; for (i = 0; i < 64; i++) { bits[63 - i] = (a >> i) & 1; } for (int i = 0; i < 64; ++i) { cuPrintf("%d", bits[i]); } cuPrintf("\n"); cuPrintf("%016llX", a); }
source share