29

Is there any ways i can have a function inside cuda kernel. I mean my cuda kernel gets pretty long and hard to debug at one point. Thanks.

1 Answer 1

40

yes, just mark function with __device__ and it will be callable only from GPU. Check CUDA Programming guide, section B.1 Here is the direct link

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.