bashbaug / opencl-runtime-loader

OpenCL Runtime Loader Library
MIT License
2 stars 0 forks source link

add support for extension functions #12

Open bashbaug opened 4 years ago

bashbaug commented 4 years ago

I think we can add support for extension functions as well as core API functions in the OpenCL Runtime Loader.

Suggest that extensions be added with at least two levels of support:

  1. Single-platform support only: When a context is successfully created for a platform, query the extension functions for the platform as well. Anytime an extension function gets called, it will call the function for this platform.

  2. Multi-platform support: Query extension functions for all platforms and call the correct extension function based on the parameters to the extension function. This will require a lookup for each extension function call.

Each level of support may be added independently. Single-platform support will be easier and is sufficient for many use-cases.

The extension functions should be automatically generated from the cl.xml grammar.