minor [incompatible] changes in CLContext factory methods

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

minor [incompatible] changes in CLContext factory methods

Michael Bien
  I just removed one context factory method in CLContext and
CLGLContext. The method was there since the beginning (OpenCL 1.0 spec
draft) and at that point it wasn't obvious if OpenCL would provide
system wide (cross-CLPlatform) device identifiers or not. Since it
doesn't provide them till now we can add a few shortcuts to the API.

ctx = CLContext.create(device1, device2) is now completely deterministic
without a platform as parameter.

ctx = CLContext.create(platform, GPU) stays unchanged

Please comment if you have any objections.

> removed CLContext factory methods with CLPlatform + CLDevice list combinations.
> justification:
>   - information is now no longer needed since every CLDevice knows its CLPlatform
>   - OpenCL device IDs are not portable between CLPlatforms
> changes:
>   - Context factories will throw CLInvalidPlatformException if the platform of all CLDevices does not match
> related changes:
>   - [persistance] CLProgramBuilder stores now the ICD suffix to be later able to map binaries back to the platform + device