This post contains maintained headers for OpenCL, usable both for OpenCL 1.0 and OpenCL 1.1 applications.
It consists of official headers translations, named:
- opencl.tBasicU
- cl.tBasicU
- cl_ext.tBasicU
- cl_platform.tBasicU
- cl_gl.tBasicU
- cl_gl_ext.tBasicU
Then there are two headers I added for more coding comfort:
- cl_thinBasic_ext.tBasicU - adds low level functionality
- cl_thinBasic_highlevel.tBasicU - adds high level functionality for RAD
The new headers offer multiple advantages over my previous release from past year:
- OpenCL 1.1 functionality added
- Pointer parameters in C originals are handled via ByRef in ThinBASIC. If you still want to pass pointer, just use ByVal override.
- OpenCL types are ported as tCL_* (cl_mem becomes tCL_mem). The original names could not be preserved, as they would collide due to fact ThinBASIC is not case sensitive. I think it is still better than previous long type_cl_ prefix.
- Constants are ported as they are in C, no % is added, making the adaptation of codes from C originals smoother
- Some bugs in original translation fixed
- Extensions changed from Inc to tBasicU
Important note: Please unzip the attachement to your ThinBASIC/Inc directory.
I hope the headers serve you well, and wish you all happy GPGPU coding!
Petr
Last edited by Petr Schreiber; 15-09-2011 at 11:00.
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
- Updated the clImageGet4ByteStringTHINBASIC function from cl_thinbasic_ext.tBasicU to return images in original quality.
This positively affects the OpenCL: Image Processing Test sample, which can now process bigger images without quality loss.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks