OSDN Git Service

modified: utilsrc/src/Admin/Makefile
[eos/others.git] / utiltools / X86MAC64 / cuda / doc / html / cuda-runtime-api / group__CUDART__EVENT.html
1 <!DOCTYPE html
2   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
4    <head>
5       <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
6       <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
7       <meta name="copyright" content="(C) Copyright 2005"></meta>
8       <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
9       <meta name="DC.Type" content="cppModule"></meta>
10       <meta name="DC.Title" content="Event Management"></meta>
11       <meta name="abstract" content=""></meta>
12       <meta name="description" content=""></meta>
13       <meta name="DC.Format" content="XHTML"></meta>
14       <meta name="DC.Identifier" content="group__CUDART__EVENT"></meta>
15       <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
16       <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
17       <title>CUDA Runtime API :: CUDA Toolkit Documentation</title>
18       <!--[if lt IE 9]>
19       <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
20       <![endif]-->
21       <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
22       <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
23       <link rel="canonical" href="http://docs.nvidia.com/cuda/cuda-runtime-api/index.html"></link>
24       <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
25    </head>
26    <body>
27       
28       <article id="contents">
29          <div id="breadcrumbs"><a href="group__CUDART__STREAM.html" shape="rect">&lt; Previous</a> | <a href="group__CUDART__EXECUTION.html" shape="rect">Next &gt;</a></div>
30          <div id="release-info">CUDA Runtime API
31             (<a href="../../pdf/CUDA_Runtime_API.pdf">PDF</a>)
32             -
33             CUDA Toolkit v5.5
34             (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
35             -
36             Last updated 
37             September 5, 2013
38             -
39             <a href="mailto:cudatools@nvidia.com?subject=CUDA Tools Documentation Feedback: cuda-runtime-api">Send Feedback</a></div>
40          <div class="topic reference apiRef apiPackage cppModule" id="group__CUDART__EVENT"><a name="group__CUDART__EVENT" shape="rect">
41                <!-- --></a><h2 class="topictitle2 cppModule">2.5.&nbsp;Event Management</h2>
42             <div class="section">
43                <p>This section describes the event management functions of the CUDA runtime application programming interface. </p>
44             </div>
45             <h3 class="fake_sectiontitle member_header">Functions</h3>
46             <dl class="members">
47                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" shape="rect">cudaEventCreate</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
48                <dd class="shortdesc"><span></span><span class="desc">Creates an event object. </span></dd>
49                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1gd5a65651969743246344618073717406" shape="rect">cudaEventCreateWithFlags</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
50                <dd class="shortdesc"><span></span><span class="desc">Creates an event object with the specified flags. </span></dd>
51                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" shape="rect">cudaEventDestroy</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
52                <dd class="shortdesc"><span></span><span class="desc">Destroys an event object. </span></dd>
53                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" shape="rect">cudaEventElapsedTime</a> (  float*<span>&nbsp;</span><span class="keyword keyword apiItemName">ms</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">start</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">end</span> ) </span></dt>
54                <dd class="shortdesc"><span></span><span class="desc">Computes the elapsed time between events. </span></dd>
55                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" shape="rect">cudaEventQuery</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
56                <dd class="shortdesc"><span></span><span class="desc">Queries an event's status. </span></dd>
57                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" shape="rect">cudaEventRecord</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">stream</span> = <span class="ph ph apiData">0</span> ) </span></dt>
58                <dd class="shortdesc"><span></span><span class="desc">Records an event. </span></dd>
59                <dt><span class="member_type"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" shape="rect">cudaEventSynchronize</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
60                <dd class="shortdesc"><span></span><span class="desc">Waits for an event to complete. </span></dd>
61             </dl>
62             <div class="description">
63                <h3 class="sectiontitle">Functions</h3>
64                <dl class="description">
65                   <dt class="description"><a name="group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" id="group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" shape="rect">
66                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventCreate (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
67                   <dd class="description">
68                      <div class="section">Creates an event object. </div>
69                      <div class="section">
70                         <h6 class="parameter_header">
71                            Parameters
72                            
73                         </h6>
74                         <dl class="table-display-params">
75                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
76                            <dd>- Newly created event</dd>
77                         </dl>
78                      </div>
79                      <div class="section">
80                         <h6 class="return_header">Returns</h6>
81                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</a></p>
82                      </div>
83                      <div class="section">
84                         <h6 class="description_header">Description</h6>
85                         <p>Creates an event object using <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6f8811acffcc133b5e4a50de6646d18e" shape="rect">cudaEventDefault</a>.
86                         </p>
87                         <p class="p"></p>
88                         <p class="p"></p>
89                         <p class="p">
90                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
91                            </div>
92                         </p>
93                         <p class="p"></p>
94                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
95                         <p class="p see_subsection">cudaEventCreate (C++ API), <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a></p>
96                         <p class="p"></p>
97                      </div>
98                   </dd>
99                   <dt class="description"><a name="group__CUDART__EVENT_1gd5a65651969743246344618073717406" id="group__CUDART__EVENT_1gd5a65651969743246344618073717406" shape="rect">
100                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventCreateWithFlags (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
101                   <dd class="description">
102                      <div class="section">Creates an event object with the specified flags. </div>
103                      <div class="section">
104                         <h6 class="parameter_header">
105                            Parameters
106                            
107                         </h6>
108                         <dl class="table-display-params">
109                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
110                            <dd>- Newly created event </dd>
111                            <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
112                            <dd>- Flags for new event</dd>
113                         </dl>
114                      </div>
115                      <div class="section">
116                         <h6 class="return_header">Returns</h6>
117                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</a></p>
118                      </div>
119                      <div class="section">
120                         <h6 class="description_header">Description</h6>
121                         <p>Creates an event object with the specified flags. Valid flags include:
122                            <ul class="ul">
123                               <li class="li">
124                                  <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6f8811acffcc133b5e4a50de6646d18e" shape="rect">cudaEventDefault</a>: Default event creation flag.
125                                  </p>
126                               </li>
127                               <li class="li">
128                                  <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g26509a522be9d449aa7c8c279612452d" shape="rect">cudaEventBlockingSync</a>: Specifies that event should use blocking synchronization. A host thread that uses <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize()</a> to wait on an event created with this flag will block until the event actually completes.
129                                  </p>
130                               </li>
131                               <li class="li">
132                                  <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a>: Specifies that the created event does not need to record timing data. Events created with this flag specified and the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g26509a522be9d449aa7c8c279612452d" shape="rect">cudaEventBlockingSync</a> flag not specified will provide the best performance when used with <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent()</a> and <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery()</a>.
133                                  </p>
134                               </li>
135                               <li class="li">
136                                  <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49ec9cd742f8a3f6fde4ee72a66326f6" shape="rect">cudaEventInterprocess</a>: Specifies that the created event may be used as an interprocess event by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g7d2e89a1b53fc087fafdded0aaf29062" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle()</a>. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49ec9cd742f8a3f6fde4ee72a66326f6" shape="rect">cudaEventInterprocess</a> must be specified along with <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a>.
137                                  </p>
138                               </li>
139                            </ul>
140                         </p>
141                         <p class="p"></p>
142                         <p class="p"></p>
143                         <p class="p">
144                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
145                            </div>
146                         </p>
147                         <p class="p"></p>
148                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
149                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a></p>
150                         <p class="p"></p>
151                      </div>
152                   </dd>
153                   <dt class="description"><a name="group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" id="group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" shape="rect">
154                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventDestroy (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
155                   <dd class="description">
156                      <div class="section">Destroys an event object. </div>
157                      <div class="section">
158                         <h6 class="parameter_header">
159                            Parameters
160                            
161                         </h6>
162                         <dl class="table-display-params">
163                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
164                            <dd>- Event to destroy</dd>
165                         </dl>
166                      </div>
167                      <div class="section">
168                         <h6 class="return_header">Returns</h6>
169                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a></p>
170                      </div>
171                      <div class="section">
172                         <h6 class="description_header">Description</h6>
173                         <p>Destroys the event specified by <tt class="ph tt code">event</tt>.
174                         </p>
175                         <p class="p">In case <tt class="ph tt code">event</tt> has been recorded but has not yet been completed when <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy()</a> is called, the function will return immediately and the resources associated with <tt class="ph tt code">event</tt> will be released automatically once the device has completed <tt class="ph tt code">event</tt>.
176                         </p>
177                         <p class="p"></p>
178                         <p class="p"></p>
179                         <p class="p">
180                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
181                            </div>
182                         </p>
183                         <p class="p"></p>
184                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
185                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a></p>
186                         <p class="p"></p>
187                      </div>
188                   </dd>
189                   <dt class="description"><a name="group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" id="group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" shape="rect">
190                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventElapsedTime (  float*<span>&nbsp;</span><span class="keyword keyword apiItemName">ms</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">start</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">end</span> ) </span></dt>
191                   <dd class="description">
192                      <div class="section">Computes the elapsed time between events. </div>
193                      <div class="section">
194                         <h6 class="parameter_header">
195                            Parameters
196                            
197                         </h6>
198                         <dl class="table-display-params">
199                            <dt><tt class="code"><span class="keyword keyword apiItemName">ms</span></tt></dt>
200                            <dd>- Time between <tt class="ph tt code">start</tt> and <tt class="ph tt code">end</tt> in ms 
201                            </dd>
202                            <dt><tt class="code"><span class="keyword keyword apiItemName">start</span></tt></dt>
203                            <dd>- Starting event </dd>
204                            <dt><tt class="code"><span class="keyword keyword apiItemName">end</span></tt></dt>
205                            <dd>- Ending event</dd>
206                         </dl>
207                      </div>
208                      <div class="section">
209                         <h6 class="return_header">Returns</h6>
210                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a></p>
211                      </div>
212                      <div class="section">
213                         <h6 class="description_header">Description</h6>
214                         <p>Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds).</p>
215                         <p class="p">If either event was last recorded in a non-NULL stream, the resulting time may be greater than expected (even if both used
216                            the same stream handle). This happens because the <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> operation takes place asynchronously and there is no guarantee that the measured latency is actually just between the two
217                            events. Any number of other different stream operations could execute in between the two measured events, thus altering the
218                            timing in a significant way.
219                         </p>
220                         <p class="p">If <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> has not been called on either event, then <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a> is returned. If <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> has been called on both events but one or both of them has not yet been completed (that is, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery()</a> would return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a> on at least one of the events), <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a> is returned. If either event was created with the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a> flag, then this function will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>.
221                         </p>
222                         <p class="p"></p>
223                         <p class="p"></p>
224                         <p class="p">
225                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
226                            </div>
227                         </p>
228                         <p class="p"></p>
229                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
230                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord</a></p>
231                         <p class="p"></p>
232                      </div>
233                   </dd>
234                   <dt class="description"><a name="group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" id="group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" shape="rect">
235                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventQuery (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
236                   <dd class="description">
237                      <div class="section">Queries an event's status. </div>
238                      <div class="section">
239                         <h6 class="parameter_header">
240                            Parameters
241                            
242                         </h6>
243                         <dl class="table-display-params">
244                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
245                            <dd>- Event to query</dd>
246                         </dl>
247                      </div>
248                      <div class="section">
249                         <h6 class="return_header">Returns</h6>
250                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a></p>
251                      </div>
252                      <div class="section">
253                         <h6 class="description_header">Description</h6>
254                         <p>Query the status of all device work preceding the most recent call to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> (in the appropriate compute streams, as specified by the arguments to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a>).
255                         </p>
256                         <p class="p">If this work has successfully been completed by the device, or if <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> has not been called on <tt class="ph tt code">event</tt>, then <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a> is returned. If this work has not yet been completed by the device then <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a> is returned.
257                         </p>
258                         <p class="p"></p>
259                         <p class="p"></p>
260                         <p class="p">
261                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
262                            </div>
263                         </p>
264                         <p class="p"></p>
265                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
266                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a></p>
267                         <p class="p"></p>
268                      </div>
269                   </dd>
270                   <dt class="description"><a name="group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" id="group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" shape="rect">
271                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventRecord (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">stream</span> = <span class="ph ph apiData">0</span> ) </span></dt>
272                   <dd class="description">
273                      <div class="section">Records an event. </div>
274                      <div class="section">
275                         <h6 class="parameter_header">
276                            Parameters
277                            
278                         </h6>
279                         <dl class="table-display-params">
280                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
281                            <dd>- Event to record </dd>
282                            <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
283                            <dd>- Stream in which to record event</dd>
284                         </dl>
285                      </div>
286                      <div class="section">
287                         <h6 class="return_header">Returns</h6>
288                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a></p>
289                      </div>
290                      <div class="section">
291                         <h6 class="description_header">Description</h6>
292                         <p>Records an event. If <tt class="ph tt code">stream</tt> is non-zero, the event is recorded after all preceding operations in <tt class="ph tt code">stream</tt> have been completed; otherwise, it is recorded after all preceding operations in the CUDA context have been completed. Since
293                            operation is asynchronous, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery()</a> and/or <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize()</a> must be used to determine when the event has actually been recorded.
294                         </p>
295                         <p class="p">If <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> has previously been called on <tt class="ph tt code">event</tt>, then this call will overwrite any existing state in <tt class="ph tt code">event</tt>. Any subsequent calls which examine the status of <tt class="ph tt code">event</tt> will only examine the completion of this most recent call to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a>.
296                         </p>
297                         <p class="p"></p>
298                         <p class="p"></p>
299                         <p class="p">
300                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
301                            </div>
302                         </p>
303                         <p class="p"></p>
304                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
305                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a></p>
306                         <p class="p"></p>
307                      </div>
308                   </dd>
309                   <dt class="description"><a name="group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" id="group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" shape="rect">
310                         <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaEventSynchronize (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
311                   <dd class="description">
312                      <div class="section">Waits for an event to complete. </div>
313                      <div class="section">
314                         <h6 class="parameter_header">
315                            Parameters
316                            
317                         </h6>
318                         <dl class="table-display-params">
319                            <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
320                            <dd>- Event to wait for</dd>
321                         </dl>
322                      </div>
323                      <div class="section">
324                         <h6 class="return_header">Returns</h6>
325                         <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038099def426efea2b2366d8d7ad09f974a" shape="rect">cudaErrorLaunchFailure</a></p>
326                      </div>
327                      <div class="section">
328                         <h6 class="description_header">Description</h6>
329                         <p>Wait until the completion of all device work preceding the most recent call to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> (in the appropriate compute streams, as specified by the arguments to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a>).
330                         </p>
331                         <p class="p">If <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> has not been called on <tt class="ph tt code">event</tt>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a> is returned immediately.
332                         </p>
333                         <p class="p">Waiting for an event that was created with the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g26509a522be9d449aa7c8c279612452d" shape="rect">cudaEventBlockingSync</a> flag will cause the calling CPU thread to block until the event has been completed by the device. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g26509a522be9d449aa7c8c279612452d" shape="rect">cudaEventBlockingSync</a> flag has not been set, then the CPU thread will busy-wait until the event has been completed by the device.
334                         </p>
335                         <p class="p"></p>
336                         <p class="p"></p>
337                         <p class="p">
338                            <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
339                            </div>
340                         </p>
341                         <p class="p"></p>
342                         <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
343                         <p class="p see_subsection"><a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" title="Creates an event object." shape="rect">cudaEventCreate ( C API)</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gd5a65651969743246344618073717406" title="Creates an event object with the specified flags." shape="rect">cudaEventCreateWithFlags</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" title="Computes the elapsed time between events." shape="rect">cudaEventElapsedTime</a></p>
344                         <p class="p"></p>
345                      </div>
346                   </dd>
347                </dl>
348             </div>
349          </div>
350          
351          <hr id="contents-end"></hr>
352          <div id="breadcrumbs"><a href="group__CUDART__STREAM.html" shape="rect">&lt; Previous</a> | <a href="group__CUDART__EXECUTION.html" shape="rect">Next &gt;</a></div>
353          <div id="release-info">CUDA Runtime API
354             (<a href="../../pdf/CUDA_Runtime_API.pdf">PDF</a>)
355             -
356             CUDA Toolkit v5.5
357             (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
358             -
359             Last updated 
360             September 5, 2013
361             -
362             <a href="mailto:cudatools@nvidia.com?subject=CUDA Tools Documentation Feedback: cuda-runtime-api">Send Feedback</a></div>
363          
364       </article>
365       
366       <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
367             <input type="text" name="search-text"></input><fieldset id="search-location">
368                <legend>Search In:</legend>
369                <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
370                <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
371             <button type="reset">clear search</button>
372             <button id="submit" type="submit">search</button></form>
373       </header>
374       <nav id="site-nav">
375          <div class="category closed"><span class="twiddle">▷</span><a href="../index.html" title="The root of the site.">CUDA Toolkit</a></div>
376          <ul class="closed">
377             <li><a href="../cuda-toolkit-release-notes/index.html" title="The Release Notes for the CUDA Toolkit from v4.0 to today.">Release Notes</a></li>
378             <li><a href="../eula/index.html" title="The End User License Agreements for the NVIDIA CUDA Toolkit, the NVIDIA CUDA Samples, the NVIDIA Display Driver, and NVIDIA NSight (Visual Studio Edition).">EULA</a></li>
379             <li><a href="../cuda-getting-started-guide-for-linux/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on GNU/Linux systems.">Getting Started Linux</a></li>
380             <li><a href="../cuda-getting-started-guide-for-mac-os-x/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on Mac OS X systems.">Getting Started Mac OS X</a></li>
381             <li><a href="../cuda-getting-started-guide-for-microsoft-windows/index.html" title="This guide discusses how to install and check for correct operation of the CUDA Development Tools on Microsoft Windows systems.">Getting Started Windows</a></li>
382             <li><a href="../cuda-c-programming-guide/index.html" title="This guide provides a detailed discussion of the CUDA programming model and programming interface. It then describes the hardware implementation, and provides guidance on how to achieve maximum performance. The Appendixes include a list of all CUDA-enabled devices, detailed description of all extensions to the C language, listings of supported mathematical functions, C++ features supported in host and device code, details on texture fetching, technical specifications of various devices, and concludes by introducing the low-level driver API.">Programming Guide</a></li>
383             <li><a href="../cuda-c-best-practices-guide/index.html" title="This guide presents established parallelization and optimization techniques and explains coding metaphors and idioms that can greatly simplify programming for CUDA-capable GPU architectures. The intent is to provide guidelines for obtaining the best performance from NVIDIA GPUs using the CUDA Toolkit.">Best Practices Guide</a></li>
384             <li><a href="../kepler-compatibility-guide/index.html" title="This application note is intended to help developers ensure that their NVIDIA CUDA applications will run effectively on GPUs based on the NVIDIA Kepler Architecture. This document provides guidance to ensure that your software applications are compatible with Kepler.">Kepler Compatibility Guide</a></li>
385             <li><a href="../kepler-tuning-guide/index.html" title="Kepler is NVIDIA's next-generation architecture for CUDA compute applications. Applications that follow the best practices for the Fermi architecture should typically see speedups on the Kepler architecture without any code changes. This guide summarizes the ways that an application can be fine-tuned to gain additional speedups by leveraging Kepler architectural features.">Kepler Tuning Guide</a></li>
386             <li><a href="../parallel-thread-execution/index.html" title="This guide provides detailed instructions on the use of PTX, a low-level parallel thread execution virtual machine and instruction set architecture (ISA). PTX exposes the GPU as a data-parallel computing device.">PTX ISA</a></li>
387             <li><a href="../optimus-developer-guide/index.html" title="This document explains how CUDA APIs can be used to query for GPU capabilities in NVIDIA Optimus systems.">Developer Guide for Optimus</a></li>
388             <li><a href="../video-decoder/index.html" title="This document provides the video decoder API specification and the format conversion and display using DirectX or OpenGL following decode.">Video Decoder</a></li>
389             <li><a href="../video-encoder/index.html" title="This document provides the CUDA video encoder specifications, including the C-library API functions and encoder query parameters.">Video Encoder</a></li>
390             <li><a href="../inline-ptx-assembly/index.html" title="This document shows how to inline PTX (parallel thread execution) assembly language statements into CUDA code. It describes available assembler statement parameters and constraints, and the document also provides a list of some pitfalls that you may encounter.">Inline PTX Assembly</a></li>
391             <li><a href="../cuda-runtime-api/index.html" title="The CUDA runtime API.">CUDA Runtime API</a></li>
392             <li><a href="../cuda-driver-api/index.html" title="The CUDA driver API.">CUDA Driver API</a></li>
393             <li><a href="../cuda-math-api/index.html" title="The CUDA math API.">CUDA Math API</a></li>
394             <li><a href="../cublas/index.html" title="The CUBLAS library is an implementation of BLAS (Basic Linear Algebra Subprograms) on top of the NVIDIA CUDA runtime. It allows the user to access the computational resources of NVIDIA Graphical Processing Unit (GPU), but does not auto-parallelize across multiple GPUs.">CUBLAS</a></li>
395             <li><a href="../cufft/index.html" title="The CUFFT library user guide.">CUFFT</a></li>
396             <li><a href="../curand/index.html" title="The CURAND library user guide.">CURAND</a></li>
397             <li><a href="../cusparse/index.html" title="The CUSPARSE library user guide.">CUSPARSE</a></li>
398             <li><a href="../npp/index.html" title="NVIDIA NPP is a library of functions for performing CUDA accelerated processing. The initial set of functionality in the library focuses on imaging and video processing and is widely applicable for developers in these areas. NPP will evolve over time to encompass more of the compute heavy tasks in a variety of problem domains. The NPP library is written to maximize flexibility, while maintaining high performance.">NPP</a></li>
399             <li><a href="../thrust/index.html" title="The Thrust getting started guide.">Thrust</a></li>
400             <li><a href="../cuda-samples/index.html" title="This document contains a complete listing of the code samples that are included with the NVIDIA CUDA Toolkit. It describes each code sample, lists the minimum GPU specification, and provides links to the source code and white papers if available.">CUDA Samples</a></li>
401             <li><a href="../cuda-compiler-driver-nvcc/index.html" title="This document is a reference guide on the use of the CUDA compiler driver nvcc. Instead of being a specific CUDA compilation driver, nvcc mimics the behavior of the GNU compiler gcc, accepting a range of conventional compiler options, such as for defining macros and include/library paths, and for steering the compilation process.">NVCC</a></li>
402             <li><a href="../cuda-gdb/index.html" title="The NVIDIA tool for debugging CUDA applications running on Linux and Mac, providing developers with a mechanism for debugging CUDA applications running on actual hardware. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger.">CUDA-GDB</a></li>
403             <li><a href="../cuda-memcheck/index.html" title="CUDA-MEMCHECK is a suite of run time tools capable of precisely detecting out of bounds and misaligned memory access errors, checking device allocation leaks, reporting hardware errors and identifying shared memory data access hazards.">CUDA-MEMCHECK</a></li>
404             <li><a href="../nsight-eclipse-edition-getting-started-guide/index.html" title="Nsight Eclipse Edition getting started guide">Nsight Eclipse Edition</a></li>
405             <li><a href="../profiler-users-guide/index.html" title="This is the guide to the Profiler.">Profiler</a></li>
406             <li><a href="../cuda-binary-utilities/index.html" title="The application notes for cuobjdump and nvdisasm.">CUDA Binary Utilities</a></li>
407             <li><a href="../floating-point/index.html" title="A number of issues related to floating point accuracy and compliance are a frequent source of confusion on both CPUs and GPUs. The purpose of this white paper is to discuss the most common issues related to NVIDIA GPUs and to supplement the documentation in the CUDA C Programming Guide.">Floating Point and IEEE 754</a></li>
408             <li><a href="../incomplete-lu-cholesky/index.html" title="In this white paper we show how to use the CUSPARSE and CUBLAS libraries to achieve a 2x speedup over CPU in the incomplete-LU and Cholesky preconditioned iterative methods. We focus on the Bi-Conjugate Gradient Stabilized and Conjugate Gradient iterative methods, that can be used to solve large sparse nonsymmetric and symmetric positive definite linear systems, respectively. Also, we comment on the parallel sparse triangular solve, which is an essential building block in these algorithms.">Incomplete-LU and Cholesky Preconditioned Iterative Methods</a></li>
409             <li><a href="../libnvvm-api/index.html" title="The libNVVM API.">libNVVM API</a></li>
410             <li><a href="../libdevice-users-guide/index.html" title="The libdevice library is an LLVM bitcode library that implements common functions for GPU kernels.">libdevice User's Guide</a></li>
411             <li><a href="../nvvm-ir-spec/index.html" title="NVVM IR is a compiler IR (internal representation) based on the LLVM IR. The NVVM IR is designed to represent GPU compute kernels (for example, CUDA kernels). High-level language front-ends, like the CUDA C compiler front-end, can generate NVVM IR.">NVVM IR</a></li>
412             <li><a href="../cupti/index.html" title="The CUPTI API.">CUPTI</a></li>
413             <li><a href="../debugger-api/index.html" title="The CUDA debugger API.">Debugger API</a></li>
414             <li><a href="../gpudirect-rdma/index.html" title="A tool for Kepler-class GPUs and CUDA 5.0 enabling a direct path for communication between the GPU and a peer device on the PCI Express bus when the devices share the same upstream root complex using standard features of PCI Express. This document introduces the technology and describes the steps necessary to enable a RDMA for GPUDirect connection to NVIDIA GPUs within the Linux device driver model.">RDMA for GPUDirect</a></li>
415          </ul>
416          <div class="category"><span class="twiddle">▼</span><a href="index.html" title="CUDA Runtime API">CUDA Runtime API</a></div>
417          <ul>
418             <li><a href="api-sync-behavior.html#api-sync-behavior">1.&nbsp;API synchronization behavior </a></li>
419             <li><a href="modules.html#modules">2.&nbsp;Modules</a><ul>
420                   <li><a href="group__CUDART__DEVICE.html#group__CUDART__DEVICE">2.1.&nbsp;Device Management</a></li>
421                   <li><a href="group__CUDART__THREAD__DEPRECATED.html#group__CUDART__THREAD__DEPRECATED">2.2.&nbsp;Thread Management [DEPRECATED]</a></li>
422                   <li><a href="group__CUDART__ERROR.html#group__CUDART__ERROR">2.3.&nbsp;Error Handling</a></li>
423                   <li><a href="group__CUDART__STREAM.html#group__CUDART__STREAM">2.4.&nbsp;Stream Management</a></li>
424                   <li><a href="group__CUDART__EVENT.html#group__CUDART__EVENT">2.5.&nbsp;Event Management</a></li>
425                   <li><a href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION">2.6.&nbsp;Execution Control</a></li>
426                   <li><a href="group__CUDART__MEMORY.html#group__CUDART__MEMORY">2.7.&nbsp;Memory Management</a></li>
427                   <li><a href="group__CUDART__UNIFIED.html#group__CUDART__UNIFIED">2.8.&nbsp;Unified Addressing</a></li>
428                   <li><a href="group__CUDART__PEER.html#group__CUDART__PEER">2.9.&nbsp;Peer Device Memory Access</a></li>
429                   <li><a href="group__CUDART__OPENGL.html#group__CUDART__OPENGL">2.10.&nbsp;OpenGL Interoperability</a></li>
430                   <li><a href="group__CUDART__OPENGL__DEPRECATED.html#group__CUDART__OPENGL__DEPRECATED">2.11.&nbsp;OpenGL Interoperability [DEPRECATED]</a></li>
431                   <li><a href="group__CUDART__D3D9.html#group__CUDART__D3D9">2.12.&nbsp;Direct3D 9 Interoperability</a></li>
432                   <li><a href="group__CUDART__D3D9__DEPRECATED.html#group__CUDART__D3D9__DEPRECATED">2.13.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></li>
433                   <li><a href="group__CUDART__D3D10.html#group__CUDART__D3D10">2.14.&nbsp;Direct3D 10 Interoperability</a></li>
434                   <li><a href="group__CUDART__D3D10__DEPRECATED.html#group__CUDART__D3D10__DEPRECATED">2.15.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></li>
435                   <li><a href="group__CUDART__D3D11.html#group__CUDART__D3D11">2.16.&nbsp;Direct3D 11 Interoperability</a></li>
436                   <li><a href="group__CUDART__D3D11__DEPRECATED.html#group__CUDART__D3D11__DEPRECATED">2.17.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></li>
437                   <li><a href="group__CUDART__VDPAU.html#group__CUDART__VDPAU">2.18.&nbsp;VDPAU Interoperability</a></li>
438                   <li><a href="group__CUDART__INTEROP.html#group__CUDART__INTEROP">2.19.&nbsp;Graphics Interoperability</a></li>
439                   <li><a href="group__CUDART__TEXTURE.html#group__CUDART__TEXTURE">2.20.&nbsp;Texture Reference Management</a></li>
440                   <li><a href="group__CUDART__SURFACE.html#group__CUDART__SURFACE">2.21.&nbsp;Surface Reference Management</a></li>
441                   <li><a href="group__CUDART__TEXTURE__OBJECT.html#group__CUDART__TEXTURE__OBJECT">2.22.&nbsp;Texture Object Management</a></li>
442                   <li><a href="group__CUDART__SURFACE__OBJECT.html#group__CUDART__SURFACE__OBJECT">2.23.&nbsp;Surface Object Management</a></li>
443                   <li><a href="group__CUDART____VERSION.html#group__CUDART____VERSION">2.24.&nbsp;Version Management</a></li>
444                   <li><a href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL">2.25.&nbsp;C++ API Routines</a></li>
445                   <li><a href="group__CUDART__DRIVER.html#group__CUDART__DRIVER">2.26.&nbsp;Interactions with the CUDA Driver API</a></li>
446                   <li><a href="group__CUDART__PROFILER.html#group__CUDART__PROFILER">2.27.&nbsp;Profiler Control</a></li>
447                   <li><a href="group__CUDART__TYPES.html#group__CUDART__TYPES">2.28.&nbsp;Data types used by CUDA Runtime</a></li>
448                </ul>
449             </li>
450             <li><a href="annotated.html#annotated">3.&nbsp;Data Structures</a><ul>
451                   <li><a href="structcudaChannelFormatDesc.html#structcudaChannelFormatDesc">3.1.&nbsp;cudaChannelFormatDesc</a></li>
452                   <li><a href="structcudaDeviceProp.html#structcudaDeviceProp">3.2.&nbsp;cudaDeviceProp</a></li>
453                   <li><a href="structcudaExtent.html#structcudaExtent">3.3.&nbsp;cudaExtent</a></li>
454                   <li><a href="structcudaFuncAttributes.html#structcudaFuncAttributes">3.4.&nbsp;cudaFuncAttributes</a></li>
455                   <li><a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t">3.5.&nbsp;cudaIpcEventHandle_t</a></li>
456                   <li><a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t">3.6.&nbsp;cudaIpcMemHandle_t</a></li>
457                   <li><a href="structcudaMemcpy3DParms.html#structcudaMemcpy3DParms">3.7.&nbsp;cudaMemcpy3DParms</a></li>
458                   <li><a href="structcudaMemcpy3DPeerParms.html#structcudaMemcpy3DPeerParms">3.8.&nbsp;cudaMemcpy3DPeerParms</a></li>
459                   <li><a href="structcudaPitchedPtr.html#structcudaPitchedPtr">3.9.&nbsp;cudaPitchedPtr</a></li>
460                   <li><a href="structcudaPointerAttributes.html#structcudaPointerAttributes">3.10.&nbsp;cudaPointerAttributes</a></li>
461                   <li><a href="structcudaPos.html#structcudaPos">3.11.&nbsp;cudaPos</a></li>
462                   <li><a href="structcudaResourceDesc.html#structcudaResourceDesc">3.12.&nbsp;cudaResourceDesc</a></li>
463                   <li><a href="structcudaResourceViewDesc.html#structcudaResourceViewDesc">3.13.&nbsp;cudaResourceViewDesc</a></li>
464                   <li><a href="structcudaTextureDesc.html#structcudaTextureDesc">3.14.&nbsp;cudaTextureDesc</a></li>
465                   <li><a href="structsurfaceReference.html#structsurfaceReference">3.15.&nbsp;surfaceReference</a></li>
466                   <li><a href="structtextureReference.html#structtextureReference">3.16.&nbsp;textureReference</a></li>
467                </ul>
468             </li>
469             <li><a href="functions.html#functions">4.&nbsp;Data Fields</a></li>
470             <li><a href="deprecated.html#deprecated">5.&nbsp;Deprecated List</a></li>
471             <li><a href="notices-header.html#notices-header">Notices</a><ul></ul>
472             </li>
473          </ul>
474       </nav>
475       <nav id="search-results">
476          <h2>Search Results</h2>
477          <ol></ol>
478       </nav>
479       <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
480       <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/omniture/s_code_us_dev_aut1-nolinktrackin.js"></script>
481       <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/omniture/omniture.js"></script>
482       <noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="http://omniture.nvidia.com/b/ss/nvidiacudadocs/1/H.17--NS/0" height="1" width="1" border="0" alt=""></img></a></noscript>
483       <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
484       <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
485       </body>
486 </html>