Discover and explore top open-source AI tools and projects—updated daily.
ProjectPhysXLightweight OpenCL wrapper for simplified C++ development
Top 67.7% on SourcePulse
This project provides a C++ wrapper for OpenCL, aiming to simplify development by abstracting away boilerplate code and common complexities. It targets C++ developers who need to leverage GPU acceleration via OpenCL but find the native C++ bindings cumbersome. The wrapper offers a more streamlined API for device selection, memory management, and kernel execution, potentially reducing development time and improving code readability.
How It Works
The wrapper simplifies OpenCL by providing high-level C++ objects for Device, Memory, and Kernel. Device handles platform and device selection, including automatic compilation of embedded OpenCL C code and device-specific workarounds. Memory unifies host and device memory management, simplifying data transfers and tracking memory usage. Kernel abstracts kernel parameter linking and execution, allowing for chained calls and automatic error checking against parameter mismatches. OpenCL C code is embedded directly within C++ source files using a stringification macro, preserving syntax highlighting and simplifying the build process.
Quick Start & Requirements
make.sh (Linux/macOS/Android) or open OpenCL-Wrapper.sln in Visual Studio Community (Windows).Highlighted Details
Maintenance & Community
The project is maintained by ProjectPhysX. No specific community channels (Discord, Slack) or roadmap are explicitly mentioned in the README.
Licensing & Compatibility
The project appears to be licensed under the MIT License, which is permissive for commercial use and closed-source linking.
Limitations & Caveats
The README notes that unbalanced round brackets () and arbitrarily long string literals within the embedded OpenCL C code require specific handling using the )+R( syntax. Preprocessor replacement macros within the embedded code are not supported and must be passed as arguments to the Device constructor.
2 weeks ago
1 day
luminal-ai
tile-ai
bytecodealliance