diff options
author | Luo <xionghu.luo@intel.com> | 2014-06-13 11:17:34 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-06-13 16:58:40 +0800 |
commit | f01bbc99fb4e26a4a923bea80f9e78dc5542b9aa (patch) | |
tree | 6f23daa3a2b22730e07549a41e5c43b7c58bf8a8 /src/cl_command_queue.h | |
parent | 6caeef0ebb89cd97a88baf7c06ab28c1df37e0fa (diff) |
add [opencl-1.2] API clEnqueueBarrierWithWaitList.
This command blocks command execution, that is, any following commands
enqueued after it do not execute until it completes;
API clEnqueueMarkerWithWaitList patch didn't push the latest, update in
this patch.
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Signed-off-by: Luo <xionghu.luo@intel.com>
Conflicts:
src/cl_event.c
Diffstat (limited to 'src/cl_command_queue.h')
-rw-r--r-- | src/cl_command_queue.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cl_command_queue.h b/src/cl_command_queue.h index 40c272c5..b79d63ad 100644 --- a/src/cl_command_queue.h +++ b/src/cl_command_queue.h @@ -34,10 +34,12 @@ struct _cl_command_queue { uint64_t magic; /* To identify it as a command queue */ volatile int ref_n; /* We reference count this object */ cl_context ctx; /* Its parent context */ + cl_event* barrier_events; /* Point to array of non-complete user events that block this command queue */ + cl_int barrier_events_num; /* Number of Non-complete user events */ + cl_int barrier_events_size; /* The size of array that wait_events point to */ cl_event* wait_events; /* Point to array of non-complete user events that block this command queue */ cl_int wait_events_num; /* Number of Non-complete user events */ cl_int wait_events_size; /* The size of array that wait_events point to */ - cl_int barrier_index; /* Indicate event count in wait_events as barrier events */ cl_event last_event; /* The last event in the queue, for enqueue mark used */ cl_command_queue_properties props; /* Queue properties */ cl_command_queue prev, next; /* We chain the command queues together */ @@ -95,8 +97,9 @@ extern void cl_command_queue_insert_event(cl_command_queue, cl_event); /* Remove a user event from command's wait_events */ extern void cl_command_queue_remove_event(cl_command_queue, cl_event); -/* Set the barrier index */ -extern void cl_command_queue_set_barrier(cl_command_queue); +extern void cl_command_queue_insert_barrier_event(cl_command_queue queue, cl_event event); + +extern void cl_command_queue_remove_barrier_event(cl_command_queue queue, cl_event event); #endif /* __CL_COMMAND_QUEUE_H__ */ |