Commit f63aeab1fe02e6deaefc01b166c1f97dd800d35b

ckolivas 2012-08-22T10:33:40

gpu->hit should be reset on new work as well.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-opencl.c b/driver-opencl.c
index 500a9ea..a8744e2 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1536,7 +1536,7 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
 		gettimeofday(&gpu->tv_gpumid, NULL);
 		if (gpu->new_work) {
 			gpu->new_work = false;
-			gpu->intervals = 0;
+			gpu->intervals = gpu->hit = 0;
 		}
 		if (!gpu->intervals) {
 			gpu->tv_gpustart.tv_sec = gpu->tv_gpumid.tv_sec;