Tyler Jandreau
Tyler Jandreau

Reputation: 4335

Using non-native CUDA structures in texture memory

Is it possible to use an extended version of the CUDA native type float4 in texture memory? For example, I have several things that I would like to group using a structure in one texture:

struct {
   float x;
   float y;
   float z;
   float w;
   float t;
   float m;
}; 

Which extends the definition of float4 by t and m.

I Googled around but didn't see anything addressing this particular issue. Thanks for the help!

Upvotes: 0

Views: 281

Answers (1)

sgarizvi
sgarizvi

Reputation: 16816

Currently, texture fetching for textures of user defined data types is not supported by CUDA. The texture fetching functions like tex1Dfetch, tex2D, tex3D etc are implemented only for textures of some specific types.

Upvotes: 2

Related Questions