Pretty useful. There's a slight bug though with how the final histmat is created.
1. It is transposed when xnbin >= ynbin.
2. It is incorrectly indexed when ynbin > xnbin (because there is a difference in the index being row major and column major)
In addition to bug fixes, I've updated the framework to support CPU devices. Latest versions will always be at the project homepage: http://code.google.com/p/opencl-toolbox
But I'll make efforts to update this page too.