An OpenCL context is created with one or more devices. Contexts are used by the OpenCL runtime for managing objects such as command queues (the object that allows you to send commands to the device), memory, program, and kernel objects, and for executing kernels on one or more devices specified in the context.
In more detail, OpenCL contexts can be created by associating a collection of devices that are available for the platform via
clCreateContext or by associating it with a particular type of device, for example, CPU, GPUs, and so on, via
clCreateContextFromType. However, in either way you cannot create contexts that are associated with more than one platform. Let's use the example of vector multiplication in the Introduction ...