Browse Source

Get rid of unused last_work in opencl thread data.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
30ed3fb648
  1. 8
      driver-opencl.c

8
driver-opencl.c

@ -1311,7 +1311,6 @@ static void get_opencl_statline(char *buf, struct cgpu_info *gpu)
struct opencl_thread_data { struct opencl_thread_data {
cl_int (*queue_kernel_parameters)(_clState *, dev_blk_ctx *, cl_uint); cl_int (*queue_kernel_parameters)(_clState *, dev_blk_ctx *, cl_uint);
uint32_t *res; uint32_t *res;
struct work *last_work;
}; };
static uint32_t *blank_res; static uint32_t *blank_res;
@ -1550,15 +1549,8 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
applog(LOG_ERR, "Error: clEnqueueWriteBuffer failed."); applog(LOG_ERR, "Error: clEnqueueWriteBuffer failed.");
return -1; return -1;
} }
if (unlikely(thrdata->last_work)) {
applog(LOG_DEBUG, "GPU %d found something in last work?", gpu->device_id);
postcalc_hash_async(thr, thrdata->last_work, thrdata->res);
free_work(thrdata->last_work);
thrdata->last_work = NULL;
} else {
applog(LOG_DEBUG, "GPU %d found something?", gpu->device_id); applog(LOG_DEBUG, "GPU %d found something?", gpu->device_id);
postcalc_hash_async(thr, work, thrdata->res); postcalc_hash_async(thr, work, thrdata->res);
}
memset(thrdata->res, 0, BUFFERSIZE); memset(thrdata->res, 0, BUFFERSIZE);
/* This finish flushes the writebuffer set with CL_FALSE in clEnqueueWriteBuffer */ /* This finish flushes the writebuffer set with CL_FALSE in clEnqueueWriteBuffer */
clFinish(clState->commandQueue); clFinish(clState->commandQueue);

Loading…
Cancel
Save