MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / getGPUStartingKeys

Method getGPUStartingKeys

Vanity.cpp:1481–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479// ----------------------------------------------------------------------------
1480
1481void 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
1505void VanitySearch::FindKeyGPU(TH_PARAM *ph) {
1506

Callers

nothing calls this directly

Calls 6

RandMethod · 0.80
ShiftLMethod · 0.80
ComputePublicKeyMethod · 0.80
AddDirectMethod · 0.80
SetMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected