Commit bf427de3ac749546fd91194de1a651a14726eb45

ckolivas 2012-07-11T23:05:10

Time opencl work from start of queueing a kernel till it's flushed when calculating dynamic intensity.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/driver-opencl.c b/driver-opencl.c
index 91e43ff..10b20a4 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1355,7 +1355,6 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
 	int64_t hashes;
 
 	/* This finish flushes the readbuffer set with CL_FALSE later */
-	gettimeofday(&gpu->tv_gpustart, NULL);
 	clFinish(clState->commandQueue);
 	gettimeofday(&gpu->tv_gpuend, NULL);
 
@@ -1411,6 +1410,8 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
 		clFinish(clState->commandQueue);
 	}
 
+	gettimeofday(&gpu->tv_gpustart, NULL);
+
 	if (clState->goffset) {
 		size_t global_work_offset[1];