There is a separate C, and C++ API for that function (the C++ API being overloaded).
For the C API function those are the number of bits for each channel. These can be colors channels or spatial dimensions or really anything you want to use them for. The example you copied from is only using scalar values. 32 bits being appropriate for float data type.
__host__ ​cudaChannelFormatDesc cudaCreateChannelDesc ( int x, int y, int z, int w, cudaChannelFormatKind f )
From the cuda docs, "Returns a channel descriptor with format f and number of bits of each component x, y, z, and w."
The C++ API is overloaded and looks like this...
If you are compiling on windows with visual studio or g++ for a .cu file you should use this form. For c files, use the above.
__inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float>(void)
__inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float2>(void)
__inline__ __host__ cudaChannelFormatDesc cudaCreateChannelDesc<float4>(void)
etc.