structre in texture

Hi all.
I have a quick question.
Can we use define structure in Texture instead build-in vector types?
thank.

Hi!

There are templates defining the channel descriptor. Those templates are specialized for each of the builtin (vector)types. The use of any other struct in a texture will make the compiler use the

template<class T> __inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc(void)

{

  return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone);

}

template. But this seems to be an invalid channel desc since it sets cudaChannelFormatKindNone and zero bitlength for the data to be contained in the texture.

Therefore I believe that only those builtin types listet in the programming guide are allowed as texture data.

Regards

Navier

Thank you.

I will try.

:)