address mode in cuda 1d texture binding to linear memory


We know that cuda texture supports various address modes to handle out-of-range texture access, but according to CUDA Runtime API, this functionality is not available for texture binding to linear memory:

cudaTextureDesc::addressMode specifies the addressing mode for each dimension of the texture data. cudaTextureAddressMode is defined as:

‎        enum cudaTextureAddressMode {
                  cudaAddressModeWrap   = 0,
                  cudaAddressModeClamp  = 1,
                  cudaAddressModeMirror = 2,
                  cudaAddressModeBorder = 3

This is ignored if cudaResourceDesc::resType is cudaResourceTypeLinear. Also, if cudaTextureDesc::normalizedCoords is set to zero, cudaAddressModeWrap and cudaAddressModeMirror won’t be supported and will be switched to cudaAddressModeClamp.

Read more at:
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

My question is: what happens if I access invalid elements in texture binding to linear memory?
a. everything goes smoothly just like textures binding to cudaArray;
b. the kernel returns successfully, but the fetched value is corrupted;
c. the kernel returns “corrupted memory access” error code and the program terminates;
d. undefined.

I didn’t find much detailed explanation in cuda manual, could anyone help me?

Thanks in advance.