开发者

function inside the cuda kernel

开发者 https://www.devze.com 2023-01-19 21:43 出处:网络
Is there any ways i can have a function inside cuda kernel. I mean my cuda kernel gets pretty long and har开发者_JAVA百科d to debug at one point. Thanks.yes, just mark function with __device__ and it

Is there any ways i can have a function inside cuda kernel. I mean my cuda kernel gets pretty long and har开发者_JAVA百科d to debug at one point. Thanks.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消