1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-22 20:44:49 +00:00

blake: some more KH/s on linux

This commit is contained in:
Tanguy Pruvot 2014-09-05 20:00:07 +02:00
parent 12fefe5de0
commit 3356e6f8bf

View File

@ -315,12 +315,6 @@ extern "C" int scanhash_blake256(int thr_id, uint32_t *pdata, const uint32_t *pt
for (int k=0; k < 20; k++) for (int k=0; k < 20; k++)
be32enc(&endiandata[k], pdata[k]); be32enc(&endiandata[k], pdata[k]);
if (opt_debug && !opt_quiet) {
applog(LOG_DEBUG, "throughput=%u, start=%x, max=%x, pdata=%08x...%08x",
throughput, first_nonce, max_nonce, endiandata[0], endiandata[7]);
applog_hash((unsigned char *)pdata);
}
be32enc(&endiandata[19], foundNonce); be32enc(&endiandata[19], foundNonce);
blake256hash(vhashcpu, endiandata, blakerounds); blake256hash(vhashcpu, endiandata, blakerounds);
@ -348,11 +342,14 @@ extern "C" int scanhash_blake256(int thr_id, uint32_t *pdata, const uint32_t *pt
exit_scan: exit_scan:
*hashes_done = pdata[19] - first_nonce + 1; *hashes_done = pdata[19] - first_nonce + 1;
// reset the device to allow multiple instances #if 0
/* reset the device to allow multiple instances
* could be made in cpu-miner... check later if required */
if (opt_n_threads == 1) { if (opt_n_threads == 1) {
CUDA_SAFE_CALL(cudaDeviceReset()); CUDA_SAFE_CALL(cudaDeviceReset());
init[thr_id] = false; init[thr_id] = false;
} }
#endif
// wait proper end of all threads // wait proper end of all threads
cudaDeviceSynchronize(); cudaDeviceSynchronize();
return rc; return rc;