Array of texture reference? how to make an array of texture reference?

Hi,

Is it a way to make an array of texture reference?

I tried :

texture<float, 2, cudaReadModeElementType> tex [10];

But I can’t use tex[i] in kernel, I get this error :

Error: texture reference must be simple name

Any ideas?

A question is do You really need textures organized like this in kernel.

No, you cannot make arrays of texture references. However, you might be able to use “layered textures” instead. See Section 3.2.10.1.5 of the CUDA Programming Guide.

Ok, thanks for this answer