Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro for extension functions #39

Closed
wants to merge 2 commits into from
Closed

Conversation

vchuravy
Copy link
Member

This pr adds a macro for automatically loading the function pointer for an extensions. This is necessary for #32 to work properly across machines.

It currently still has the following issues

  • This only works for OpenCL 1.0-1.1 for OpenCL 1.2 clGetExtensionFunctionAddress has been changed to clGetExtensionFunctionAddressForPlatform
  • OpenCL only guarantees that this will work when the Extension from which the function is actually exists.

It also raises the question how we handle different OpenCL versions.
Maybe we need some conditional loading/code generation on run time via a check in an __init__ function if the platform only supports OCL1.1 or if it support support OCL1.2.

Also conditional modules like JuliaLang/julia#6195 would be helpful.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d6c0e3f on vc/extension_functions into * on master*.

@vchuravy vchuravy mentioned this pull request Aug 12, 2014
@jakebolewski
Copy link
Member

Nice! I'm glad you are looking at OpenGL support again. Is there any piece of functionality clGetExtensionFunctionAddress is missing that clGetExtensionFunctionAddressForPlatform supports? Otherwise I say we just use the deprecated API for the time being. We could solve the Extension loading problem by querying the device for the extensions it supports in the high level API and throwing an error if the extension does not exist. Lower-level there is not much we can do as we want the shallowest possible interface to the underlying C-API.

@vchuravy vchuravy closed this Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants