'\" t .\" Title: clWaitForEvents .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLWAITFOREVENTS" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clWaitForEvents \- Waits on the host thread for commands identified by event objects to complete\&. .SH "" .HP \w'cl_int\ clWaitForEvents('u .BI "cl_int clWaitForEvents(cl_uint\ " "num_events" ", const\ cl_event\ *" "event_list" ");" .SH "PARAMETERS" .PP \fIevent_list\fR .RS 4 The events specified in \fIevent_list\fR act as synchronization points\&. .RE .SH "NOTES" .PP Waits on the host thread for commands identified by event objects in \fIevent_list\fR to complete\&. A command is considered complete if its execution status is \fBCL_COMPLETE\fR or a negative value\&. The events specified in \fIevent_list\fR act as synchronization points\&. .PP If the \fBcl_khr_gl_event\fR(3clc) extension is enabled, event objects can also be used to reflect the status of an OpenGL sync object\&. The sync object in turn refers to a fence command executing in an OpenGL command stream\&. This provides another method of coordinating sharing of buffers and images between OpenGL and OpenCL\&. .SH "ERRORS" .PP Returns CL_SUCCESS if the execution status of all events in \fIevent_list\fR is CL_COMPLETE\&. Otherwise, it returns one of the following errors: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if \fInum_events\fR is zero or \fIevent_list\fR is NULL\&.\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_CONTEXT if events specified in \fIevent_list\fR do not belong to the same context\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_EVENT if event objects specified in \fIevent_list\fR are not valid event objects\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the execution status of any of the events in \fIevent_list\fR is a negative integer value\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host\&. .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclGetEventInfo\fR(3clc), \fBclReleaseEvent\fR(3clc), \fBclRetainEvent\fR(3clc), \fBcl_khr_gl_event\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 179, section 5.9 - Event Objects .RE