table of contents
CLSETUSEREVENTSTATUS(3clc) | OpenCL Manual | CLSETUSEREVENTSTATUS(3clc) |
NAME¶
clSetUserEventStatus - Sets the execution status of a user event object.
¶
cl_int clSetUserEventStatus(cl_event event, cl_int execution_status);
PARAMETERS¶
event
execution_status
NOTES¶
Enqueued commands that specify user events in the event_wait_list argument of clEnqueue*** commands must ensure that the status of these user events being waited on are set using clSetUserEventStatus before any OpenCL APIs that release OpenCL objects except for event objects are called; otherwise the behavior is undefined.
ERRORS¶
Returns CL_SUCCESS if the function was executed successfully. Otherwise, it returns one of the following errors
Example¶
For example, the following code sequence will result in undefined behavior of clReleaseMemObject(3clc).
ev1 = clCreateUserEvent(ctx, NULL); clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL; clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...); clReleaseMemObject(buf2); clSetUserEventStatus(ev1, CL_COMPLETE); |
The following code sequence, however, works correctly.
ev1 = clCreateUserEvent(ctx, NULL); clEnqueueWriteBuffer(cq, buf1, CL_FALSE, ..., 1, &ev1, NULL; clEnqueueWriteBuffer(cq, buf2, CL_FALSE,...); clSetUserEventStatus(ev1, CL_COMPLETE); clReleaseMemObject(buf2); |
SPECIFICATION¶
OpenCL Specification[1]
SEE ALSO¶
clCreateUserEvent(3clc)
AUTHORS¶
The Khronos Group
COPYRIGHT¶
Copyright © 2007-2011 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to the
condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.
NOTES¶
- 1.
- OpenCL Specification
01/14/2021 | The Khronos Group |