Using texture

I tried to use texture memory using this simple code, but the texture is not returning the correct values; I suspect a problem with the index for accessing the texture.

texture<float, 2, cudaReadModeElementType> texGaborU;

__global__ void GaborKernel( Complex* in ,int width ,int height ,Complex* maps ) 

{

	unsigned int x	= blockIdx.x*blockDim.x + threadIdx.x;

	unsigned int y	= blockIdx.y*blockDim.y + threadIdx.y;

	float u ,v;

	unsigned int i,j;

	

	for ( j = 0; j < NO_OF_ORIENTS; j++ )		

	{

		u = x / (float)width;

		v = <b>(j*height + y) / (float)(NO_OF_ORIENTS*height)</b>;

	

		for ( i = 0; i < NO_OF_BANDS; i++ )		

		{

			//some operation using texture

			in[y*width + x] = tex2D(texGaborU ,u ,v);

		}

	}

}
float *h_gaborMaskU = (float *)malloc( NO_OF_ORIENTS * width*height*sizeof(float));

	.....

	

	cudaArray* cu_gaborU = NULL;

	

	CUDA_SAFE_CALL( cudaMallocArray( &cu_gaborU, &channelDesc, <b>width ,NO_OF_ORIENTS*height</b> )); 

	CUDA_SAFE_CALL( cudaMemcpyToArray( cu_gaborU, 0, 0, h_gaborMaskU ,NO_OF_ORIENTS*width*height*sizeof(float), cudaMemcpyHostToDevice));

	texGaborU.addressMode[0] = cudaAddressModeClamp;

	texGaborU.addressMode[1] = cudaAddressModeClamp;

	texGaborU.filterMode	= cudaFilterModePoint;

	texGaborU.normalized	= true;

	CUDA_SAFE_CALL( cudaBindTextureToArray( texGaborU, cu_gaborU, channelDesc) );

	

	//call to gabor kernel