Browse Source

diff: use the new function in all algos

master
Tanguy Pruvot 9 years ago
parent
commit
ee93927fac
  1. 2
      Algo256/bmw.cu
  2. 2
      Algo256/keccak256.cu
  3. 4
      JHA/jackpotcoin.cu
  4. 4
      cuda_nist5.cu
  5. 2
      fuguecoin.cpp
  6. 2
      groestlcoin.cpp
  7. 2
      heavy/heavy.cu
  8. 4
      lyra2/lyra2RE.cu
  9. 4
      lyra2/lyra2REv2.cu
  10. 2
      myriadgroestl.cpp
  11. 2
      neoscrypt/neoscrypt.cpp
  12. 4
      pentablake.cu
  13. 2
      quark/quarkcoin.cu
  14. 4
      qubit/deep.cu
  15. 2
      qubit/luffa.cu
  16. 4
      qubit/qubit.cu
  17. 4
      skein.cu
  18. 4
      skein2.cpp
  19. 2
      sph/sha2.c
  20. 4
      x11/c11.cu
  21. 4
      x11/fresh.cu
  22. 4
      x11/s3.cu
  23. 4
      x11/x11.cu
  24. 4
      x13/x13.cu
  25. 2
      x15/whirlpoolx.cu
  26. 4
      x15/x14.cu
  27. 4
      x15/x15.cu
  28. 4
      x17/x17.cu
  29. 4
      zr5.cu

2
Algo256/bmw.cu

