Parcourir la source

src/socl.h: directly use the "ev" argument of the "MAY_BLOCK_CUSTOM" macro.

	if ((blocking) == CL_TRUE) { \
		cl_event ev = (event);\
		soclWaitForEvents(1, &ev);\
	}

leads to the following code when calling MAY_BLOCK_CUSTOM(foo, ev):

if ((foo) == CL_TRUE) {
	cl_event ev = (ev);
	soclWaitForEvents(1, &ev);
}

with ev being used in its own initialization. This actually happened in soclEnqueueMapBuffer().
Cyril Roelandt il y a 13 ans
Parent
commit
2584621744
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      socl/src/socl.h

+ 1 - 2
socl/src/socl.h

@@ -100,8 +100,7 @@ struct _cl_platform_id {struct _cl_icd_dispatch *dispatch;};
 
 #define MAY_BLOCK_CUSTOM(blocking,event) \
 	if ((blocking) == CL_TRUE) {\
-		cl_event ev = (event);\
-		soclWaitForEvents(1, &ev);\
+		soclWaitForEvents(1, &(event));\
 	}
 
 /* Constants */