About Texture memory

Hi all,

In programming guide page # 95
last para

it says–

any texture fetch to an address that has been written to via global write in the same kernel call returns undefined data. further more it say a thread cannot read safely via texture some memory if it has been updated by same kernel launch or same thread.

             This is only relevant when fetching from linear memory as a kernel

cannot write to CUDA arrays anyway.

can any body give some explanation …


Textures have a cache. Therefore if you write to a location in a texture’s array then later you have the possibility of reading the old value from the cache rather than the new value.