The simplest option (code wise) would be the original client and/or beer's older miners, because they are based on that. Just substitute the original momentum_search call with the one from this code. However, this solution is both ugly and hard to maintain. On Windows, compiling bitcoind is a major pain in the ass.
main.cpp (Protoshares')
uint256 CBlockHeader::CalculateBestBirthdayHash(CBlockIndex* pindexPrev, bool &outdated) {
uint256 midHash = GetMidHash();
//std::vector< std::pair<uint32_t,uint32_t> > results =bts::momentum_search( midHash, pindexPrev, &pindexBest);
std::vector< std::pair<uint32_t,uint32_t> > results;
OpenCLMiner::momentum_search((unsigned int*)&midHash, results);
(this is named momentum_search3 in momentum_gpu.cpp)
For Linux, the rest was implemented in
https://github.com/iruu/protoshares_momentum_opencl/blob/bitcoind_hack/opencl_hack.cpp(repeated midhash check is because beer would sometimes resend the same work)
Also, initializeOpenClMiner has to be called before using this.
Unfortunately, I deleted the immediately compilable Linux version along with the last ec2 gpu linux instance. I was editing the code in the shell to get it working as fast as possible (it was a fun time, earning $500/hour mining
), then it turned out Nvidia's OpenCL is so much slower on Linux that the whole thing was useless.