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?
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.