__kernel void clearCounter (
__global uint4 * counters,
__global uint4 * res) {
uint gId = get_global_id(0);
counters[gId] = (uint4) 0;
if (gId == 0) {
res[0] = (uint4) 0;
}
}
https://github.com/BeamMW/opencl-minerWell depends if you want the miner to keep working ^^
That kernel is fairly simple and just cleans up the counter array for the next rounds. If you like to start writing an own miner I would give a look to the later rounds code - performance of this here is negligible compared to the rest.
By the way the sources of the Beam OS miner is of cause close to lolMiner since I wrote both

But the OS miner is free to use and to modify by any one (someone observed bMiner having similar speed as the beam os miner? ^^)
Anyways, stopping now for today here. Have a good night or day all (where ever you are)