Kernel sub functions Organizing complex kernels

I wish to organize my kernel into more manageable functions. Can one call sub-kernels/sub-functions from the kernel? Where is this documented?
Along the same line, if I wish a variable to be global (static) across the subroutines, how can that be accomplished?

Thanks in advance.

I wish to organize my kernel into more manageable functions. Can one call sub-kernels/sub-functions from the kernel? Where is this documented?
Along the same line, if I wish a variable to be global (static) across the subroutines, how can that be accomplished?

Thanks in advance.

These functions go preceed by device word.
The kernel will call this new functions.
All information about this device methods are in the CUDA programming guide.

These functions go preceed by device word.
The kernel will call this new functions.
All information about this device methods are in the CUDA programming guide.