Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-release > by-pkgid > d44b02ea46d82d6a48df31bbd1a088f3 > files > 1173

nvidia-cuda-toolkit-devel-6.5.14-6.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="Stream 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__STREAM"></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__ERROR.html" shape="rect">&lt; Previous</a> | <a href="group__CUDART__EVENT.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__STREAM"><a name="group__CUDART__STREAM" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.4.&nbsp;Stream Management</h2>
                  <div class="section">
                     <p>This section describes the stream management functions of the CUDA runtime application programming interface. </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Typedefs</h3>
                  <dl class="members">
                     <dt><span class="member_type">typedef 
                           void(CUDART_CB*
                           &nbsp;</span><span class="member_name"><a href="#group__CUDART__STREAM_1g11c9452045db759adb77a40d7c98f648" shape="rect">cudaStreamCallback_t</a> )(  cudaStream_t<span>&nbsp;</span><span class="keyword keyword apiItemName">stream</span>, <span>&nbsp;</span><span class="keyword keyword apiItemName">cudaError_t status</span>,  void*
                           <span>&nbsp;</span><span class="keyword keyword apiItemName">userData</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc"></span></dd>
                  </dl>
                  <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__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" shape="rect">cudaStreamAddCallback</a> (  <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>, <a href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g11c9452045db759adb77a40d7c98f648" title="" shape="rect">cudaStreamCallback_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">callback</span>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">userData</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Add a callback to a compute stream. </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__STREAM_1gdf9dbe8ebac133a851445ebc713dd34d" shape="rect">cudaStreamAttachMemAsync</a> (  <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>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span>, size_t<span>&nbsp;</span><span class="keyword keyword apiItemName">length</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Attach memory to a stream asynchronously. </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__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" shape="rect">cudaStreamCreate</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create an asynchronous stream. </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__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" shape="rect">cudaStreamCreateWithFlags</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create an asynchronous stream. </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__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" shape="rect">cudaStreamCreateWithPriority</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">priority</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create an asynchronous stream with the specified priority. </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__STREAM_1g796279185cb0335f9cb4aee25b37d01e" shape="rect">cudaStreamDestroy</a> (  <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></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Destroys and cleans up an asynchronous stream. </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__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" shape="rect">cudaStreamGetFlags</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">hStream</span>, unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Query the flags of a stream. </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__STREAM_1gc3a16a0b526e295558abf80163934d77" shape="rect">cudaStreamGetPriority</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">hStream</span>, int*<span>&nbsp;</span><span class="keyword keyword apiItemName">priority</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Query the priority of a stream. </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__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" shape="rect">cudaStreamQuery</a> (  <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></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Queries an asynchronous stream for completion 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__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" shape="rect">cudaStreamSynchronize</a> (  <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></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Waits for stream tasks to complete. </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__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" shape="rect">cudaStreamWaitEvent</a> (  <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>, <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">Make a compute stream wait on an event. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Typedefs</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDART__STREAM_1g11c9452045db759adb77a40d7c98f648" id="group__CUDART__STREAM_1g11c9452045db759adb77a40d7c98f648" shape="rect">
                              <!-- --></a><span>
                              void(CUDART_CB*
                              cudaStreamCallback_t )(  cudaStream_t<span>&nbsp;</span><span class="keyword keyword apiItemName">stream</span>, <span>&nbsp;</span><span class="keyword keyword apiItemName">cudaError_t status</span>,  void*
                              <span>&nbsp;</span><span class="keyword keyword apiItemName">userData</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">
                              <p> Type of stream callback functions. 
                                 
                              </p>
                           </div>
                        </dd>
                        <div class="section">
                           <h6 class="parameter_header">
                              Parameters
                              
                           </h6>
                           <dl class="table-display-params">
                              <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
                              <dd>The stream as passed to <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, may be NULL. 
                              </dd>
                              <dt><tt class="code"><span class="keyword keyword apiItemName">cudaError_t status</span></tt></dt>
                              <dd></dd>
                              <dt><tt class="code"><span class="keyword keyword apiItemName">userData</span></tt></dt>
                              <dd>User parameter provided at registration. </dd>
                           </dl>
                        </div>
                     </dl>
                  </div>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" id="group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamAddCallback (  <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>, <a href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g11c9452045db759adb77a40d7c98f648" title="" shape="rect">cudaStreamCallback_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">callback</span>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">userData</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Add a callback to a compute stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
                                 <dd>- Stream to add callback to </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">callback</span></tt></dt>
                                 <dd>- The function to call once preceding stream operations are complete </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">userData</span></tt></dt>
                                 <dd>- User specified data to be passed to the callback function </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Reserved for future use, must be 0</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Adds a callback to be called on the host after all currently enqueued items in the stream have completed. For each cudaStreamAddCallback
                                 call, a callback will be executed exactly once. The callback will block later work in the stream until it is finished.
                              </p>
                              <p class="p">The callback may be passed <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a> or an error code. In the event of a device error, all subsequently executed callbacks will receive an appropriate <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" shape="rect">cudaError_t</a>.
                              </p>
                              <p class="p">Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs will result in <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a>. Callbacks must not perform any synchronization that may depend on outstanding device work or other callbacks that are not
                                 mandated to run earlier. Callbacks without a mandated order (in independent streams) execute in undefined order and may be
                                 serialized.
                              </p>
                              <p class="p">This API requires compute capability 1.1 or greater. See <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1b092b57223ac999485f351c0e0f8ec8" title="Returns information about the device." shape="rect">cudaDeviceGetAttribute</a> or <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g929dcd9a191e17b7498e7ccaa3d16350" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a> to query compute capability. Calling this API with an earlier compute version will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a>.
                              </p>
                              <p class="p">For the purposes of Unified Memory, callback execution makes a number of guarantees: 
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">The callback stream is considered idle for the duration of the callback. Thus, for example, a callback may always use memory
                                          attached to the callback stream. 
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">The start of execution of a callback has the same effect as synchronizing an event recorded in the same stream immediately
                                          prior to the callback. It thus synchronizes streams which have been "joined" prior to the callback. 
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">Adding device work to any stream does not have the effect of making the stream active until all preceding callbacks have executed.
                                          Thus, for example, a callback might use global attached memory even if work has been added to another stream, if it has been
                                          properly ordered with an event. 
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">Completion of a callback does not cause a stream to become active except as described above. The callback stream will remain
                                          idle if no device work follows the callback, and will remain idle across consecutive callbacks without device work in between.
                                          Thus, for example, stream synchronization can be done by signaling from a callback at the end of the stream. 
                                       </p>
                                    </li>
                                 </ul>
                              </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g37fce6586d509ebd0a4b5f4faa7f3489" title="Allocates memory that will be automatically managed by the Unified Memory system." shape="rect">cudaMallocManaged</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1gebe68658a891edc398791a436a8e1d7c" title="Attach memory to a stream asynchronously." shape="rect">cudaStreamAttachMemAsync</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1gdf9dbe8ebac133a851445ebc713dd34d" id="group__CUDART__STREAM_1gdf9dbe8ebac133a851445ebc713dd34d" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamAttachMemAsync (  <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>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span>, size_t<span>&nbsp;</span><span class="keyword keyword apiItemName">length</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Attach memory to a stream asynchronously. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
                                 <dd>- Stream in which to enqueue the attach operation </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">devPtr</span></tt></dt>
                                 <dd>- Pointer to memory (must be a pointer to managed memory) </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">length</span></tt></dt>
                                 <dd>- Length of memory (must be zero) </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Must be one of <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4808e47eba73eb94622ec70a9f9b91ff" shape="rect">cudaMemAttachGlobal</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4f9a428d18fdd89a99441d0dd27131c0" shape="rect">cudaMemAttachHost</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gdc191442d08fc3a9de4cf055edfd2dbe" shape="rect">cudaMemAttachSingle</a></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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Enqueues an operation in <tt class="ph tt code">stream</tt> to specify stream association of <tt class="ph tt code">length</tt> bytes of memory starting from <tt class="ph tt code">devPtr</tt>. This function is a stream-ordered operation, meaning that it is dependent on, and will only take effect when, previous work
                                 in stream has completed. Any previous association is automatically replaced.
                              </p>
                              <p class="p"><tt class="ph tt code">devPtr</tt> must point to an address within managed memory space declared using the __managed__ keyword or allocated with <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g37fce6586d509ebd0a4b5f4faa7f3489" title="Allocates memory that will be automatically managed by the Unified Memory system." shape="rect">cudaMallocManaged</a>.
                              </p>
                              <p class="p"><tt class="ph tt code">length</tt> must be zero, to indicate that the entire allocation's stream association is being changed. Currently, it's not possible
                                 to change stream association for a portion of an allocation.
                              </p>
                              <p class="p">The stream association is specified using <tt class="ph tt code">flags</tt> which must be one of <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4808e47eba73eb94622ec70a9f9b91ff" shape="rect">cudaMemAttachGlobal</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4f9a428d18fdd89a99441d0dd27131c0" shape="rect">cudaMemAttachHost</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gdc191442d08fc3a9de4cf055edfd2dbe" shape="rect">cudaMemAttachSingle</a>. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4808e47eba73eb94622ec70a9f9b91ff" shape="rect">cudaMemAttachGlobal</a> flag is specified, the memory can be accessed by any stream on any device. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4f9a428d18fdd89a99441d0dd27131c0" shape="rect">cudaMemAttachHost</a> flag is specified, the program makes a guarantee that it won't access the memory on the device from any stream. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gdc191442d08fc3a9de4cf055edfd2dbe" shape="rect">cudaMemAttachSingle</a> flag is specified, the program makes a guarantee that it will only access the memory on the device from <tt class="ph tt code">stream</tt>. It is illegal to attach singly to the NULL stream, because the NULL stream is a virtual global stream and not a specific
                                 stream. An error will be returned in this case.
                              </p>
                              <p class="p">When memory is associated with a single stream, the Unified Memory system will allow CPU access to this memory region so long
                                 as all operations in <tt class="ph tt code">stream</tt> have completed, regardless of whether other streams are active. In effect, this constrains exclusive ownership of the managed
                                 memory region by an active GPU to per-stream activity instead of whole-GPU activity.
                              </p>
                              <p class="p">Accessing memory on the device from streams that are not associated with it will produce undefined results. No error checking
                                 is performed by the Unified Memory system to ensure that kernels launched into other streams do not access this region.
                              </p>
                              <p class="p">It is a program's responsibility to order calls to <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1gebe68658a891edc398791a436a8e1d7c" title="Attach memory to a stream asynchronously." shape="rect">cudaStreamAttachMemAsync</a> via events, synchronization or other means to ensure legal access to memory at all times. Data visibility and coherency will
                                 be changed appropriately for all kernels which follow a stream-association change.
                              </p>
                              <p class="p">If <tt class="ph tt code">stream</tt> is destroyed while data is associated with it, the association is removed and the association reverts to the default visibility
                                 of the allocation as specified at <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g37fce6586d509ebd0a4b5f4faa7f3489" title="Allocates memory that will be automatically managed by the Unified Memory system." shape="rect">cudaMallocManaged</a>. For __managed__ variables, the default association is always <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4808e47eba73eb94622ec70a9f9b91ff" shape="rect">cudaMemAttachGlobal</a>. Note that destroying a stream is an asynchronous operation, and as a result, the change to default association won't happen
                                 until all work in the stream has completed.
                              </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g37fce6586d509ebd0a4b5f4faa7f3489" title="Allocates memory that will be automatically managed by the Unified Memory system." shape="rect">cudaMallocManaged</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" id="group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamCreate (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create an asynchronous stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pStream</span></tt></dt>
                                 <dd>- Pointer to new stream identifier</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></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a new asynchronous stream.</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__STREAM.html#group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc3a16a0b526e295558abf80163934d77" title="Query the priority of a stream." shape="rect">cudaStreamGetPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" title="Query the flags of a stream." shape="rect">cudaStreamGetFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" id="group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamCreateWithFlags (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create an asynchronous stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pStream</span></tt></dt>
                                 <dd>- Pointer to new stream identifier </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Parameters for stream creation</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></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a new asynchronous stream. The <tt class="ph tt code">flags</tt> argument determines the behaviors of the stream. Valid values for <tt class="ph tt code">flags</tt> are
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ged347a89ec289c787faa116b851708fc" shape="rect">cudaStreamDefault</a>: Default stream creation flag.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g5dbd11a1723d9f5938a133cedbc525e3" shape="rect">cudaStreamNonBlocking</a>: Specifies that work running in the created stream may run concurrently with work in stream 0 (the NULL stream), and that
                                          the created stream should perform no implicit synchronization with stream 0.
                                       </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" title="Query the flags of a stream." shape="rect">cudaStreamGetFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" id="group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamCreateWithPriority (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pStream</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">priority</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create an asynchronous stream with the specified priority. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pStream</span></tt></dt>
                                 <dd>- Pointer to new stream identifier </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Flags for stream creation. See <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a> for a list of valid flags that can be passed 
                                 </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">priority</span></tt></dt>
                                 <dd>- Priority of the stream. Lower numbers represent higher priorities. See <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a> for more information about the meaningful stream priorities that can be passed.
                                 </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></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a stream with the specified priority and returns a handle in <tt class="ph tt code">pStream</tt>. This API alters the scheduler priority of work in the stream. Work in a higher priority stream may preempt work already
                                 executing in a low priority stream.
                              </p>
                              <p class="p"><tt class="ph tt code">priority</tt> follows a convention where lower numbers represent higher priorities. '0' represents default priority. The range of meaningful
                                 numerical priorities can be queried using <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a>. If the specified priority is outside the numerical range returned by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a>, it will automatically be clamped to the lowest or the highest number in the range.
                              </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">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Stream priorities are supported only on Quadro and Tesla GPUs with compute capability 3.5 or higher.</p>
                                       </li>
                                       <li class="li">
                                          <p class="p">In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream
                                             priorities have no effect on host-to-device and device-to-host memory operations.
                                          </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc3a16a0b526e295558abf80163934d77" title="Query the priority of a stream." shape="rect">cudaStreamGetPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" id="group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamDestroy (  <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></dt>
                        <dd class="description">
                           <div class="section">Destroys and cleans up an asynchronous stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">stream</span></tt></dt>
                                 <dd>- Stream identifier</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Destroys and cleans up the asynchronous stream specified by <tt class="ph tt code">stream</tt>.
                              </p>
                              <p class="p">In case the device is still doing work in the stream <tt class="ph tt code">stream</tt> when <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy()</a> is called, the function will return immediately and the resources associated with <tt class="ph tt code">stream</tt> will be released automatically once the device has completed all work in <tt class="ph tt code">stream</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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" id="group__CUDART__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamGetFlags (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">hStream</span>, unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Query the flags of a stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">hStream</span></tt></dt>
                                 <dd>- Handle to the stream to be queried </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Pointer to an unsigned integer in which the stream's flags are returned</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Query the flags of a stream. The flags are returned in <tt class="ph tt code">flags</tt>. See <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a> for a list of valid flags.
                              </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__STREAM.html#group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc3a16a0b526e295558abf80163934d77" title="Query the priority of a stream." shape="rect">cudaStreamGetPriority</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1gc3a16a0b526e295558abf80163934d77" id="group__CUDART__STREAM_1gc3a16a0b526e295558abf80163934d77" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamGetPriority (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ge15d9c8b7a240312b533d6122558085a" title="" shape="rect">cudaStream_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">hStream</span>, int*<span>&nbsp;</span><span class="keyword keyword apiItemName">priority</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Query the priority of a stream. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">hStream</span></tt></dt>
                                 <dd>- Handle to the stream to be queried </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">priority</span></tt></dt>
                                 <dd>- Pointer to a signed integer in which the stream's priority is returned</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Query the priority of a stream. The priority is returned in in <tt class="ph tt code">priority</tt>. Note that if the stream was created with a priority outside the meaningful numerical range returned by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a>, this function returns the clamped priority. See <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a> for details about priority clamping.
                              </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__STREAM.html#group__CUDART__STREAM_1gc1fb2c73fbb58a68bd3e5a0033d73c74" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g182fe129efba0aaf316899c0b47c21a0" title="Returns numerical values that correspond to the least and greatest stream priorities." shape="rect">cudaDeviceGetStreamPriorityRange</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g6da1f4adccd182c16ddb8d7b9067b9aa" title="Query the flags of a stream." shape="rect">cudaStreamGetFlags</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" id="group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamQuery (  <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></dt>
                        <dd class="description">
                           <div class="section">Queries an asynchronous stream for completion 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">stream</span></tt></dt>
                                 <dd>- Stream identifier</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a> if all operations in <tt class="ph tt code">stream</tt> have completed, or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038285d0c852ab65b8925505e1065563f6d" shape="rect">cudaErrorNotReady</a> if not.
                              </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__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize()</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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" id="group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamSynchronize (  <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></dt>
                        <dd class="description">
                           <div class="section">Waits for stream tasks 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">stream</span></tt></dt>
                                 <dd>- Stream identifier</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Blocks until <tt class="ph tt code">stream</tt> has completed all operations. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g057e6912c52708b6aa86e79dd83d007c" shape="rect">cudaDeviceScheduleBlockingSync</a> flag was set for this device, the host thread will block until the stream is finished with all of its tasks.
                              </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</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>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" id="group__CUDART__STREAM_1g80c62c379f0c3ed8afe31fd0a31ad8a2" shape="rect">
                              <!-- --></a><span><a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaStreamWaitEvent (  <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>, <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">Make a compute stream wait on 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">stream</span></tt></dt>
                                 <dd>- Stream to wait </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event to wait on </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Parameters for the operation (must be 0)</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_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Makes all future work submitted to <tt class="ph tt code">stream</tt> wait until <tt class="ph tt code">event</tt> reports completion before beginning execution. This synchronization will be performed efficiently on the device. The event
                                 <tt class="ph tt code">event</tt> may be from a different context than <tt class="ph tt code">stream</tt>, in which case this function will perform cross-device synchronization.
                              </p>
                              <p class="p">The stream <tt class="ph tt code">stream</tt> will wait only for the completion of the most recent host call to <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> on <tt class="ph tt code">event</tt>. Once this call has returned, any functions (including <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1ge31b1b1558db52579c9e23c5782af93e" title="Records an event." shape="rect">cudaEventRecord()</a> and <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gff983c870090fcdeec2e948659375079" title="Destroys an event object." shape="rect">cudaEventDestroy()</a>) may be called on <tt class="ph tt code">event</tt> again, and the subsequent calls will not have any effect on <tt class="ph tt code">stream</tt>.
                              </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>, this call acts as if the record has already completed, and so is a functional no-op.
                              </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__STREAM.html#group__CUDART__STREAM_1gaf38e6f47265c7da1b02724a5ad565e4" title="Create an asynchronous stream." shape="rect">cudaStreamCreate</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g2f3e3d8e9b3db7fffde77bdf67de7cf1" title="Create an asynchronous stream." shape="rect">cudaStreamCreateWithFlags</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge78feba9080b59fe0fff536a42c13e6d" title="Queries an asynchronous stream for completion status." shape="rect">cudaStreamQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1geb3b2f88b7c1cff8b67a998a3a41c179" title="Waits for stream tasks to complete." shape="rect">cudaStreamSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g4d2688e1c3f3cf7da4bf55121fc0b0a1" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g796279185cb0335f9cb4aee25b37d01e" title="Destroys and cleans up an asynchronous stream." shape="rect">cudaStreamDestroy</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>