I kind of found various opinions on this topic, so this is why I decided to ask here. My question is starting from what computing capability is int64_t supported on CUDA. I am running cuda 5 on a Quadro770M and the following code works without a problem, although I read that 64 bit unsigned are supported starting from compute capability 1.3. So what is the real answer to that 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);
}
64 bit integers (signed and unsigned) are supported on all CUDA-capable hardware (though operations on them map to multiple native 32-bit instructions).
Compute capability 1.3 introduced 64-bit floating point numbers (which are natively supported).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With