summaryrefslogtreecommitdiff
path: root/src/cl_event.h
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2013-09-17 16:10:01 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-09-18 13:11:44 +0800
commit99cba698400ed9aebf8bc252f382b1600118f5ab (patch)
tree986738dcbb522e564ddce38934fd6b552dc2872a /src/cl_event.h
parent2caef53e7a84a307a713dd0a24f9b13c2634512b (diff)
downloadbeignet-99cba698400ed9aebf8bc252f382b1600118f5ab.tar.gz
Implement clEnqueueMarker and clEnqueueBarrier.
Add some event info to cl_command_queue. One is non-complete user events, used to block marker event and barrier. After these events become CL_COMPLETE, the events blocked by these events also become CL_COMPLETE, so marker event will also set to CL_COMPLETE. If there is no user events, need wait last event complete and set marker event to complete. Add barrier_index, for clEnqueueBarrier, point to user events, indicate the enqueue apis follow clEnqueueBarrier should wait on how many user events. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_event.h')
-rw-r--r--src/cl_event.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cl_event.h b/src/cl_event.h
index 8523abea..7dde24b3 100644
--- a/src/cl_event.h
+++ b/src/cl_event.h
@@ -22,9 +22,9 @@
#include <semaphore.h>
-#include "cl_enqueue.h"
#include "cl_internals.h"
#include "cl_driver.h"
+#include "cl_enqueue.h"
#include "CL/cl.h"
#define CL_ENQUEUE_EXECUTE_IMM 0
@@ -81,12 +81,14 @@ cl_int cl_event_set_callback(cl_event, cl_int, EVENT_NOTIFY, void *);
/* Check events wait list for enqueue commonds */
cl_int cl_event_check_waitlist(cl_uint, const cl_event *, cl_event *, cl_context);
/* Wait the all events in wait list complete */
-cl_int cl_event_wait_events(cl_uint, const cl_event *);
+cl_int cl_event_wait_events(cl_uint, const cl_event *, cl_command_queue);
/* New a enqueue suspend task */
void cl_event_new_enqueue_callback(cl_event, enqueue_data *, cl_uint, const cl_event *);
/* Set the event status and call all callbacks */
void cl_event_set_status(cl_event, cl_int);
/* Check and update event status */
void cl_event_update_status(cl_event);
+/* Create the marker event */
+cl_int cl_event_marker(cl_command_queue, cl_event*);
#endif /* __CL_EVENT_H__ */