@ -81,7 +81,7 @@ extern "C" int scanhash_bmw(int thr_id, struct work* work, uint32_t max_nonce, u @@ -81,7 +81,7 @@ extern "C" int scanhash_bmw(int thr_id, struct work* work, uint32_t max_nonce, u
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
*hashes_done = foundNonce - first_nonce + 1;
pdata[19] = swab32_if(foundNonce,!swapnonce);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
return 1;
}
else {

2
Algo256/keccak256.cu

@ -75,7 +75,7 @@ extern "C" int scanhash_keccak256(int thr_id, struct work* work, uint32_t max_no @@ -75,7 +75,7 @@ extern "C" int scanhash_keccak256(int thr_id, struct work* work, uint32_t max_no
keccak256_hash(vhash64, endiandata);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[19] = foundNonce;
return 1;
}

4
JHA/jackpotcoin.cu

@ -221,12 +221,12 @@ extern "C" int scanhash_jackpot(int thr_id, struct work *work, uint32_t max_nonc @@ -221,12 +221,12 @@ extern "C" int scanhash_jackpot(int thr_id, struct work *work, uint32_t max_nonc
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
nist5hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
cuda_nist5.cu

@ -133,12 +133,12 @@ extern "C" int scanhash_nist5(int thr_id, struct work *work, uint32_t max_nonce, @@ -133,12 +133,12 @@ extern "C" int scanhash_nist5(int thr_id, struct work *work, uint32_t max_nonce,
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
nist5hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

2
fuguecoin.cpp

@ -77,7 +77,7 @@ int scanhash_fugue256(int thr_id, struct work* work, uint32_t max_nonce, unsigne @@ -77,7 +77,7 @@ int scanhash_fugue256(int thr_id, struct work* work, uint32_t max_nonce, unsigne
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget))
{
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
pdata[19] = foundNounce;
*hashes_done = foundNounce - start_nonce + 1;
return 1;

2
groestlcoin.cpp

@ -68,7 +68,7 @@ int scanhash_groestlcoin(int thr_id, struct work *work, uint32_t max_nonce, unsi @@ -68,7 +68,7 @@ int scanhash_groestlcoin(int thr_id, struct work *work, uint32_t max_nonce, unsi
groestlhash(vhash, endiandata);
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
pdata[19] = foundNounce;
free(outputHash);
return true;

2
heavy/heavy.cu

@ -279,7 +279,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l @@ -279,7 +279,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
applog(LOG_ERR, "hash for nonce %08x does not validate on CPU!\n", nonce);
} else {
*hashes_done = pdata[19] - first_nonce;
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
rc = 1;
goto exit;
}

4
lyra2/lyra2RE.cu

@ -136,7 +136,7 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce, @@ -136,7 +136,7 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = groestl256_getSecNonce(thr_id, 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != UINT32_MAX)
{
be32enc(&endiandata[19], secNonce);
@ -145,7 +145,7 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce, @@ -145,7 +145,7 @@ extern "C" int scanhash_lyra2(int thr_id, struct work* work, uint32_t max_nonce,
if (opt_debug)
applog(LOG_BLUE, "GPU #%d: found second nonce %08x", device_map[thr_id], secNonce);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
lyra2/lyra2REv2.cu

@ -141,14 +141,14 @@ extern "C" int scanhash_lyra2v2(int thr_id, struct work* work, uint32_t max_nonc @@ -141,14 +141,14 @@ extern "C" int scanhash_lyra2v2(int thr_id, struct work* work, uint32_t max_nonc
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget))
{
int res = 1;
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
// check if there was another one...
if (foundNonces[1] != 0)
{
be32enc(&endiandata[19], foundNonces[1]);
lyra2v2_hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = foundNonces[1];
res++;
}

2
myriadgroestl.cpp

@ -73,7 +73,7 @@ int scanhash_myriad(int thr_id, struct work *work, uint32_t max_nonce, unsigned @@ -73,7 +73,7 @@ int scanhash_myriad(int thr_id, struct work *work, uint32_t max_nonce, unsigned
endiandata[19] = swab32(foundNounce);
myriadhash(vhash, endiandata);
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
pdata[19] = foundNounce;
free(outputHash);
return 1;

2
neoscrypt/neoscrypt.cpp

@ -67,7 +67,7 @@ int scanhash_neoscrypt(int thr_id, struct work* work, uint32_t max_nonce, unsign @@ -67,7 +67,7 @@ int scanhash_neoscrypt(int thr_id, struct work* work, uint32_t max_nonce, unsign
neoscrypt((uchar*)vhash64, (uchar*) endiandata, 0x80000620U);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[19] = foundNonce;
return 1;
} else {

4
pentablake.cu

@ -416,13 +416,13 @@ extern "C" int scanhash_pentablake(int thr_id, struct work *work, uint32_t max_n @@ -416,13 +416,13 @@ extern "C" int scanhash_pentablake(int thr_id, struct work *work, uint32_t max_n
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
rc = 1;
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
if (extra_results[0] != UINT32_MAX) {
// Rare but possible if the throughput is big
be32enc(&endiandata[19], extra_results[0]);
pentablakehash(vhash, endiandata);
if (bn_hash_target_ratio(vhash, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
applog(LOG_NOTICE, "GPU found more than one result yippee!");
pdata[21] = extra_results[0];
extra_results[0] = UINT32_MAX;

2
quark/quarkcoin.cu

@ -239,7 +239,7 @@ extern "C" int scanhash_quark(int thr_id, struct work* work, uint32_t max_nonce, @@ -239,7 +239,7 @@ extern "C" int scanhash_quark(int thr_id, struct work* work, uint32_t max_nonce,
quarkhash(vhash64, endiandata);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[19] = foundNonce;
return 1;
} else {

4
qubit/deep.cu

@ -104,12 +104,12 @@ extern "C" int scanhash_deep(int thr_id, struct work* work, uint32_t max_nonce, @@ -104,12 +104,12 @@ extern "C" int scanhash_deep(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
deephash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

2
qubit/luffa.cu

@ -76,7 +76,7 @@ extern "C" int scanhash_luffa(int thr_id, struct work* work, uint32_t max_nonce, @@ -76,7 +76,7 @@ extern "C" int scanhash_luffa(int thr_id, struct work* work, uint32_t max_nonce,
luffa_hash(vhash64, endiandata);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[19] = foundNonce;
return 1;
} else {

4
qubit/qubit.cu

@ -132,12 +132,12 @@ extern "C" int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce, @@ -132,12 +132,12 @@ extern "C" int scanhash_qubit(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
qubithash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
skein.cu

@ -418,7 +418,7 @@ extern "C" int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_no @@ -418,7 +418,7 @@ extern "C" int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_no
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
int res = 1;
uint8_t num = res;
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
if (checkSecnonce) {
secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], num);
}
@ -431,7 +431,7 @@ extern "C" int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_no @@ -431,7 +431,7 @@ extern "C" int scanhash_skeincoin(int thr_id, struct work* work, uint32_t max_no
endiandata[19] = swab32_if(secNonce, swap);
skeincoinhash(vhash, endiandata);
if (bn_hash_target_ratio(vhash, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
pdata[19+res*2] = swab32_if(secNonce, !swap);
res++;
}

4
skein2.cpp

@ -89,7 +89,7 @@ int scanhash_skein2(int thr_id, struct work* work, uint32_t max_nonce, unsigned @@ -89,7 +89,7 @@ int scanhash_skein2(int thr_id, struct work* work, uint32_t max_nonce, unsigned
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
if (!opt_quiet)
applog(LOG_BLUE, "GPU #%d: found second nonce %08x !", device_map[thr_id], swab32(secNonce));
@ -97,7 +97,7 @@ int scanhash_skein2(int thr_id, struct work* work, uint32_t max_nonce, unsigned @@ -97,7 +97,7 @@ int scanhash_skein2(int thr_id, struct work* work, uint32_t max_nonce, unsigned
endiandata[19] = secNonce;
skein2hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = swab32(secNonce);
res++;
}

2
sph/sha2.c

@ -508,7 +508,7 @@ static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata, @@ -508,7 +508,7 @@ static inline int scanhash_sha256d_4way(int thr_id, uint32_t *pdata,
pdata[19] = data[4 * 3 + i];
sha256d_80_swap(hash, pdata);
if (fulltest(hash, ptarget)) {
bn_store_hash_target_ratio(hash, ptarget, work);
work_set_target_ratio(work, hash);
*hashes_done = n - first_nonce + 1;
return 1;
}

4
x11/c11.cu

@ -221,12 +221,12 @@ extern "C" int scanhash_c11(int thr_id, struct work* work, uint32_t max_nonce, u @@ -221,12 +221,12 @@ extern "C" int scanhash_c11(int thr_id, struct work* work, uint32_t max_nonce, u
int res = 1;
// check if there was some other ones...
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
c11hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x11/fresh.cu

@ -130,12 +130,12 @@ extern "C" int scanhash_fresh(int thr_id, struct work* work, uint32_t max_nonce, @@ -130,12 +130,12 @@ extern "C" int scanhash_fresh(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
fresh_hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x11/s3.cu

@ -112,12 +112,12 @@ extern "C" int scanhash_s3(int thr_id, struct work* work, uint32_t max_nonce, un @@ -112,12 +112,12 @@ extern "C" int scanhash_s3(int thr_id, struct work* work, uint32_t max_nonce, un
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
s3hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x11/x11.cu

@ -218,13 +218,13 @@ extern "C" int scanhash_x11(int thr_id, struct work* work, uint32_t max_nonce, u @@ -218,13 +218,13 @@ extern "C" int scanhash_x11(int thr_id, struct work* work, uint32_t max_nonce, u
int res = 1;
// check if there was some other ones...
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
*hashes_done = pdata[19] - first_nonce + throughput;
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
x11hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x13/x13.cu

@ -216,14 +216,14 @@ extern "C" int scanhash_x13(int thr_id, struct work* work, uint32_t max_nonce, u @@ -216,14 +216,14 @@ extern "C" int scanhash_x13(int thr_id, struct work* work, uint32_t max_nonce, u
if (vhash[7] <= ptarget[7] && fulltest(vhash, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
pdata[19] = foundNonce;
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
x13hash(vhash, endiandata);
pdata[21] = secNonce;
if (bn_hash_target_ratio(vhash, ptarget) > work->shareratio) {
bn_store_hash_target_ratio(vhash, ptarget, work);
work_set_target_ratio(work, vhash);
xchg(pdata[19], pdata[21]);
}
res++;

2
x15/whirlpoolx.cu

@ -80,7 +80,7 @@ extern "C" int scanhash_whirlx(int thr_id, struct work* work, uint32_t max_nonc @@ -80,7 +80,7 @@ extern "C" int scanhash_whirlx(int thr_id, struct work* work, uint32_t max_nonc
*hashes_done = pdata[19] - first_nonce + throughput;
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[19] = foundNonce;
return 1;
} else {

4
x15/x14.cu

@ -227,12 +227,12 @@ extern "C" int scanhash_x14(int thr_id, struct work* work, uint32_t max_nonce, @@ -227,12 +227,12 @@ extern "C" int scanhash_x14(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
x14hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x15/x15.cu

@ -239,12 +239,12 @@ extern "C" int scanhash_x15(int thr_id, struct work* work, uint32_t max_nonce, @@ -239,12 +239,12 @@ extern "C" int scanhash_x15(int thr_id, struct work* work, uint32_t max_nonce,
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
x15hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
x17/x17.cu

@ -263,12 +263,12 @@ extern "C" int scanhash_x17(int thr_id, struct work* work, uint32_t max_nonce, u @@ -263,12 +263,12 @@ extern "C" int scanhash_x17(int thr_id, struct work* work, uint32_t max_nonce, u
if (vhash64[7] <= Htarg && fulltest(vhash64, ptarget)) {
int res = 1;
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, pdata[19], d_hash[thr_id], 1);
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
if (secNonce != 0) {
be32enc(&endiandata[19], secNonce);
x17hash(vhash64, endiandata);
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
res++;
}

4
zr5.cu

@ -435,7 +435,7 @@ extern "C" int scanhash_zr5(int thr_id, struct work *work, @@ -435,7 +435,7 @@ extern "C" int scanhash_zr5(int thr_id, struct work *work,
zr5hash(vhash64, pdata);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
int res = 1;
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
uint32_t secNonce = cuda_check_hash_suppl(thr_id, throughput, oldp19, d_hash[thr_id], 1);
if (secNonce != 0) {
offset = secNonce - oldp19;
@ -446,7 +446,7 @@ extern "C" int scanhash_zr5(int thr_id, struct work *work, @@ -446,7 +446,7 @@ extern "C" int scanhash_zr5(int thr_id, struct work *work,
zr5hash(vhash64, tmpdata);
if (vhash64[7] <= ptarget[7] && fulltest(vhash64, ptarget)) {
if (bn_hash_target_ratio(vhash64, ptarget) > work->shareratio)
bn_store_hash_target_ratio(vhash64, ptarget, work);
work_set_target_ratio(work, vhash64);
pdata[21] = secNonce;
pdata[22] = pok;
res++;

Loading…
Cancel
Save