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.

Was it helpful?

Solution

May be you should try ordinary c unsigned short?

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top