does cuda 2.0 support an array of texture references?

Does cuda 2.0 support an array of texture references?

Thanks.

No, it does not, assuming you want to dynamically index arrays of texture references.

Thanks tmurray, so a temporal solution could be to create a macro just like jimh suggested:

Jimh wrote

Aug 28 2007, 01:20 PM

I don’t believe it is possible to do directly. (Search for other posts on the subject for more details). I implemented a texture array by creating C macros like this:

CODE

#define arraytexFetch(_texbasename, _tu, _tv, _texnum, _return)\

{\

switch(_texnum)\

{\

case 0:\

_return = tex2D(_texbasename##00, (_tu), (_tv));\

break;\

case 1:\

_return = tex2D(_texbasename##01, (_tu), (_tv));\

break;\

case 2:\

_return = tex2D(_texbasename##02, (_tu), (_tv));\

break;\

case 3:\

_return = tex2D(_texbasename##03, (_tu), (_tv));\

break;\

}