‘clContextCreate’ takes multiple devices. ‘cl_context’ is associated to multiple devices.
And, ‘clCreateBuffer’ takes single context object.
So, ‘cl_mem’ is associated to multiple devices.
On platform that has multiple GPUs that have different memory size,
size of allocatable memory is limited to most small device.
It seems strange. I think that ‘cl_mem’ should be associated to single device.
Why is cl_mem associated to cl_context?