Can anyone describe the differences between __global__ and __device__ ?
When should I use __device__, and when to use __global__?.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.