Try it. I used only 1 nbThread to check the GPU code; you can even print points from the GPU using the printf() function, preloading fixed repeating even or odd ones.
It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
if (isOdd == 0) { // 02
_GetHash160Comp(px, isOdd, (uint8_t *)h);
CHECK_POINT(h, incr, 0, true);
}
int prefix02Count = 0; // Counter for keys starting with '02' //for debug only
int prefix03Count = 0; // Counter for keys starting with '03' //for debug only
for (int i = 0; i < nbThread; i++) {
tRangeEnd2.Set(&tRangeStart2);
tRangeEnd2.Add(&tRangeDiff);
if (rKey <= 0)
keys[i].Set(&tRangeStart2);
else
keys[i].Rand(&tRangeEnd2);
tRangeStart2.Add(&tRangeDiff);
Int k(keys + i);
k.Add((uint64_t)(groupSize / 2)); // Starting key is at the middle of the group
//p[i] = secp->ComputePublicKey(&k); //here we compute the public keys from the priv keys and store them in the p array
Point pubKey = secp->ComputePublicKey(&k); // Compute the public key
// Extract compressed public key bytes
unsigned char publicKeyBytes[33];
secp->GetPubKeyBytes(true, pubKey, publicKeyBytes);
// Check the prefix of the public key
if (publicKeyBytes[0] == 0x02) {
prefix02Count++;
p[i] = pubKey; // here we store in the array only the keys we want
//std::string pubKeyAddr = secp->GetPublicKeyHex(true, p[i]);
//printf("Public key %d: %s\n", i, pubKeyAddr.c_str()); //for debuging
} else if (publicKeyBytes[0] == 0x03) {
prefix03Count++;
}
}
// Calculate percentages
//double totalKeys = nbThread; //for debug only
//double percentage02 = (prefix02Count / totalKeys) * 100.0;
//double percentage03 = (prefix03Count / totalKeys) * 100.0;
//printf("Total number of keys generated: %d\n", nbThread);
//printf("Percentage of keys starting with '02': %.2f%%\n", percentage02);
//printf("Percentage of keys starting with '03': %.2f%%\n", percentage03);
...
getGPUStartingKeys(tRangeStart, tRangeEnd, g->GetGroupSize(), nbThread, keys, p);
ok = g->SetKeys(p); //will set only the keys we stored in p
....
if (isOdd == 0) { // 02
_GetHash160Comp(px, isOdd, (uint8_t *)h);
CHECK_POINT(h, incr, 0, true);
}