never interrupt global benchmark with found nonces
fix some algo weird hashrates (like blake)
and reset device between algos, for better accuracy
but this reset doesnt seems enough to bench all algos correctly...
to test on linux, could be a driver issue...
heavy: fix first alloc and indent with tabs...
@ -153,14 +153,12 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -153,14 +153,12 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
// für jeden Hash ein individuelles Target erstellen basierend
// auf dem höchsten Bit, das in ptarget gesetzt ist.
@ -173,6 +171,8 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -173,6 +171,8 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
if (!init[thr_id])
{
cudaSetDevice(device_map[thr_id]);
hefty_cpu_init(thr_id, throughput);
sha256_cpu_init(thr_id, throughput);
keccak512_cpu_init(thr_id, throughput);
@ -185,13 +185,16 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -185,13 +185,16 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
init[thr_id] = true;
}
// weird but require at least one cudaSetDevice first
applog(LOG_WARNING, "Your block reward vote (%hu) exceeds the maxvote reported by the pool (%hu).",
opt_vote, maxvote);
}
@ -257,7 +260,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -257,7 +260,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@ -275,8 +278,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -275,8 +278,7 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
for (uint32_t i=0; i < actualNumberOfValuesInNonceVectorGPU; i++)
{
@ -289,7 +291,6 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -289,7 +291,6 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
if (memcmp(vhash, foundhash, 32)) {
gpulog(LOG_WARNING, thr_id, "result for %08x does not validate on CPU!", nonce);
} else {
*hashes_done = pdata[19] - first_nonce;
work_set_target_ratio(work, vhash);
rc = 1;
goto exit;
@ -299,15 +300,21 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
@@ -299,15 +300,21 @@ int scanhash_heavy(int thr_id, struct work *work, uint32_t max_nonce, unsigned l
}
emptyNonceVector:
if ((uint64_t) throughput + pdata[19] >= max_nonce) {
pdata[19] = max_nonce;
break;
}
pdata[19] += throughput;
} while (pdata[19] < max_nonce && !work_restart[thr_id].restart);