While using texture memory I have come across the following code:-
uint f = (blockIdx.x * blockDim.x) + threadIdx.x;
uint c = (blockIdx.y * blockDim.y) + thr
Depending on the texture properties, the value returned by tex2D may be linearly interpolated. In that case, the "indices" f and c should not be integers, but continuous values between the limits of each dimension.
What is a bit odd in this example is that the return value is an integer, which will make any linear interpolant piecewise constant anyway.
For more detailed information, see Section 3.2.10 of the CUDA Programming Guide.