Sophie

Sophie

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

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

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="cppModule"></meta>
      <meta name="DC.Title" content="Event Management"></meta>
      <meta name="abstract" content=""></meta>
      <meta name="description" content=""></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="group__CUDART__EVENT"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>CUDA Runtime API :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="../common/scripts/tynt/tynt.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script>
      <script type="text/javascript" src="../search/htmlFileList.js"></script>
      <script type="text/javascript" src="../search/htmlFileInfoList.js"></script>
      <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script>
      <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script>
      <script type="text/javascript" src="../search/index-1.js"></script>
      <script type="text/javascript" src="../search/index-2.js"></script>
      <script type="text/javascript" src="../search/index-3.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/cuda-runtime-api/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <div id="site-content">
         <nav id="site-nav">
            <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit
                  v6.5</a></div>
            <div class="category"><a href="index.html" title="CUDA Runtime API">CUDA Runtime API</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="api-sync-behavior.html#api-sync-behavior">1.&nbsp;API synchronization behavior </a></div>
               </li>
               <li>
                  <div class="section-link"><a href="stream-sync-behavior.html#stream-sync-behavior">2.&nbsp;Stream synchronization behavior</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="modules.html#modules">3.&nbsp;Modules</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="group__CUDART__DEVICE.html#group__CUDART__DEVICE">3.1.&nbsp;Device Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__THREAD__DEPRECATED.html#group__CUDART__THREAD__DEPRECATED">3.2.&nbsp;Thread Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__ERROR.html#group__CUDART__ERROR">3.3.&nbsp;Error Handling</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__STREAM.html#group__CUDART__STREAM">3.4.&nbsp;Stream Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EVENT.html#group__CUDART__EVENT">3.5.&nbsp;Event Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION">3.6.&nbsp;Execution Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OCCUPANCY.html#group__CUDART__OCCUPANCY">3.7.&nbsp;Occupancy</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__MEMORY.html#group__CUDART__MEMORY">3.8.&nbsp;Memory Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__UNIFIED.html#group__CUDART__UNIFIED">3.9.&nbsp;Unified Addressing</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__PEER.html#group__CUDART__PEER">3.10.&nbsp;Peer Device Memory Access</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OPENGL.html#group__CUDART__OPENGL">3.11.&nbsp;OpenGL Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OPENGL__DEPRECATED.html#group__CUDART__OPENGL__DEPRECATED">3.12.&nbsp;OpenGL Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D9.html#group__CUDART__D3D9">3.13.&nbsp;Direct3D 9 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D9__DEPRECATED.html#group__CUDART__D3D9__DEPRECATED">3.14.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D10.html#group__CUDART__D3D10">3.15.&nbsp;Direct3D 10 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D10__DEPRECATED.html#group__CUDART__D3D10__DEPRECATED">3.16.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D11.html#group__CUDART__D3D11">3.17.&nbsp;Direct3D 11 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D11__DEPRECATED.html#group__CUDART__D3D11__DEPRECATED">3.18.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__VDPAU.html#group__CUDART__VDPAU">3.19.&nbsp;VDPAU Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__INTEROP.html#group__CUDART__INTEROP">3.20.&nbsp;Graphics Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TEXTURE.html#group__CUDART__TEXTURE">3.21.&nbsp;Texture Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__SURFACE.html#group__CUDART__SURFACE">3.22.&nbsp;Surface Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TEXTURE__OBJECT.html#group__CUDART__TEXTURE__OBJECT">3.23.&nbsp;Texture Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__SURFACE__OBJECT.html#group__CUDART__SURFACE__OBJECT">3.24.&nbsp;Surface Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART____VERSION.html#group__CUDART____VERSION">3.25.&nbsp;Version Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL">3.26.&nbsp;C++ API Routines</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__DRIVER.html#group__CUDART__DRIVER">3.27.&nbsp;Interactions with the CUDA Driver API</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__PROFILER.html#group__CUDART__PROFILER">3.28.&nbsp;Profiler Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES">3.29.&nbsp;Data types used by CUDA Runtime</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="annotated.html#annotated">4.&nbsp;Data Structures</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="class____cudaOccupancyB2DHelper.html#class____cudaOccupancyB2DHelper">4.1.&nbsp;__cudaOccupancyB2DHelper</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaChannelFormatDesc.html#structcudaChannelFormatDesc">4.2.&nbsp;cudaChannelFormatDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaDeviceProp.html#structcudaDeviceProp">4.3.&nbsp;cudaDeviceProp</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExtent.html#structcudaExtent">4.4.&nbsp;cudaExtent</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaFuncAttributes.html#structcudaFuncAttributes">4.5.&nbsp;cudaFuncAttributes</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t">4.6.&nbsp;cudaIpcEventHandle_t</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t">4.7.&nbsp;cudaIpcMemHandle_t</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaMemcpy3DParms.html#structcudaMemcpy3DParms">4.8.&nbsp;cudaMemcpy3DParms</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaMemcpy3DPeerParms.html#structcudaMemcpy3DPeerParms">4.9.&nbsp;cudaMemcpy3DPeerParms</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPitchedPtr.html#structcudaPitchedPtr">4.10.&nbsp;cudaPitchedPtr</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPointerAttributes.html#structcudaPointerAttributes">4.11.&nbsp;cudaPointerAttributes</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPos.html#structcudaPos">4.12.&nbsp;cudaPos</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaResourceDesc.html#structcudaResourceDesc">4.13.&nbsp;cudaResourceDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaResourceViewDesc.html#structcudaResourceViewDesc">4.14.&nbsp;cudaResourceViewDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaTextureDesc.html#structcudaTextureDesc">4.15.&nbsp;cudaTextureDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structsurfaceReference.html#structsurfaceReference">4.16.&nbsp;surfaceReference</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structtextureReference.html#structtextureReference">4.17.&nbsp;textureReference</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="functions.html#functions">5.&nbsp;Data Fields</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="deprecated.html#deprecated">6.&nbsp;Deprecated List</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="notices-header.html#notices-header">Notices</a></div>
                  <ul></ul>
               </li>
            </ul>
         </nav>
         <div id="resize-nav"></div>
         <nav id="search-results">
            <h2>Search Results</h2>
            <ol></ol>
         </nav>
         
         <div id="contents-container">
            <div id="breadcrumbs-container">
               <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>
               <div id="release-info">CUDA Runtime API
                  (<a href="../../pdf/CUDA_Runtime_API.pdf">PDF</a>)
                  -
                  
                  v6.5
                  (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
                  -
                  Last updated August 1, 2014
                  -
                  <a href="mailto:cudatools@nvidia.com?subject=CUDA Toolkit Documentation Feedback: CUDA Runtime API">Send Feedback</a>
                  -
                  <span class="st_facebook"></span><span class="st_twitter"></span><span class="st_linkedin"></span><span class="st_reddit"></span><span class="st_slashdot"></span><span class="st_tumblr"></span><span class="st_sharethis"></span></div>
            </div>
            <article id="contents">
               <div class="topic reference apiRef apiPackage cppModule" id="group__CUDART__EVENT"><a name="group__CUDART__EVENT" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.5.&nbsp;Event Management</h2>
                  <div class="section">
                     <p>This section describes the event management functions of the CUDA runtime application programming interface. </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Functions</h3>
                  <dl class="members">
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Creates an event object. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Creates an event object with the specified flags. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Destroys an event object. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Computes the elapsed time between events. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Queries an event's status. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Records an event. </span></dd>
                     <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>
                     <dd class="shortdesc"><span></span><span class="desc">Waits for an event to complete. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" id="group__CUDART__EVENT_1g320ab51604f3a7a082795202e7eaf774" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Creates an event object. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Newly created event</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates an event object using <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6f8811acffcc133b5e4a50de6646d18e" shape="rect">cudaEventDefault</a>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1gb9774a7552ee76b564c8c650b083a86c" title="[C++ API] Creates an event object with the specified flags" 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_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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1gd5a65651969743246344618073717406" id="group__CUDART__EVENT_1gd5a65651969743246344618073717406" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Creates an event object with the specified flags. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Newly created event </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Flags for new event</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates an event object with the specified flags. Valid flags include:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6f8811acffcc133b5e4a50de6646d18e" shape="rect">cudaEventDefault</a>: Default event creation flag.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <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.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <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>.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <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>.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" id="group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Destroys an event object. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event to destroy</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Destroys the event specified by <tt class="ph tt code">event</tt>.
                              </p>
                              <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>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" id="group__CUDART__EVENT_1g14c387cc57ce2e328f6669854e6020a5" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Computes the elapsed time between events. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ms</span></tt></dt>
                                 <dd>- Time between <tt class="ph tt code">start</tt> and <tt class="ph tt code">end</tt> in ms 
                                 </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">start</span></tt></dt>
                                 <dd>- Starting event </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">end</span></tt></dt>
                                 <dd>- Ending event</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds).</p>
                              <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
                                 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
                                 events. Any number of other different stream operations could execute in between the two measured events, thus altering the
                                 timing in a significant way.
                              </p>
                              <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>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" id="group__CUDART__EVENT_1gf8e4ddb569b1da032c060f0c54da698f" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Queries an event's status. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event to query</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <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>).
                              </p>
                              <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.
                              </p>
                              <p class="p">For the purposes of Unified Memory, a return value of <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a> is equivalent to having called <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" title="Waits for an event to complete." shape="rect">cudaEventSynchronize()</a>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" id="group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Records an event. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event to record </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
                                 <dd>- Stream in which to record event</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Records an event. See note about NULL stream behavior. Since 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> 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.
                              </p>
                              <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>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">This function uses standard  <a class="xref xmlonly" href="stream-sync-behavior.html#stream-sync-behavior__null-stream" shape="rect">NULL stream</a> semantics. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" id="group__CUDART__EVENT_1g08241bcf5c5cb686b1882a8492f1e2d9" shape="rect">
                              <!-- --></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>
                        <dd class="description">
                           <div class="section">Waits for an event to complete. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event to wait for</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <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>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <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>).
                              </p>
                              <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.
                              </p>
                              <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.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <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>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <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>
                              <p class="p"></p>
                           </div>
                        </dd>
                     </dl>
                  </div>
               </div>
               
               <hr id="contents-end"></hr>
               
            </article>
         </div>
      </div>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
      <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script></body>
</html>