Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-updates > by-pkgid > fd8445e7e4d58b8cfe6e0150bd441ee1 > files > 1861

nvidia-cuda-toolkit-devel-6.5.14-6.1.mga5.nonfree.x86_64.rpm

.TH "Event Management" 3 "7 Aug 2014" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Event Management \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBCUresult\fP \fBcuEventCreate\fP (\fBCUevent\fP *phEvent, unsigned int Flags)"
.br
.RI "\fICreates an event. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuEventDestroy\fP (\fBCUevent\fP hEvent)"
.br
.RI "\fIDestroys an event. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuEventElapsedTime\fP (float *pMilliseconds, \fBCUevent\fP hStart, \fBCUevent\fP hEnd)"
.br
.RI "\fIComputes the elapsed time between two events. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuEventQuery\fP (\fBCUevent\fP hEvent)"
.br
.RI "\fIQueries an event's status. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuEventRecord\fP (\fBCUevent\fP hEvent, \fBCUstream\fP hStream)"
.br
.RI "\fIRecords an event. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuEventSynchronize\fP (\fBCUevent\fP hEvent)"
.br
.RI "\fIWaits for an event to complete. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\\brief event management functions of the low-level CUDA driver API (\fBcuda.h\fP)
.PP
This section describes the event management functions of the low-level CUDA driver application programming interface. 
.SH "Function Documentation"
.PP 
.SS "\fBCUresult\fP cuEventCreate (\fBCUevent\fP * phEvent, unsigned int Flags)"
.PP
Creates an event *phEvent with the flags specified via \fCFlags\fP. Valid flags include:
.IP "\(bu" 2
\fBCU_EVENT_DEFAULT\fP: Default event creation flag.
.IP "\(bu" 2
\fBCU_EVENT_BLOCKING_SYNC\fP: Specifies that the created event should use blocking synchronization. A CPU thread that uses \fBcuEventSynchronize()\fP to wait on an event created with this flag will block until the event has actually been recorded.
.IP "\(bu" 2
\fBCU_EVENT_DISABLE_TIMING\fP: Specifies that the created event does not need to record timing data. Events created with this flag specified and the \fBCU_EVENT_BLOCKING_SYNC\fP flag not specified will provide the best performance when used with \fBcuStreamWaitEvent()\fP and \fBcuEventQuery()\fP.
.IP "\(bu" 2
\fBCU_EVENT_INTERPROCESS\fP: Specifies that the created event may be used as an interprocess event by \fBcuIpcGetEventHandle()\fP. \fBCU_EVENT_INTERPROCESS\fP must be specified along with \fBCU_EVENT_DISABLE_TIMING\fP.
.PP
.PP
\fBParameters:\fP
.RS 4
\fIphEvent\fP - Returns newly created event 
.br
\fIFlags\fP - Event creation flags
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_OUT_OF_MEMORY\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventRecord\fP, \fBcuEventQuery\fP, \fBcuEventSynchronize\fP, \fBcuEventDestroy\fP, \fBcuEventElapsedTime\fP 
.RE
.PP

.SS "\fBCUresult\fP cuEventDestroy (\fBCUevent\fP hEvent)"
.PP
Destroys the event specified by \fChEvent\fP.
.PP
In case \fChEvent\fP has been recorded but has not yet been completed when \fBcuEventDestroy()\fP is called, the function will return immediately and the resources associated with \fChEvent\fP will be released automatically once the device has completed \fChEvent\fP.
.PP
\fBParameters:\fP
.RS 4
\fIhEvent\fP - Event to destroy
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventCreate\fP, \fBcuEventRecord\fP, \fBcuEventQuery\fP, \fBcuEventSynchronize\fP, \fBcuEventElapsedTime\fP 
.RE
.PP

