mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-13 06:31:51 +00:00
Queueing all kernel parameters dramatically reduces stale block rates.
This commit is contained in:
parent
7ae9afc40f
commit
e2fb3e84cb
10
cpu-miner.c
10
cpu-miner.c
@ -1043,14 +1043,10 @@ static void *gpuminer_thread(void *userdata)
|
|||||||
applog(LOG_DEBUG, "getwork thread %d", thr_id);
|
applog(LOG_DEBUG, "getwork thread %d", thr_id);
|
||||||
/* Flushes the writebuffer set with CL_FALSE above */
|
/* Flushes the writebuffer set with CL_FALSE above */
|
||||||
clFinish(clState->commandQueue);
|
clFinish(clState->commandQueue);
|
||||||
status = queue_kernel_parameters(clState, &work->blk);
|
|
||||||
if (unlikely(status != CL_SUCCESS))
|
|
||||||
{ applog(LOG_ERR, "Error: clSetKernelArg of all params failed."); goto out; }
|
|
||||||
} else {
|
|
||||||
status = clSetKernelArg(*kernel, 14, sizeof(uint), (void *)&work->blk.nonce);
|
|
||||||
if (unlikely(status != CL_SUCCESS))
|
|
||||||
{ applog(LOG_ERR, "Error: clSetKernelArg of nonce failed."); goto out; }
|
|
||||||
}
|
}
|
||||||
|
status = queue_kernel_parameters(clState, &work->blk);
|
||||||
|
if (unlikely(status != CL_SUCCESS))
|
||||||
|
{ applog(LOG_ERR, "Error: clSetKernelArg of all params failed."); goto out; }
|
||||||
|
|
||||||
/* MAXBUFFERS entry is used as a flag to say nonces exist */
|
/* MAXBUFFERS entry is used as a flag to say nonces exist */
|
||||||
if (res[MAXBUFFERS]) {
|
if (res[MAXBUFFERS]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user