-
Notifications
You must be signed in to change notification settings - Fork 38
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
Versioned API #42
Versioned API #42
Conversation
The Travis breakage looks unrelated.
|
I added three macros for my most common use case. using OpenCL; const cl = OpenCL
platform, device, ...
const image = cl.@min_v12? device begin
cl.api.clCreateFromGLTexture(...)
end : begin
cl.api.clCreateFromGLTexture2D(...)
end |
the |
…sion - removes macros ocl_func_1_x - changes macro ocl_func to eval in modul context - import macro in each conitionally loaded file
… the ocl_func macro
d93d888
to
4ac4f5d
Compare
An interesting approach is what OpenCL.jl took.
We could then check if the version specified is supported by at least on available platform and then load the api. https://github.com/rennis250/OpenGL.jl/blob/master/src/OpenGL.jl @jakebolewski What do you think about the whole approach outlined in this PR? Worth pursuing? |
So I am happy with the functionality gain vs complexity added. The only thing I am unhappy about is that this needs @jakebolewski Final call is yours :) |
@vchuravy I finally got a new computer so I can actually work on this again! I had a closer look at your pull request and pushed a couple of changes to Just a note. This looks pretty good, but I still have reservations. The main is that we now have to execute code at Module load time which you generally want to avoid. It takes a bit longer to load (~10%) which is not terrible but I feel that static compilation might be coming in the next release and this will complicate things if we want to take advantage of that. I don't know if it would be worth waiting until conditional modules arrive, it seems like a better solution than what we can do now. |
I like your changes :) Yes I was wondering how this might play with static compilation. But my intuition would be to fix this when and if conditional modules and static compilation is available. |
Ok fair enough. I guess this doesn't really break any valid use of the low On Sat, Aug 23, 2014 at 10:08 AM, Valentin Churavy <[email protected]
|
superseded by #54 |
This PR implements parts of #40. The code for OpenCL versions 1.1 and 1.2 is conditionally loaded if a platform is found that supports them.
Changes:
@ocl_func_deprecated
@ocl_func_1X
and changes@ocl_func
to evaluate the expr in the api module@has_ocl12?
macros