int2 i = 0; // error: no suitable constructor ?

int2 i = 0; // error: no suitable constructor exists to convert from “int” to “uint2”
(I can only guess that this is because I’m in 32 bit mode.)
CUDA 3.2.

Thanks a lot for your help.

I find it very annoying that vector types are not treated as builtin types (like for example microsoft HLSL does). To make your code compile you need to initialize your ‘i’ the following way:

int2 i = make_int2(0,0);

also, you manually need to define operators (+,-,*,…) if you want to do vector math.