Hi there,
currently i’m working with a graphic card that allow me to work with double (architecture 1.3).
If i use texture memory to allocate a double array, it’s enought to declare the texture as int2, and then cast it to double with a special function __hiloint2double. All right.
The problem arise when i want to use the same structure, but with unsigned long instead of doubles. The size is the same (8 bytes), but i don’t know really how to cast it.
Here i let the code for fetch values and cast to a double:
texture<int2, 1> texRef;
...
__inline__ __device__ double Fetch_X(const size_t &i)
{
int2 V = tex1Dfetch(texRef, i);
return __hiloint2double(V.y, V.x);
}
Thanks in advance