Difference between global and device functions

后端 未结 9 1615
渐次进展
渐次进展 2021-01-29 20:10

Can anyone describe the differences between __global__ and __device__ ?

When should I use __device__, and when to use __glob

9条回答
  •  说谎
    说谎 (楼主)
    2021-01-29 20:50

    __global__ is for cuda kernels, functions that are callable from the host directly. __device__ functions can be called from __global__ and __device__ functions but not from host.

提交回复
热议问题