Fixed width types in device code


Is it possible to use fixed width integer types (e.g. uint32_t, from the cstdint header) in device code? I could not find any instances of this in the SDK and including CUDA runtime headers (like this example) did not work. If not, where can I find any documentation on minimum and maximum widths of standard types when compiled as device code?



Please have a look into the CUDA include header vector_types.h inside your CUDA Toolkit installation folder.
That defines all built-in CUDA vector types from basic types and also explains the CUDA specific memory alignment requirement for all types found here:
Also read this about structure alignments: