From e2fb3e84cb208edd6419e8eb07a671b09ff3b4c9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 1 Jul 2011 20:34:22 +1000 Subject: [PATCH] Queueing all kernel parameters dramatically reduces stale block rates. --- cpu-miner.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cpu-miner.c b/cpu-miner.c index a74575f0..f32b8023 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -1043,14 +1043,10 @@ static void *gpuminer_thread(void *userdata) applog(LOG_DEBUG, "getwork thread %d", thr_id); /* Flushes the writebuffer set with CL_FALSE above */ 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 */ if (res[MAXBUFFERS]) {