Question
is there any 16 bits long variable in CUDA? I need an unsigned integer of 16 bits. I've tried:
uint16
uint16_t
But no one is recognized by nvcc.
La solution
May be you should try ordinary c unsigned short
?
Autres conseils
CUDA 8 (compute capability 6.x) comes with half-precision intrinsics. You can use the 16-bit floating point data type half
or the integral types short2
/ char4
. These mixed precision types are packed into 32-bit device registers, which can double your performance over just using unsigned short
.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow