Difference between global and device functions

后端 未结 9 1611
渐次进展
渐次进展 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:52

    Global functions are also called "kernels". It's the functions that you may call from the host side using CUDA kernel call semantics (<<<...>>>).

    Device functions can only be called from other device or global functions. __device__ functions cannot be called from host code.

提交回复
热议问题