|
|
|
|
|
by jzwinck
3833 days ago
|
|
I haven't used OpenCL before. This library seemed sort of reasonable but I had some questions about whether it was really that much better than the native OpenCL API. So I found an OpenCL "hello world" program here: http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-r... Holy crap. The "kernel" code is basically the same, but the native API setup code (which that tutorial even calls "boiler plate") is insane, starting with the fact that the source code for the CL on-device program has to be passed as a string. There is no API to pass a filename--only a string containing the entire program source! |
|
Major problem with many of those libraries, including this one, is that, while they help you with hello world, they cripple the real-world functionality. All this low-level stuff that is there in the standard usually has its use. Of course it could and should be simpler, but most of those wrapper libraries guess too much and make many optimizations inaccessible or very hard to achieve.
The library that I wrote for Clojure (and Java), ClojureCL (http://clojurecl.uncomplicate.org) even supports OpenCL 2.0 (which is usually not supported in other libraries), while still allowing you all sorts of low-level performance optimizations accessible in the native C API, and is (in my opinion) rather simple to use compared to other libraries, and requires little boilerplate.