I am new to OpenCL programming. What is the difference between device, context, and platform?
I am new to OpenCL programming. What is the difference between device, context, and
Share
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.
A platform is a specific OpenCL implementation, for instance AMD APP, NVIDIA or Intel OpenCL. A context is a platform with a set of available devices for that platform. And the devices are the actual processors (CPU, GPU etc.) that perform calculations.
So if you use the Intel platform, a valid context with this platform would include a CPU device. While if you use the NVIDIA platform, a valid context would include an NVIDIA GPU device.