Hi, I have written a function, say, void count(), with no qualifier. And I called it in a globall function, what will happen? Will count() be executed on device or on host? What should I do if I want a device function be to recursive? Thank you!
count() will probably be treated as a device function. However this is out-of-spec. If you want a subroutine to be callable from both host and device code, add both host device attributes.
Recursive functions are not allowed in device code.
Peter