'\" t .\" Title: clGetEventInfo .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLGETEVENTINFO" "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" clGetEventInfo \- Returns information about the event object\&. .SH "" .HP \w'cl_int\ clGetEventInfo('u .BI "cl_int clGetEventInfo(cl_event\ " "event" ", cl_event_info\ " "param_name" ", size_t\ " "param_value_size" ", void\ *" "param_value" ", size_t\ *" "param_value_size_ret" ");" .SH "PARAMETERS" .PP \fI event \fR .RS 4 Specifies the event object being queried\&. .RE .PP \fIparam_value \fR .RS 4 A pointer to memory where the appropriate result being queried is returned\&. If \fIparam_value\fR is NULL, it is ignored\&. .RE .PP \fIparam_value_size \fR .RS 4 Specifies the size in bytes of memory pointed to by \fIparam_value\fR\&. This size must be ≥ size of the return type as described in the table below\&. .RE .PP \fIparam_value_size_ret \fR .RS 4 Returns the actual size in bytes of data copied to \fIparam_value\fR\&. If \fIparam_value_size_ret\fR is NULL, it is ignored\&. .RE .PP \fIparam_name \fR .RS 4 Specifies the information to query\&. The list of supported \fIparam_name\fR types and the information returned in \fIparam_value\fR by \fBclGetEventInfo\fR is described in the table below: .TS allbox tab(:); lB lB lB. T{ cl_event_info T}:T{ Return Type T}:T{ Information returned in \fIparam_value\fR T} .T& l l l l l l l l l l l l l l l. T{ \fBCL_EVENT_COMMAND_QUEUE\fR T}:T{ cl_command_queue T}:T{ Return the command\-queue associated with \fIevent\fR\&. For user event objects, a NULL value is returned\&. T} T{ \fBCL_EVENT_CONTEXT\fR T}:T{ cl_context T}:T{ Return the context associated with \fIevent\fR\&. T} T{ \fBCL_EVENT_COMMAND_TYPE\fR T}:T{ cl_command_type T}:T{ Return the command associated with \fIevent\fR\&. Can be one of the following values: .if n \{\ .RS 4 .\} .nf \fBCL_COMMAND_NDRANGE_KERNEL CL_COMMAND_TASK CL_COMMAND_NATIVE_KERNEL CL_COMMAND_READ_BUFFER CL_COMMAND_WRITE_BUFFER CL_COMMAND_COPY_BUFFER CL_COMMAND_READ_IMAGE CL_COMMAND_WRITE_IMAGE CL_COMMAND_COPY_IMAGE CL_COMMAND_COPY_BUFFER_TO_IMAGE CL_COMMAND_COPY_IMAGE_TO_BUFFER CL_COMMAND_MAP_BUFFER CL_COMMAND_MAP_IMAGE CL_COMMAND_UNMAP_MEM_OBJECT CL_COMMAND_MARKER CL_COMMAND_ACQUIRE_GL_OBJECTS CL_COMMAND_RELEASE_GL_OBJECTS CL_COMMAND_READ_BUFFER_RECT CL_COMMAND_WRITE_BUFFER_RECT CL_COMMAND_COPY_BUFFER_RECT CL_COMMAND_USER CL_COMMAND_BARRIER CL_COMMAND_MIGRATE_MEM_OBJECTS CL_COMMAND_FILL_BUFFER CL_COMMAND_FILL_IMAGE CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR\fR (if \fBcl_khr_gl_event\fR(3clc) is enabled) \fBCL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR\fR (if \fBcl_khr_d3d10_sharing\fR(3clc) is enabled) \fBCL_COMMAND_RELEASE_D3D10_OBJECTS_KHR\fR (if \fBcl_khr_d3d10_sharing\fR(3clc) is enabled) \fBCL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR\fR (if \fBcl_khr_dx9_media_sharing\fR(3clc) is enabled) \fBCL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR\fR (if \fBcl_khr_dx9_media_sharing\fR(3clc) is enabled) \fBCL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR\fR (if \fBcl_khr_d3d11_sharing\fR(3clc) is enabled) \fBCL_COMMAND_RELEASE_D3D11_OBJECTS_KHR\fR (if \fBcl_khr_d3d11_sharing\fR(3clc) is enabled) .fi .if n \{\ .RE .\} .sp T} T{ \fBCL_EVENT_COMMAND_ EXECUTION_STATUS\fR T}:T{ cl_int T}:T{ Return the execution status of the command identified by \fIevent\fR\&. The valid values are: \fBCL_QUEUED\fR (command has been enqueued in the command\-queue), .sp \fBCL_SUBMITTED\fR (enqueued command has been submitted by the host to the device associated with the command\-queue), .sp \fBCL_RUNNING\fR (device is currently executing this command), .sp \fBCL_COMPLETE\fR (the command has completed), or .sp Error code given by a negative integer value\&. (command was abnormally terminated \(en this may be caused by a bad memory access etc\&.) These error codes come from the same set of error codes that are returned from the platform or runtime API calls as return values or \fIerrcode_ret\fR values\&. .sp The error code values are negative, and event state values are positive\&. The event state values are ordered from the largest value (\fBCL_QUEUED\fR) for the first or initial state to the smallest value (\fBCL_COMPLETE\fR or negative integer value) for the last or complete state\&. The value of \fBCL_COMPLETE\fR and \fBCL_SUCCESS\fR are the same\&. T} T{ \fBCL_EVENT_REFERENCE_COUNT\fR T}:T{ cl_uint T}:T{ Return the \fIevent\fR reference count\&. The reference count returned should be considered immediately stale\&. It is unsuitable for general use in applications\&. This feature is provided for identifying memory leaks\&. T} .TE .sp 1 .RE .SH "NOTES" .PP Using \fBclGetEventInfo\fR to determine if a command identified by \fIevent\fR has finished execution (i\&.e\&. \fBCL_EVENT_COMMAND_EXECUTION_STATUS\fR returns \fBCL_COMPLETE\fR) is not a synchronization point\&. There are no guarantees that the memory objects being modified by command associated with \fIevent\fR will be visible to other enqueued commands\&. .SH "ERRORS" .PP Returns CL_SUCCESS if the function executed successfully, or one of the errors below: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if \fIparam_name\fR is not valid, or if size in bytes specified by \fIparam_value_size\fR is < size of return type as described in the table above and \fIparam_value\fR is not NULL\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if information to query given in \fIparam_name\fR cannot be queried for event\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_EVENT if \fIevent\fR is not a valid \fIevent\fR object\&. .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 \fBclReleaseEvent\fR(3clc), \fBclRetainEvent\fR(3clc), \fBclWaitForEvents\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 180, section 5.9 - Event Objects .RE