Coalesced reading from a texture

Hello everybody,

is it possible to do coalesced reading from a texture or can it just be accessed with tex2d? Let’s assume I have a 2D texture bound to some CUDA array. For example, can I read the first row of the texture in a coalesced manner and access other texels which can’t be read coalesced with tex2d?

Best regards,

Texture reads are (hopefully) coalesced by the hardware, you have no control over this as you don’t know the internal format of 2-D textures. It is only vaguely defined that reads in a local 2-D area will be more performant than random reads scattered throughout the texture.