Texture Cropping (Magic)

I am fairly new to textures in CUDA and have a few questions.

  1. If I set up my texture memory like the example in simpleTexture in the SDK (256x256xfloat32) is there a clever texturey way of generating a sub image from this memory? I.e. can I extract the central 20x20 quickly? Is it just the same as sampling any other memory but it can be done quicker or is there some magic texture command that can do this quickly?

  2. Once I have extracted my little region form the middle and have it as a little texture is there a quick, clever, texturey way of doing pattern matching or again do I just have to treat it as a normal array and do a sum of absolute differences or xcorr or something.

Basically I’m hoping textures have additional functionality above arrays.

Any advice will be very much appreciated!

Iain

Another question linked to this is how do I copy just the middle region of an array?