CUDA function call-able by either the device or host

后端 未结 1 1767
囚心锁ツ
囚心锁ツ 2020-12-17 23:28

I have a re-useable function in some CUDA code that needs to be called from both the device and the host. Is there an appropriate qualifier for this?

e.g. what\'s th

1条回答
  •  北荒
    北荒 (楼主)
    2020-12-18 00:12

    From the CUDA Programming Guide:

    The __device__ and __host__ qualifiers can be used together however, in which case the function is compiled for both the host and the device.

    0 讨论(0)
提交回复
热议问题