CozyCL is a very simple, minimalist OpenCL library. You can run programs on your graphics card pretty easily with it, without the need to know anything about the data types of the base libraries (at least for the host program). When I started to learn about GPU programming in the previous weeks, I found even the most handy C++ bindings pretty time-consuming for a beginner, who is mostly interested in getting positive feedback and sense of achievement after a couple of initial attempts.
When raising exceptions it is good to make their error texts as detailed as possible. Usually this isn’t an easy task, cause it involves type conversions and string operations. This is why I’ve implemented this class, which can be instantiated by printf-like parameters as easily as this line: throw(new FException("Invalid tag: ‘%s’. At line: %d.", tag, line));
The Intel Threading Building Blocks library (TBB) is a useful cross-platform C++ library, which contains many high and low level tools for developing multi-threaded applications. One feature I required but couldn’t find in TBB is a class similar to AutoResetEvent in the .NET framework. That class allows simple synchronization of two threads. One of them is waiting the event to be triggered, while the other triggers the event at a point. I have implemented this class in C++, using atomic operations from TBB, which guaranties that if the two threads are running on different cores, then their caches get synced