GPU cmoupute capability doesn't support __hiloint2double

One part of my code is :

static device double fetch_double(texture<int2,1> val, int elem)


int2 v = tex1Dfetch(val, elem);

return __hiloint2double(v.y, v.x);


But now, the CUDA compute capability(1.2) does not support the function __hiloint2double, and my GPU is single precision. How should I modify the code?

Thank you~

double is supported by compute capability 1.3 and up, so __hiloint2double() likewise requires at least compute capability 1.3. Either change your code so it uses single precision throughout, or upgrade your hardware to a GPU of compute capability of at least 1.3.

If I define a double variable, does it work on the GPU of compute capability 1.3 ?

Yes. Double precision is support with compute capability >= 1.3

Sorry, I make a mistake. Does the double variable work on the GPU of compute capability of 1.2 ?

If it does not, what happens when I define a double variable?

No, double precision does not work on compute capability 1.2. If you define a double in that case, the compiler converts it to a float.

Thank you!