Author

Topic: Primecoin GPU miner implementation brainstorming thread (Read 2263 times)

legendary
Activity: 1713
Merit: 1029
I haven't really delved into the code much yet, but basically the prime chain has to have it's smallest element's average (1 less than, or one more than) a multiple of the block hash? Right?
sr. member
Activity: 280
Merit: 250
Ok... this is to start a brainstorming thread on how to code up a GPU miner for Primecoin.

The code in question resides here:  https://github.com/primecoin/primecoin/blob/master/src/prime.cpp

line 341; MineProbablePrimeChain method

runs Sieve of Eratosthenes:   psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, block.GetHeaderHash(), bnFixedMultiplier));    

then a while loop:

while (nCurrent - nStart < 10000 && nCurrent >= nStart && pindexPrev == pindexBest)   over 10,000 primes.

looking for anything that fulfills this criteria:

if (ProbablePrimeChainTest(bnChainOrigin, block.nBits, false, nChainLengthCunningham1, nChainLengthCunningham2, nChainLengthBiTwin))        

simple enough!

someone should have a GPU implementation by the end of the day today!

There's enough people on this board smart enough too impalement it,  but not release it till they no longer have a massive advantage or a sustained nose dive in trade value. IMO
sr. member
Activity: 415
Merit: 250
hero member
Activity: 784
Merit: 500
You should also post this in the according mining board.

sr. member
Activity: 294
Merit: 250
Ok... this is to start a brainstorming thread on how to code up a GPU miner for Primecoin.

The code in question resides here:  https://github.com/primecoin/primecoin/blob/master/src/prime.cpp

line 341; MineProbablePrimeChain method

runs Sieve of Eratosthenes:   psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, block.GetHeaderHash(), bnFixedMultiplier));     

then a while loop:

while (nCurrent - nStart < 10000 && nCurrent >= nStart && pindexPrev == pindexBest)   over 10,000 primes.

looking for anything that fulfills this criteria:

if (ProbablePrimeChainTest(bnChainOrigin, block.nBits, false, nChainLengthCunningham1, nChainLengthCunningham2, nChainLengthBiTwin))       

simple enough!

someone should have a GPU implementation by the end of the day today!
Jump to: