瀏覽代碼

tests/datawizard/: synchronise opencl queues

Nathalie Furmento 13 年之前
父節點
當前提交
252d28171c
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      tests/datawizard/wt_broadcast.c
  2. 1 0
      tests/datawizard/wt_host.c

+ 1 - 0
tests/datawizard/wt_broadcast.c

@@ -46,6 +46,7 @@ static void increment_opencl_kernel(void *descr[], void *cl_arg __attribute__((u
 	clEnqueueReadBuffer(queue, d_token, CL_TRUE, 0, sizeof(unsigned), (void *)&h_token, 0, NULL, NULL);
 	h_token++;
 	clEnqueueWriteBuffer(queue, d_token, CL_TRUE, 0, sizeof(unsigned), (void *)&h_token, 0, NULL, NULL);
+	clFinish(queue);
 }
 #endif
 

+ 1 - 0
tests/datawizard/wt_host.c

@@ -46,6 +46,7 @@ static void increment_opencl_kernel(void *descr[], void *cl_arg __attribute__((u
 	clEnqueueReadBuffer(queue, d_token, CL_TRUE, 0, sizeof(unsigned), (void *)&h_token, 0, NULL, NULL);
 	h_token++;
 	clEnqueueWriteBuffer(queue, d_token, CL_TRUE, 0, sizeof(unsigned), (void *)&h_token, 0, NULL, NULL);
+	clFinish(queue);
 }
 #endif