cl4d

所属分类:GPU/显卡
开发工具:D
文件大小:70KB
下载次数:0
上传日期:2014-12-02 18:04:28
上 传 者sh-1993
说明:  用D编程语言编写的OpenCL C API的面向对象包装器
(object-oriented wrapper for the OpenCL C API written in the D programming language)

文件列表:
CLGLInterop.d (10198, 2014-12-03)
LICENSE.txt (1412, 2014-12-03)
OpenCL.lib (11776, 2014-12-03)
cl4d (0, 2014-12-03)
cl4d\buffer.d (6892, 2014-12-03)
cl4d\c (0, 2014-12-03)
cl4d\c\cl.d (46130, 2014-12-03)
cl4d\c\cl_d3d10.d (3010, 2014-12-03)
cl4d\c\cl_d3d11.d (3024, 2014-12-03)
cl4d\c\cl_d3d9.d (3966, 2014-12-03)
cl4d\c\cl_dx9_media_sharing.d (2977, 2014-12-03)
cl4d\c\cl_ext.d (7118, 2014-12-03)
cl4d\c\cl_gl.d (3684, 2014-12-03)
cl4d\c\cl_gl_ext.d (1136, 2014-12-03)
cl4d\c\cl_platform.d (7319, 2014-12-03)
cl4d\c\opencl.d (155, 2014-12-03)
cl4d\commandqueue.d (50361, 2014-12-03)
cl4d\context.d (4140, 2014-12-03)
cl4d\device.d (10644, 2014-12-03)
cl4d\error.d (8229, 2014-12-03)
cl4d\event.d (8711, 2014-12-03)
cl4d\host.d (1659, 2014-12-03)
cl4d\image.d (9159, 2014-12-03)
cl4d\kernel.d (9747, 2014-12-03)
cl4d\memory.d (3235, 2014-12-03)
cl4d\package.d (423, 2014-12-03)
cl4d\platform.d (2827, 2014-12-03)
cl4d\program.d (12220, 2014-12-03)
cl4d\sampler.d (2194, 2014-12-03)
cl4d\wrapper.d (9511, 2014-12-03)
common.d (343, 2014-12-03)
dub.json (1064, 2014-12-03)
vectorAdd.d (2575, 2014-12-03)

Welcome ======= **cl4d** is an object-oriented wrapper for the [OpenCL](http://www.khronos.org/opencl/) C API written in the [D programming language](http://www.dlang.org/).\\ Since the package includes bindings to the C API, you may also directly write usual OpenCL code if you need to. You're welcome to contribute to the project. * test * file issues about bugs * send patches * whatever else License ======= The code is licensed under the terms of the Boost Software License 1.0. Build instructions ================== To use the package as dependency add following to you `dub.json` file: ```JSON "dependencies": { "cl4d": "~master" } ``` * The repo contains some sample modules for your guidance. To build them you can run following in repo root folder: ``` dub build --config=vector-example dub build --config=gl-example ``` * Note that cl4d uses Derelict dependencies for the OpenGL interoperability sample. * Be sure to always use the latest compiler version! * For maximal performance enable function inlining and set version NO_CL_EXCEPTIONS. Then direct calls to the C API are performed. If you additionally use proper dead code elimination (e.g. [gdc](https://bitbucket.org/goshawk/gdc)'s -ffunction-sections -fdata-sections -Wl,--gc-sections) or [LTO](http://en.wikipedia.org/wiki/Link-time_optimization) almost all of the wrapper code should disappear. Guidelines ========== The philosophy behind cl4d is to provide a thin layer on top of the C API which makes working with OpenCL less painful by harnessing D's linguistic power. Unlike the official C++ bindings I still try to wrap the C API as good as possible, e.g. object properties are properly exposed as such so you don't have to call something like getInfo!cl_uint(CL_KERNEL_NUM_ARGS) all the time. The cumbersome C error handling is replaced by proper exception handling. Each OpenCL error gets its own Exception class so it is possible to selectively catch them as needed. Also expressive error messages are given. You may use version=NO_CL_EXCEPTIONS or version=BASIC_CL_EXCEPTIONS to reduce the EH overhead. Reference counts are automatically managed via (copy) constructors and destructors. Collections of CL objects are handled by a dedicated structure so you won't ever need to deal with pointers at all. There are no external dependencies and calls to the standard library are kept at a minimum.

近期下载者

相关文件


收藏者