| 1479 | // ---------------------------------------------------------------------------- |
| 1480 | |
| 1481 | void VanitySearch::getGPUStartingKeys(int thId, int groupSize, int nbThread, Int *keys, Point *p) { |
| 1482 | |
| 1483 | for (int i = 0; i < nbThread; i++) { |
| 1484 | if (rekey > 0) { |
| 1485 | keys[i].Rand(256); |
| 1486 | } else { |
| 1487 | keys[i].Set(&startKey); |
| 1488 | Int offT((uint64_t)i); |
| 1489 | offT.ShiftL(80); |
| 1490 | Int offG((uint64_t)thId); |
| 1491 | offG.ShiftL(112); |
| 1492 | keys[i].Add(&offT); |
| 1493 | keys[i].Add(&offG); |
| 1494 | } |
| 1495 | Int k(keys + i); |
| 1496 | // Starting key is at the middle of the group |
| 1497 | k.Add((uint64_t)(groupSize / 2)); |
| 1498 | p[i] = secp->ComputePublicKey(&k); |
| 1499 | if (startPubKeySpecified) |
| 1500 | p[i] = secp->AddDirect(p[i], startPubKey); |
| 1501 | } |
| 1502 | |
| 1503 | } |
| 1504 | |
| 1505 | void VanitySearch::FindKeyGPU(TH_PARAM *ph) { |
| 1506 | |