cudaChannelFormatDesc is not documented

The documentation for cudaChannelFormatDesc

informs us that x is x, y is y, z is z and w is w. But, that does not inform us what any of those values mean.

What do they represent?

I see a hint in the documentation for cudaCreateChannelDesc

that they specify the number of bits in each channel. What are the rules for the bit counts? Can they be arbitrary? Like x:y:z:w = 1:3:5:7? Am I to assume that the number of bytes in the buffer is exactly represented by the (number of pixels * the number of bits per pixel + 7) / 8?

this may be of interest.

The values cannot be arbitrary. AFAIK the texture unit does not work with groups of bits less than a byte. So AFAIK the only acceptable values are 8, 16 and 32 for any of x,y,z,w, but that does not necessarily mean that 32,32,32,32 is a valid choice. If I were wanting to see how things typically work, I would use the C++ api to create some examples. And there are many examples of texture usage on various web forums (example )