I would like to define a kernel function, which may be called by the host function directly, or it may be called by another global function. But it seems that I cannot put global and device keywords in front of a kernel function.
Is there any solution?
Thank you,
Did I get you right? You want to call a kernel (global) function from within a kernel function?
You can only run one kernel at a time.
You can call device functions from within a kernel but not another kernel.
See the function type qualifiers on page 18 in the CUDA Programming Guide.