64 bit integer operations

In the CUDA programmers manual there are a number of references to the use of 64-bit integer arithmetic, including some intrinsic functions operating on 64-bit and even 128-bit integers.

Theres no information on whether or not the standard integer arithmetic and logical operators apply to them, how fast these operations are, how to declare 64-bit and 128bit variables, whether or not arrays of them can be declared.

has anyone experimented with these operations?

Hello,

64-bit integer arithmetic is one of the most intriguing notes in the manual for me.
It’s supposed to work (regarding the changelog: http://developer.download.nvidia.com/compu…_linux_1.0.txt)
I’m sorry, I haven’t tried yet, but I saw a reference about its use in this CUDA course project:
http://courses.ece.uiuc.edu/ece498/al1/Fin…on-12-14-07.ppt

In the 9th slide:

struct quantum_reg_CUDA
{
int size; // number of
// non-zero vectors
int blocksize;
MAX_UNSIGNED *state;
};

Where MAX_UNSIGNED is the type for 64 bit integer.

I hope it will become clearer in CUDA 2.0 documentation, because 64 bit floating point types are just about to appear :-?

Maybe take a look at decuda to find out if it’s possible?

CUDA supports normal 64 bit integer operations using the ‘long long’ type. But, just like on other 32-bit architectures, this is implemented using 32-bit instructions.
(G80 has 32-bit registers, of which the 16-bit halves can be used separately. The only instructions that support 64 and 128-bit quantities directly are memory load/store)

Is it also the case for GT200 or it has 64-bit integer ALU?

thanks

Yes it does. It seems to use the same ALU as doubles, so its throughput has to be shared. It’s barely documented, but should Just Work.

Admittedly, I have not tried using it!

128 bit integers ?

Could you please give a reference where did you find them ?