.SS "\fBCUresult\fP cuEventElapsedTime (float * pMilliseconds, \fBCUevent\fP hStart, \fBCUevent\fP hEnd)"
.PP
Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds).
.PP
If either event was last recorded in a non-NULL stream, the resulting time may be greater than expected (even if both used the same stream handle). This happens because the \fBcuEventRecord()\fP operation takes place asynchronously and there is no guarantee that the measured latency is actually just between the two events. Any number of other different stream operations could execute in between the two measured events, thus altering the timing in a significant way.
.PP
If \fBcuEventRecord()\fP has not been called on either event then \fBCUDA_ERROR_INVALID_HANDLE\fP is returned. If \fBcuEventRecord()\fP has been called on both events but one or both of them has not yet been completed (that is, \fBcuEventQuery()\fP would return \fBCUDA_ERROR_NOT_READY\fP on at least one of the events), \fBCUDA_ERROR_NOT_READY\fP is returned. If either event was created with the \fBCU_EVENT_DISABLE_TIMING\fP flag, then this function will return \fBCUDA_ERROR_INVALID_HANDLE\fP.
.PP
\fBParameters:\fP
.RS 4
\fIpMilliseconds\fP - Time between \fChStart\fP and \fChEnd\fP in ms 
.br
\fIhStart\fP - Starting event 
.br
\fIhEnd\fP - Ending event
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_NOT_READY\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventCreate\fP, \fBcuEventRecord\fP, \fBcuEventQuery\fP, \fBcuEventSynchronize\fP, \fBcuEventDestroy\fP 
.RE
.PP

.SS "\fBCUresult\fP cuEventQuery (\fBCUevent\fP hEvent)"
.PP
Query the status of all device work preceding the most recent call to \fBcuEventRecord()\fP (in the appropriate compute streams, as specified by the arguments to \fBcuEventRecord()\fP).
.PP
If this work has successfully been completed by the device, or if \fBcuEventRecord()\fP has not been called on \fChEvent\fP, then \fBCUDA_SUCCESS\fP is returned. If this work has not yet been completed by the device then \fBCUDA_ERROR_NOT_READY\fP is returned.
.PP
For the purposes of Unified Memory, a return value of \fBCUDA_SUCCESS\fP is equivalent to having called \fBcuEventSynchronize()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIhEvent\fP - Event to query
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_NOT_READY\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventCreate\fP, \fBcuEventRecord\fP, \fBcuEventSynchronize\fP, \fBcuEventDestroy\fP, \fBcuEventElapsedTime\fP 
.RE
.PP

.SS "\fBCUresult\fP cuEventRecord (\fBCUevent\fP hEvent, \fBCUstream\fP hStream)"
.PP
Records an event. See note on NULL stream behavior. Since operation is asynchronous, \fBcuEventQuery\fP or \fBcuEventSynchronize()\fP must be used to determine when the event has actually been recorded.
.PP
If \fBcuEventRecord()\fP has previously been called on \fChEvent\fP, then this call will overwrite any existing state in \fChEvent\fP. Any subsequent calls which examine the status of \fChEvent\fP will only examine the completion of this most recent call to \fBcuEventRecord()\fP.
.PP
It is necessary that \fChEvent\fP and \fChStream\fP be created on the same context.
.PP
\fBParameters:\fP
.RS 4
\fIhEvent\fP - Event to record 
.br
\fIhStream\fP - Stream to record event for
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_INVALID_VALUE\fP 
.RE
.PP
\fBNote:\fP
.RS 4
This function uses standard  semantics. 
.PP
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventCreate\fP, \fBcuEventQuery\fP, \fBcuEventSynchronize\fP, \fBcuStreamWaitEvent\fP, \fBcuEventDestroy\fP, \fBcuEventElapsedTime\fP 
.RE
.PP

.SS "\fBCUresult\fP cuEventSynchronize (\fBCUevent\fP hEvent)"
.PP
Wait until the completion of all device work preceding the most recent call to \fBcuEventRecord()\fP (in the appropriate compute streams, as specified by the arguments to \fBcuEventRecord()\fP).
.PP
If \fBcuEventRecord()\fP has not been called on \fChEvent\fP, \fBCUDA_SUCCESS\fP is returned immediately.
.PP
Waiting for an event that was created with the \fBCU_EVENT_BLOCKING_SYNC\fP flag will cause the calling CPU thread to block until the event has been completed by the device. If the \fBCU_EVENT_BLOCKING_SYNC\fP flag has not been set, then the CPU thread will busy-wait until the event has been completed by the device.
.PP
\fBParameters:\fP
.RS 4
\fIhEvent\fP - Event to wait for
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcuEventCreate\fP, \fBcuEventRecord\fP, \fBcuEventQuery\fP, \fBcuEventDestroy\fP, \fBcuEventElapsedTime\fP 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen from the source code.