help changing texture adress mode blockmatcher in cuda

hi,

im currently working on a project to undistort images. for this i need a area search block matcher, for some kind of motion estimation. in each image i have a fix number of blocks and each block has to be found in an fix search area ( defined by a displacement ), the basic idea is to place the pictures in texture memory ( one reference image and the current image to compare ). then let the grid iterate over the different blocks(int he image not threadblocks) and the threads over the displacement (from -dspl to dspl). for each block i got the origins in the reference image.

now i got some problems with texture address mode

to avoid to much branch prediction in my code, i would like to change the texture adress mode of my textures. i initialize my textures like this

texture<unsigned int, 2, cudaReadModeElementType> img;

CUDA_SAFE_CALL( cudaMallocArray(&img_Data, &img_Desc, imgW, imgH) );

CUDA_SAFE_CALL( cudaMemcpyToArray(img_Data, 0, 0, image, imageDataSize, cudaMemcpyHostToDevice) );

CUDA_SAFE_CALL( cudaBindTextureToArray( img, img_Data, img_Desc ) );

but how to change the durrent address mode to “wrap”, is it only possilbe with the driver api?

Ok got it on my own.