|
|
|
@ -281,8 +281,10 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
@@ -281,8 +281,10 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
|
|
|
|
|
const uint32_t *ptarget, uint32_t max_nonce, |
|
|
|
|
unsigned long *hashes_done, uint32_t maxvote, int blocklen) |
|
|
|
|
{ |
|
|
|
|
const uint32_t first_nonce = pdata[19]; /* to check */ |
|
|
|
|
// CUDA will process thousands of threads. |
|
|
|
|
const int throughput = 4096 * 128; |
|
|
|
|
int throughput = opt_work_size ? opt_work_size : (1 << 19); // 128*4096 |
|
|
|
|
throughput = min(throughput, max_nonce - first_nonce); |
|
|
|
|
|
|
|
|
|
if (opt_benchmark) |
|
|
|
|
((uint32_t*)ptarget)[7] = 0x000000ff; |
|
|
|
@ -296,8 +298,6 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
@@ -296,8 +298,6 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
|
|
|
|
|
int nrmCalls[6]; |
|
|
|
|
memset(nrmCalls, 0, sizeof(int) * 6); |
|
|
|
|
|
|
|
|
|
uint32_t start_nonce = pdata[19]; |
|
|
|
|
|
|
|
|
|
// für jeden Hash ein individuelles Target erstellen basierend |
|
|
|
|
// auf dem höchsten Bit, das in ptarget gesetzt ist. |
|
|
|
|
int highbit = findhighbit(ptarget, 8); |
|
|
|
@ -418,7 +418,7 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
@@ -418,7 +418,7 @@ int scanhash_heavy_cpp(int thr_id, uint32_t *pdata,
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
*hashes_done = pdata[19] - start_nonce; |
|
|
|
|
*hashes_done = pdata[19] - first_nonce; |
|
|
|
|
rc = 1; |
|
|
|
|
goto exit; |
|
|
|
|
} |
|
|
|
@ -432,7 +432,7 @@ emptyNonceVector:
@@ -432,7 +432,7 @@ emptyNonceVector:
|
|
|
|
|
pdata[19] += throughput; |
|
|
|
|
|
|
|
|
|
} while (pdata[19] < max_nonce && !work_restart[thr_id].restart); |
|
|
|
|
*hashes_done = pdata[19] - start_nonce; |
|
|
|
|
*hashes_done = pdata[19] - first_nonce; |
|
|
|
|
|
|
|
|
|
exit: |
|
|
|
|
cudaFreeHost(cpu_nonceVector); |
|
|
|
|