64 bit integers

I’m using CUDA 2.0

I want a 64-bit unsigned int. I’ve tried:

unsigned long
unsigned long long
unsigned long long int

All of them return a sizeof() = 4 :-(

Thanks.

Have you tried ulong? There is a ulong vector type (ulong1, ulong2, etc.) in the programming reference, so I assume the singular type would have the same name.

You can use:
ulong1 uint64 scalar
ulong2 uint64 vector of length 2
and similarly ‘ulong3’ and ‘ulong4’.

Also, these variable types can be used both by host and device.
Ref.: CUDA 2.0 Programming Guide, Section 4.3