Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 3731

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

.TH "Event Management" 3 "24 Apr 2019" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Event Management \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEventCreate\fP (\fBcudaEvent_t\fP *event)"
.br
.RI "\fICreates an event object. \fP"
.ti -1c
.RI "__cudart_builtin__ \fBcudaError_t\fP \fBcudaEventCreateWithFlags\fP (\fBcudaEvent_t\fP *event, unsigned int flags)"
.br
.RI "\fICreates an event object with the specified flags. \fP"
.ti -1c
.RI "__cudart_builtin__ \fBcudaError_t\fP \fBcudaEventDestroy\fP (\fBcudaEvent_t\fP event)"
.br
.RI "\fIDestroys an event object. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEventElapsedTime\fP (float *ms, \fBcudaEvent_t\fP start, \fBcudaEvent_t\fP end)"
.br
.RI "\fIComputes the elapsed time between events. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEventQuery\fP (\fBcudaEvent_t\fP event)"
.br
.RI "\fIQueries an event's status. \fP"
.ti -1c
.RI "__cudart_builtin__ \fBcudaError_t\fP \fBcudaEventRecord\fP (\fBcudaEvent_t\fP event, \fBcudaStream_t\fP stream=0)"
.br
.RI "\fIRecords an event. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEventSynchronize\fP (\fBcudaEvent_t\fP event)"
.br
.RI "\fIWaits for an event to complete. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\\brief event management functions of the CUDA runtime API (cuda_runtime_api.h)
.PP
This section describes the event management functions of the CUDA runtime application programming interface. 
.SH "Function Documentation"
.PP 
.SS "\fBcudaError_t\fP cudaEventCreate (\fBcudaEvent_t\fP * event)"
.PP
Creates an event object for the current device using \fBcudaEventDefault\fP.
.PP
\fBParameters:\fP
.RS 4
\fIevent\fP - Newly created event
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorLaunchFailure\fP, \fBcudaErrorMemoryAllocation\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
\fBcudaEventCreate (C++ API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventRecord\fP, \fBcudaEventQuery\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP, \fBcudaEventElapsedTime\fP, \fBcudaStreamWaitEvent\fP, cuEventCreate 
.RE
.PP

.SS "__cudart_builtin__ \fBcudaError_t\fP cudaEventCreateWithFlags (\fBcudaEvent_t\fP * event, unsigned int flags)"
.PP
Creates an event object for the current device with the specified flags. Valid flags include:
.IP "\(bu" 2
\fBcudaEventDefault\fP: Default event creation flag.
.IP "\(bu" 2
\fBcudaEventBlockingSync\fP: Specifies that event should use blocking synchronization. A host thread that uses \fBcudaEventSynchronize()\fP to wait on an event created with this flag will block until the event actually completes.
.IP "\(bu" 2
\fBcudaEventDisableTiming\fP: Specifies that the created event does not need to record timing data. Events created with this flag specified and the \fBcudaEventBlockingSync\fP flag not specified will provide the best performance when used with \fBcudaStreamWaitEvent()\fP and \fBcudaEventQuery()\fP.
.IP "\(bu" 2
\fBcudaEventInterprocess\fP: Specifies that the created event may be used as an interprocess event by \fBcudaIpcGetEventHandle()\fP. \fBcudaEventInterprocess\fP must be specified along with \fBcudaEventDisableTiming\fP.
.PP
.PP
\fBParameters:\fP
.RS 4
\fIevent\fP - Newly created event 
.br
\fIflags\fP - Flags for new event
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorLaunchFailure\fP, \fBcudaErrorMemoryAllocation\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP, \fBcudaEventElapsedTime\fP, \fBcudaStreamWaitEvent\fP, cuEventCreate 
.RE
.PP

.SS "__cudart_builtin__ \fBcudaError_t\fP cudaEventDestroy (\fBcudaEvent_t\fP event)"
.PP
Destroys the event specified by \fCevent\fP.
.PP
An event may be destroyed before it is complete (i.e., while \fBcudaEventQuery()\fP would return \fBcudaErrorNotReady\fP). In this case, the call does not block on completion of the event, and any associated resources will automatically be released asynchronously at completion.
.PP
\fBParameters:\fP
.RS 4
\fIevent\fP - Event to destroy
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorLaunchFailure\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventQuery\fP, \fBcudaEventSynchronize\fP, \fBcudaEventRecord\fP, \fBcudaEventElapsedTime\fP, cuEventDestroy 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEventElapsedTime (float * ms, \fBcudaEvent_t\fP start, \fBcudaEvent_t\fP end)"
.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 \fBcudaEventRecord()\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 \fBcudaEventRecord()\fP has not been called on either event, then \fBcudaErrorInvalidResourceHandle\fP is returned. If \fBcudaEventRecord()\fP has been called on both events but one or both of them has not yet been completed (that is, \fBcudaEventQuery()\fP would return \fBcudaErrorNotReady\fP on at least one of the events), \fBcudaErrorNotReady\fP is returned. If either event was created with the \fBcudaEventDisableTiming\fP flag, then this function will return \fBcudaErrorInvalidResourceHandle\fP.
.PP
\fBParameters:\fP
.RS 4
\fIms\fP - Time between \fCstart\fP and \fCend\fP in ms 
.br
\fIstart\fP - Starting event 
.br
\fIend\fP - Ending event
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorNotReady\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorLaunchFailure\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventQuery\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP, \fBcudaEventRecord\fP, cuEventElapsedTime 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEventQuery (\fBcudaEvent_t\fP event)"
.PP
Queries the status of all work currently captured by \fCevent\fP. See \fBcudaEventRecord()\fP for details on what is captured by an event.
.PP
Returns \fBcudaSuccess\fP if all captured work has been completed, or \fBcudaErrorNotReady\fP if any captured work is incomplete.
.PP
For the purposes of Unified Memory, a return value of \fBcudaSuccess\fP is equivalent to having called \fBcudaEventSynchronize()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIevent\fP - Event to query
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorNotReady\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorLaunchFailure\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventRecord\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP, \fBcudaEventElapsedTime\fP, cuEventQuery 
.RE
.PP

.SS "__cudart_builtin__ \fBcudaError_t\fP cudaEventRecord (\fBcudaEvent_t\fP event, \fBcudaStream_t\fP stream = \fC0\fP)"
.PP
Captures in \fCevent\fP the contents of \fCstream\fP at the time of this call. \fCevent\fP and \fCstream\fP must be on the same device. Calls such as \fBcudaEventQuery()\fP or \fBcudaStreamWaitEvent()\fP will then examine or wait for completion of the work that was captured. Uses of \fCstream\fP after this call do not modify \fCevent\fP. See note on default stream behavior for what is captured in the default case.
.PP
\fBcudaEventRecord()\fP can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as \fBcudaStreamWaitEvent()\fP use the most recently captured state at the time of the API call, and are not affected by later calls to \fBcudaEventRecord()\fP. Before the first call to \fBcudaEventRecord()\fP, an event represents an empty set of work, so for example \fBcudaEventQuery()\fP would return \fBcudaSuccess\fP.
.PP
\fBParameters:\fP
.RS 4
\fIevent\fP - Event to record 
.br
\fIstream\fP - Stream in which to record event
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorLaunchFailure\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventQuery\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP, \fBcudaEventElapsedTime\fP, \fBcudaStreamWaitEvent\fP, cuEventRecord 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEventSynchronize (\fBcudaEvent_t\fP event)"
.PP
Waits until the completion of all work currently captured in \fCevent\fP. See \fBcudaEventRecord()\fP for details on what is captured by an event.
.PP
Waiting for an event that was created with the \fBcudaEventBlockingSync\fP flag will cause the calling CPU thread to block until the event has been completed by the device. If the \fBcudaEventBlockingSync\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
\fIevent\fP - Event to wait for
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorLaunchFailure\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
\fBcudaEventCreate (C API)\fP, \fBcudaEventCreateWithFlags\fP, \fBcudaEventRecord\fP, \fBcudaEventQuery\fP, \fBcudaEventDestroy\fP, \fBcudaEventElapsedTime\fP, cuEventSynchronize 
.RE
.PP

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