Sophie

Sophie

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

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

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="cppModule"></meta>
      <meta name="DC.Title" content="Context 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__CUDA__CTX"></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 Driver 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-driver-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 Driver API">CUDA Driver 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__CUDA__TYPES.html#group__CUDA__TYPES">3.1.&nbsp;Data types used by CUDA driver</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__ERROR.html#group__CUDA__ERROR">3.2.&nbsp;Error Handling</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__INITIALIZE.html#group__CUDA__INITIALIZE">3.3.&nbsp;Initialization</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VERSION.html#group__CUDA__VERSION">3.4.&nbsp;Version Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE.html#group__CUDA__DEVICE">3.5.&nbsp;Device Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE__DEPRECATED.html#group__CUDA__DEVICE__DEPRECATED">3.6.&nbsp;Device Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX.html#group__CUDA__CTX">3.7.&nbsp;Context Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX__DEPRECATED.html#group__CUDA__CTX__DEPRECATED">3.8.&nbsp;Context Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MODULE.html#group__CUDA__MODULE">3.9.&nbsp;Module Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MEM.html#group__CUDA__MEM">3.10.&nbsp;Memory Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__UNIFIED.html#group__CUDA__UNIFIED">3.11.&nbsp;Unified Addressing</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__STREAM.html#group__CUDA__STREAM">3.12.&nbsp;Stream Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EVENT.html#group__CUDA__EVENT">3.13.&nbsp;Event Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC.html#group__CUDA__EXEC">3.14.&nbsp;Execution Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC__DEPRECATED.html#group__CUDA__EXEC__DEPRECATED">3.15.&nbsp;Execution Control [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__OCCUPANCY.html#group__CUDA__OCCUPANCY">3.16.&nbsp;Occupancy</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF.html#group__CUDA__TEXREF">3.17.&nbsp;Texture Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF__DEPRECATED.html#group__CUDA__TEXREF__DEPRECATED">3.18.&nbsp;Texture Reference Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFREF.html#group__CUDA__SURFREF">3.19.&nbsp;Surface Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXOBJECT.html#group__CUDA__TEXOBJECT">3.20.&nbsp;Texture Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFOBJECT.html#group__CUDA__SURFOBJECT">3.21.&nbsp;Surface Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PEER__ACCESS.html#group__CUDA__PEER__ACCESS">3.22.&nbsp;Peer Context Memory Access</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS">3.23.&nbsp;Graphics Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PROFILER.html#group__CUDA__PROFILER">3.24.&nbsp;Profiler Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GL.html#group__CUDA__GL">3.25.&nbsp;OpenGL Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__GL__DEPRECATED.html#group__CUDA__GL__DEPRECATED">3.25.1.&nbsp;OpenGL Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D9.html#group__CUDA__D3D9">3.26.&nbsp;Direct3D 9 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D9__DEPRECATED.html#group__CUDA__D3D9__DEPRECATED">3.26.1.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D10.html#group__CUDA__D3D10">3.27.&nbsp;Direct3D 10 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D10__DEPRECATED.html#group__CUDA__D3D10__DEPRECATED">3.27.1.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D11.html#group__CUDA__D3D11">3.28.&nbsp;Direct3D 11 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D11__DEPRECATED.html#group__CUDA__D3D11__DEPRECATED">3.28.1.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VDPAU.html#group__CUDA__VDPAU">3.29.&nbsp;VDPAU Interoperability</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="structCUDA__ARRAY3D__DESCRIPTOR.html#structCUDA__ARRAY3D__DESCRIPTOR">4.1.&nbsp;CUDA_ARRAY3D_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__ARRAY__DESCRIPTOR.html#structCUDA__ARRAY__DESCRIPTOR">4.2.&nbsp;CUDA_ARRAY_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY2D.html#structCUDA__MEMCPY2D">4.3.&nbsp;CUDA_MEMCPY2D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D.html#structCUDA__MEMCPY3D">4.4.&nbsp;CUDA_MEMCPY3D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D__PEER.html#structCUDA__MEMCPY3D__PEER">4.5.&nbsp;CUDA_MEMCPY3D_PEER</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS.html#structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS">4.6.&nbsp;CUDA_POINTER_ATTRIBUTE_P2P_TOKENS</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__DESC.html#structCUDA__RESOURCE__DESC">4.7.&nbsp;CUDA_RESOURCE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__VIEW__DESC.html#structCUDA__RESOURCE__VIEW__DESC">4.8.&nbsp;CUDA_RESOURCE_VIEW_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__TEXTURE__DESC.html#structCUDA__TEXTURE__DESC">4.9.&nbsp;CUDA_TEXTURE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUdevprop.html#structCUdevprop">4.10.&nbsp;CUdevprop</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcEventHandle.html#structCUipcEventHandle">4.11.&nbsp;CUipcEventHandle</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcMemHandle.html#structCUipcMemHandle">4.12.&nbsp;CUipcMemHandle</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__CUDA__DEVICE__DEPRECATED.html" shape="rect">&lt; Previous</a> | <a href="group__CUDA__CTX__DEPRECATED.html" shape="rect">Next &gt;</a></div>
               <div id="release-info">CUDA Driver API
                  (<a href="../../pdf/CUDA_Driver_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 Driver 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__CUDA__CTX"><a name="group__CUDA__CTX" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.7.&nbsp;Context Management</h2>
                  <div class="section">
                     <p>This section describes the context management functions of the low-level CUDA driver application programming interface. </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Functions</h3>
                  <dl class="members">
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" shape="rect">cuCtxCreate</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a><span>&nbsp;</span><span class="keyword keyword apiItemName">dev</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create a CUDA context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" shape="rect">cuCtxDestroy</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Destroy a CUDA context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" shape="rect">cuCtxGetApiVersion</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span>, unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">version</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets the context's API version. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" shape="rect">cuCtxGetCacheConfig</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g3b9bbcf42528b889e9dbe9cfa2aea3ec" title="" shape="rect">CUfunc_cache</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pconfig</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the preferred cache configuration for the current context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g8f13165846b73750693640fb3e8380d0" shape="rect">cuCtxGetCurrent</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the CUDA context bound to the calling CPU thread. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" shape="rect">cuCtxGetDevice</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the device ID for the current context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" shape="rect">cuCtxGetLimit</a> (  size_t*<span>&nbsp;</span><span class="keyword keyword apiItemName">pvalue</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" title="" shape="rect">CUlimit</a><span>&nbsp;</span><span class="keyword keyword apiItemName">limit</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns resource limits. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" shape="rect">cuCtxGetSharedMemConfig</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g92d66e95f602cb9fdaf0682c260c241b" title="" shape="rect">CUsharedconfig</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pConfig</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the current shared memory configuration for the current context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g137920ab61a71be6ce67605b9f294091" shape="rect">cuCtxGetStreamPriorityRange</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">leastPriority</span>, int*<span>&nbsp;</span><span class="keyword keyword apiItemName">greatestPriority</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns numerical values that correspond to the least and greatest stream priorities. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" shape="rect">cuCtxPopCurrent</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Pops the current CUDA context from the current CPU thread. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" shape="rect">cuCtxPushCurrent</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Pushes a context on the current CPU thread. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" shape="rect">cuCtxSetCacheConfig</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g3b9bbcf42528b889e9dbe9cfa2aea3ec" title="" shape="rect">CUfunc_cache</a><span>&nbsp;</span><span class="keyword keyword apiItemName">config</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Sets the preferred cache configuration for the current context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1gbe562ee6258b4fcc272ca6478ca2a2f7" shape="rect">cuCtxSetCurrent</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Binds the specified CUDA context to the calling CPU thread. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" shape="rect">cuCtxSetLimit</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" title="" shape="rect">CUlimit</a><span>&nbsp;</span><span class="keyword keyword apiItemName">limit</span>, size_t<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Set resource limits. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g2574235fa643f8f251bf7bc28fac3692" shape="rect">cuCtxSetSharedMemConfig</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g92d66e95f602cb9fdaf0682c260c241b" title="" shape="rect">CUsharedconfig</a><span>&nbsp;</span><span class="keyword keyword apiItemName">config</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Sets the shared memory configuration for the current context. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" shape="rect">cuCtxSynchronize</a> (  void ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Block for a context's tasks to complete. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" id="group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxCreate (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a><span>&nbsp;</span><span class="keyword keyword apiItemName">dev</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create a CUDA context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pctx</span></tt></dt>
                                 <dd>- Returned context handle of the new context </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Context creation flags </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt>
                                 <dd>- Device to create context on</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e96f047e7215788ca96c81af92a04bfb6c" shape="rect">CUDA_ERROR_INVALID_DEVICE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a new CUDA context and associates it with the calling thread. The <tt class="ph tt code">flags</tt> parameter is described below. The context is created with a usage count of 1 and the caller of <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate()</a> must call <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy()</a> or when done using the context. If a context is already current to the thread, it is supplanted by the newly created context
                                 and may be restored by a subsequent call to <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent()</a>.
                              </p>
                              <p class="p">The three LSBs of the <tt class="ph tt code">flags</tt> parameter can be used to control how the OS thread, which owns the CUDA context at the time of an API call, interacts with
                                 the OS scheduler when waiting for results from the GPU. Only one of the scheduling flags can be set when creating a context.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd4d75f4c24f8c35ef2ee9d0793badfd88c" shape="rect">CU_CTX_SCHED_AUTO</a>: The default value if the <tt class="ph tt code">flags</tt> parameter is zero, uses a heuristic based on the number of active CUDA contexts in the process C and the number of logical
                                          processors in the system P. If C &gt; P, then CUDA will yield to other OS threads when waiting for the GPU, otherwise CUDA will
                                          not yield while waiting for results and actively spin on the processor.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd4331d3ed1e0b55597258bd58346603afc" shape="rect">CU_CTX_SCHED_SPIN</a>: Instruct CUDA to actively spin when waiting for results from the GPU. This can decrease latency when waiting for the GPU,
                                          but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd44bc43364906d8dd5a7d7c8ad46ccc548" shape="rect">CU_CTX_SCHED_YIELD</a>: Instruct CUDA to yield its thread when waiting for results from the GPU. This can increase latency when waiting for the
                                          GPU, but can increase the performance of CPU threads performing work in parallel with the GPU.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd462aebfe6432ade3feb32f1a409027852" shape="rect">CU_CTX_SCHED_BLOCKING_SYNC</a>: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd4b5bf395cc60a8cbded4c329ae9430b91" shape="rect">CU_CTX_BLOCKING_SYNC</a>: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the GPU to finish work. 
                                       </p>
                                       <p class="p"><strong class="ph b">Deprecated:</strong> This flag was deprecated as of CUDA 4.0 and was replaced with <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd462aebfe6432ade3feb32f1a409027852" shape="rect">CU_CTX_SCHED_BLOCKING_SYNC</a>.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd408c822db270f4322af6e6bb0a7786514" shape="rect">CU_CTX_MAP_HOST</a>: Instruct CUDA to support mapped pinned allocations. This flag must be set in order to allocate pinned host memory that is
                                          accessible to the GPU.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd4b5a83507c2a7e14d301621c40c343a81" shape="rect">CU_CTX_LMEM_RESIZE_TO_MAX</a>: Instruct CUDA to not reduce local memory after resizing local memory for a kernel. This can prevent thrashing by local memory
                                          allocations when launching many kernels with high local memory usage at the cost of potentially increased memory usage.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Context creation will fail with <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a> if the compute mode of the device is <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg637aab2eadb52e1c1c048b8bad9592d1db8a226241187db3b1f41999bb70eb47" shape="rect">CU_COMPUTEMODE_PROHIBITED</a>. Similarly, context creation will also fail with <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a> if the compute mode for the device is set to <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg637aab2eadb52e1c1c048b8bad9592d18b2f4d5e3661d0ecd3c1a4b6fc622e30" shape="rect">CU_COMPUTEMODE_EXCLUSIVE</a> and there is already an active context on the device. The function <a class="xref" href="group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g9c3e1414f0ad901d3278a4d6645fc266" title="Returns information about the device." shape="rect">cuDeviceGetAttribute()</a> can be used with <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge12b8a782bebe21b1ac0091bf9f4e2a3f6669a29a6d42968047747cbfc501289" shape="rect">CU_DEVICE_ATTRIBUTE_COMPUTE_MODE</a> to determine the compute mode of the device. The nvidia-smi tool can be used to set the compute mode for devices. Documentation
                                 for nvidia-smi can be obtained by passing a -h option to it.
                              </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__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" id="group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxDestroy (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Destroy a CUDA context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ctx</span></tt></dt>
                                 <dd>- Context to destroy</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Destroys the CUDA context specified by <tt class="ph tt code">ctx</tt>. The context <tt class="ph tt code">ctx</tt> will be destroyed regardless of how many threads it is current to. It is the responsibility of the calling function to ensure
                                 that no API call issues using <tt class="ph tt code">ctx</tt> while <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy()</a> is executing.
                              </p>
                              <p class="p">If <tt class="ph tt code">ctx</tt> is current to the calling thread then <tt class="ph tt code">ctx</tt> will also be popped from the current thread's context stack (as though <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent()</a> were called). If <tt class="ph tt code">ctx</tt> is current to other threads, then <tt class="ph tt code">ctx</tt> will remain current to those threads, and attempting to access <tt class="ph tt code">ctx</tt> from those threads will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9b27ac43f7ce8446f5c9636dd73fb2139" shape="rect">CUDA_ERROR_CONTEXT_IS_DESTROYED</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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" id="group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetApiVersion (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span>, unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">version</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets the context's API version. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ctx</span></tt></dt>
                                 <dd>- Context to check </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">version</span></tt></dt>
                                 <dd>- Pointer to version</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns a version number in <tt class="ph tt code">version</tt> corresponding to the capabilities of the context (e.g. 3010 or 3020), which library developers can use to direct callers
                                 to a specific API version. If <tt class="ph tt code">ctx</tt> is NULL, returns the API version used to create the currently bound context.
                              </p>
                              <p class="p">Note that new API versions are only introduced when context capabilities are changed that break binary compatibility, so the
                                 API version and driver version may be different. For example, it is valid for the API version to be 3020 while the driver
                                 version is 4020.
                              </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" id="group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetCacheConfig (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g3b9bbcf42528b889e9dbe9cfa2aea3ec" title="" shape="rect">CUfunc_cache</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pconfig</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the preferred cache configuration for the current context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pconfig</span></tt></dt>
                                 <dd>- Returned cache configuration</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>On devices where the L1 cache and shared memory use the same hardware resources, this function returns through <tt class="ph tt code">pconfig</tt> the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration
                                 if possible, but it is free to choose a different configuration if required to execute functions.
                              </p>
                              <p class="p">This will return a <tt class="ph tt code">pconfig</tt> of <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec47d2f367dc3965c27ff748688229dc22" shape="rect">CU_FUNC_CACHE_PREFER_NONE</a> on devices where the size of the L1 cache and shared memory are fixed.
                              </p>
                              <p class="p">The supported cache configurations are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec47d2f367dc3965c27ff748688229dc22" shape="rect">CU_FUNC_CACHE_PREFER_NONE</a>: no preference for shared memory or L1 (default)
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec712f43defb051d7985317bce426cccc8" shape="rect">CU_FUNC_CACHE_PREFER_SHARED</a>: prefer larger shared memory and smaller L1 cache
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ecb1e6c4e889e1a70ed5283172be08f6a5" shape="rect">CU_FUNC_CACHE_PREFER_L1</a>: prefer larger L1 cache and smaller shared memory
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec4434321280821d844a15b02e4d6c80a9" shape="rect">CU_FUNC_CACHE_PREFER_EQUAL</a>: prefer equal sized L1 cache and shared memory
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a>, <a class="xref" href="group__CUDA__EXEC.html#group__CUDA__EXEC_1g40f8c11e81def95dc0072a375f965681" title="Sets the preferred cache configuration for a device function." shape="rect">cuFuncSetCacheConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g8f13165846b73750693640fb3e8380d0" id="group__CUDA__CTX_1g8f13165846b73750693640fb3e8380d0" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetCurrent (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the CUDA context bound to the calling CPU thread. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pctx</span></tt></dt>
                                 <dd>- Returned context handle</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, 
                              </p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*pctx</tt> the CUDA context bound to the calling CPU thread. If no context is bound to the calling CPU thread then <tt class="ph tt code">*pctx</tt> is set to NULL and <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a> is returned.
                              </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__CUDA__CTX.html#group__CUDA__CTX_1gbe562ee6258b4fcc272ca6478ca2a2f7" title="Binds the specified CUDA context to the calling CPU thread." shape="rect">cuCtxSetCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" id="group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetDevice (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the device ID for the current context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">device</span></tt></dt>
                                 <dd>- Returned device ID for the current context</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, 
                              </p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*device</tt> the ordinal of the current context's device.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" id="group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetLimit (  size_t*<span>&nbsp;</span><span class="keyword keyword apiItemName">pvalue</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" title="" shape="rect">CUlimit</a><span>&nbsp;</span><span class="keyword keyword apiItemName">limit</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns resource limits. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pvalue</span></tt></dt>
                                 <dd>- Returned size of limit</dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">limit</span></tt></dt>
                                 <dd>- Limit to query </dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*pvalue</tt> the current size of <tt class="ph tt code">limit</tt>. The supported <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" shape="rect">CUlimit</a> values are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665ebe51e384a8b4b79459915bb1c31bc39" shape="rect">CU_LIMIT_STACK_SIZE</a>: stack size in bytes of each GPU thread.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266516f25aa2c37a06580ab533d8ae7db948" shape="rect">CU_LIMIT_PRINTF_FIFO_SIZE</a>: size in bytes of the FIFO used by the printf() device system call.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266586d01dbc431b04edd5d618257aaa246b" shape="rect">CU_LIMIT_MALLOC_HEAP_SIZE</a>: size in bytes of the heap used by the malloc() and free() device system calls.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665592fb752cc173ad7a2a4026a40e38079" shape="rect">CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH</a>: maximum grid depth at which a thread can issue the device runtime call cudaDeviceSynchronize() to wait on child grid launches
                                          to complete.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665f79d7134ee03d52c0d8b1aecda1ae446" shape="rect">CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT</a>: maximum number of outstanding device runtime launches that can be made from this context.
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" id="group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetSharedMemConfig (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g92d66e95f602cb9fdaf0682c260c241b" title="" shape="rect">CUsharedconfig</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pConfig</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the current shared memory configuration for the current context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pConfig</span></tt></dt>
                                 <dd>- returned shared memory configuration </dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>This function will return in <tt class="ph tt code">pConfig</tt> the current size of shared memory banks in the current context. On devices with configurable shared memory banks, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2574235fa643f8f251bf7bc28fac3692" title="Sets the shared memory configuration for the current context." shape="rect">cuCtxSetSharedMemConfig</a> can be used to change this setting, so that all subsequent kernel launches will by default use the new bank size. When <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" title="Returns the current shared memory configuration for the current context." shape="rect">cuCtxGetSharedMemConfig</a> is called on devices without configurable shared memory, it will return the fixed bank size of the hardware.
                              </p>
                              <p class="p">The returned bank configurations can be either:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg92d66e95f602cb9fdaf0682c260c241b18d5d945c971d5d288d2693cbaa4d7dc" shape="rect">CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE</a>: shared memory bank width is four bytes.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg92d66e95f602cb9fdaf0682c260c241b081c400b814b9832b8a934ad2934985c" shape="rect">CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE</a>: shared memory bank width will eight bytes.
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" title="Returns the current shared memory configuration for the current context." shape="rect">cuCtxGetSharedMemConfig</a>, <a class="xref" href="group__CUDA__EXEC.html#group__CUDA__EXEC_1g40f8c11e81def95dc0072a375f965681" title="Sets the preferred cache configuration for a device function." shape="rect">cuFuncSetCacheConfig</a>, 
                              </p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g137920ab61a71be6ce67605b9f294091" id="group__CUDA__CTX_1g137920ab61a71be6ce67605b9f294091" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxGetStreamPriorityRange (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">leastPriority</span>, int*<span>&nbsp;</span><span class="keyword keyword apiItemName">greatestPriority</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns numerical values that correspond to the least and greatest stream priorities. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">leastPriority</span></tt></dt>
                                 <dd>- Pointer to an int in which the numerical value for least stream priority is returned </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">greatestPriority</span></tt></dt>
                                 <dd>- Pointer to an int in which the numerical value for greatest stream priority is returned</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, 
                              </p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*leastPriority</tt> and <tt class="ph tt code">*greatestPriority</tt> the numerical values that correspond to the least and greatest stream priorities respectively. Stream priorities follow a
                                 convention where lower numbers imply greater priorities. The range of meaningful stream priorities is given by [<tt class="ph tt code">*greatestPriority</tt>, <tt class="ph tt code">*leastPriority</tt>]. If the user attempts to create a stream with a priority value that is outside the meaningful range as specified by this
                                 API, the priority is automatically clamped down or up to either <tt class="ph tt code">*leastPriority</tt> or <tt class="ph tt code">*greatestPriority</tt> respectively. See <a class="xref" href="group__CUDA__STREAM.html#group__CUDA__STREAM_1g95c1a8c7c3dacb13091692dd9c7f7471" title="Create a stream with the given priority." shape="rect">cuStreamCreateWithPriority</a> for details on creating a priority stream. A NULL may be passed in for <tt class="ph tt code">*leastPriority</tt> or <tt class="ph tt code">*greatestPriority</tt> if the value is not desired.
                              </p>
                              <p class="p">This function will return '0' in both <tt class="ph tt code">*leastPriority</tt> and <tt class="ph tt code">*greatestPriority</tt> if the current context's device does not support stream priorities (see <a class="xref" href="group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g9c3e1414f0ad901d3278a4d6645fc266" title="Returns information about the device." shape="rect">cuDeviceGetAttribute</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__CUDA__STREAM.html#group__CUDA__STREAM_1g95c1a8c7c3dacb13091692dd9c7f7471" title="Create a stream with the given priority." shape="rect">cuStreamCreateWithPriority</a>, <a class="xref" href="group__CUDA__STREAM.html#group__CUDA__STREAM_1g5bd5cb26915a2ecf1921807339488484" title="Query the priority of a given stream." shape="rect">cuStreamGetPriority</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" id="group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxPopCurrent (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pctx</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Pops the current CUDA context from the current CPU thread. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pctx</span></tt></dt>
                                 <dd>- Returned new context handle</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Pops the current CUDA context from the CPU thread and passes back the old context handle in <tt class="ph tt code">*pctx</tt>. That context may then be made current to a different CPU thread by calling <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent()</a>.
                              </p>
                              <p class="p">If a context was current to the CPU thread before <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate()</a> or <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent()</a> was called, this function makes that context current to the CPU thread again.
                              </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" id="group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxPushCurrent (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Pushes a context on the current CPU thread. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ctx</span></tt></dt>
                                 <dd>- Context to push</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Pushes the given context <tt class="ph tt code">ctx</tt> onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA
                                 functions that operate on the current context are affected.
                              </p>
                              <p class="p">The previous current context may be made current again by calling <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy()</a> or <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent()</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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" id="group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxSetCacheConfig (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g3b9bbcf42528b889e9dbe9cfa2aea3ec" title="" shape="rect">CUfunc_cache</a><span>&nbsp;</span><span class="keyword keyword apiItemName">config</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Sets the preferred cache configuration for the current context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">config</span></tt></dt>
                                 <dd>- Requested cache configuration</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>On devices where the L1 cache and shared memory use the same hardware resources, this sets through <tt class="ph tt code">config</tt> the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration
                                 if possible, but it is free to choose a different configuration if required to execute the function. Any function preference
                                 set via <a class="xref" href="group__CUDA__EXEC.html#group__CUDA__EXEC_1g40f8c11e81def95dc0072a375f965681" title="Sets the preferred cache configuration for a device function." shape="rect">cuFuncSetCacheConfig()</a> will be preferred over this context-wide setting. Setting the context-wide cache configuration to <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec47d2f367dc3965c27ff748688229dc22" shape="rect">CU_FUNC_CACHE_PREFER_NONE</a> will cause subsequent kernel launches to prefer to not change the cache configuration unless required to launch the kernel.
                              </p>
                              <p class="p">This setting does nothing on devices where the size of the L1 cache and shared memory are fixed.</p>
                              <p class="p">Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization
                                 point.
                              </p>
                              <p class="p">The supported cache configurations are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec47d2f367dc3965c27ff748688229dc22" shape="rect">CU_FUNC_CACHE_PREFER_NONE</a>: no preference for shared memory or L1 (default)
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec712f43defb051d7985317bce426cccc8" shape="rect">CU_FUNC_CACHE_PREFER_SHARED</a>: prefer larger shared memory and smaller L1 cache
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ecb1e6c4e889e1a70ed5283172be08f6a5" shape="rect">CU_FUNC_CACHE_PREFER_L1</a>: prefer larger L1 cache and smaller shared memory
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg3b9bbcf42528b889e9dbe9cfa2aea3ec4434321280821d844a15b02e4d6c80a9" shape="rect">CU_FUNC_CACHE_PREFER_EQUAL</a>: prefer equal sized L1 cache and shared memory
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a>, <a class="xref" href="group__CUDA__EXEC.html#group__CUDA__EXEC_1g40f8c11e81def95dc0072a375f965681" title="Sets the preferred cache configuration for a device function." shape="rect">cuFuncSetCacheConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1gbe562ee6258b4fcc272ca6478ca2a2f7" id="group__CUDA__CTX_1gbe562ee6258b4fcc272ca6478ca2a2f7" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxSetCurrent (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ctx</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Binds the specified CUDA context to the calling CPU thread. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ctx</span></tt></dt>
                                 <dd>- Context to bind to the calling CPU thread</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Binds the specified CUDA context to the calling CPU thread. If <tt class="ph tt code">ctx</tt> is NULL then the CUDA context previously bound to the calling CPU thread is unbound and <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a> is returned.
                              </p>
                              <p class="p">If there exists a CUDA context stack on the calling CPU thread, this will replace the top of that stack with <tt class="ph tt code">ctx</tt>. If <tt class="ph tt code">ctx</tt> is NULL then this will be equivalent to popping the top of the calling CPU thread's CUDA context stack (or a no-op if the
                                 calling CPU thread's CUDA context stack is empty).
                              </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__CUDA__CTX.html#group__CUDA__CTX_1g8f13165846b73750693640fb3e8380d0" title="Returns the CUDA context bound to the calling CPU thread." shape="rect">cuCtxGetCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" id="group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxSetLimit (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" title="" shape="rect">CUlimit</a><span>&nbsp;</span><span class="keyword keyword apiItemName">limit</span>, size_t<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Set resource limits. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">limit</span></tt></dt>
                                 <dd>- Limit to set </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">value</span></tt></dt>
                                 <dd>- Size of limit</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Setting <tt class="ph tt code">limit</tt> to <tt class="ph tt code">value</tt> is a request by the application to update the current limit maintained by the context. The driver is free to modify the requested
                                 value to meet h/w requirements (this could be clamping to minimum or maximum values, rounding up to nearest element size,
                                 etc). The application can use <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit()</a> to find out exactly what the limit has been set to.
                              </p>
                              <p class="p">Setting each <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ge24c2d4214af24139020f1aecaf32665" shape="rect">CUlimit</a> has its own specific restrictions, so each is discussed here.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665ebe51e384a8b4b79459915bb1c31bc39" shape="rect">CU_LIMIT_STACK_SIZE</a> controls the stack size in bytes of each GPU thread. This limit is only applicable to devices of compute capability 2.0 and
                                          higher. Attempting to set this limit on devices of compute capability less than 2.0 will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266516f25aa2c37a06580ab533d8ae7db948" shape="rect">CU_LIMIT_PRINTF_FIFO_SIZE</a> controls the size in bytes of the FIFO used by the printf() device system call. Setting <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266516f25aa2c37a06580ab533d8ae7db948" shape="rect">CU_LIMIT_PRINTF_FIFO_SIZE</a> must be performed before launching any kernel that uses the printf() device system call, otherwise <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> will be returned. This limit is only applicable to devices of compute capability 2.0 and higher. Attempting to set this limit
                                          on devices of compute capability less than 2.0 will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266586d01dbc431b04edd5d618257aaa246b" shape="rect">CU_LIMIT_MALLOC_HEAP_SIZE</a> controls the size in bytes of the heap used by the malloc() and free() device system calls. Setting <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf3266586d01dbc431b04edd5d618257aaa246b" shape="rect">CU_LIMIT_MALLOC_HEAP_SIZE</a> must be performed before launching any kernel that uses the malloc() or free() device system calls, otherwise <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> will be returned. This limit is only applicable to devices of compute capability 2.0 and higher. Attempting to set this limit
                                          on devices of compute capability less than 2.0 will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665592fb752cc173ad7a2a4026a40e38079" shape="rect">CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH</a> controls the maximum nesting depth of a grid at which a thread can safely call cudaDeviceSynchronize(). Setting this limit
                                          must be performed before any launch of a kernel that uses the device runtime and calls cudaDeviceSynchronize() above the default
                                          sync depth, two levels of grids. Calls to cudaDeviceSynchronize() will fail with error code cudaErrorSyncDepthExceeded if
                                          the limitation is violated. This limit can be set smaller than the default or up the maximum launch depth of 24. When setting
                                          this limit, keep in mind that additional levels of sync depth require the driver to reserve large amounts of device memory
                                          which can no longer be used for user allocations. If these reservations of device memory fail, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a> will return <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, and the limit can be reset to a lower value. This limit is only applicable to devices of compute capability 3.5 and higher.
                                          Attempting to set this limit on devices of compute capability less than 3.5 will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge24c2d4214af24139020f1aecaf32665f79d7134ee03d52c0d8b1aecda1ae446" shape="rect">CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT</a> controls the maximum number of outstanding device runtime launches that can be made from the current context. A grid is outstanding
                                          from the point of launch up until the grid is known to have been completed. Device runtime launches which violate this limitation
                                          fail and return cudaErrorLaunchPendingCountExceeded when cudaGetLastError() is called after launch. If more pending launches
                                          than the default (2048 launches) are needed for a module using the device runtime, this limit can be increased. Keep in mind
                                          that being able to sustain additional pending launches will require the driver to reserve larger amounts of device memory
                                          upfront which can no longer be used for allocations. If these reservations fail, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a> will return <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, and the limit can be reset to a lower value. This limit is only applicable to devices of compute capability 3.5 and higher.
                                          Attempting to set this limit on devices of compute capability less than 3.5 will result in the error <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9d10e6e6ef4b01290d2202d43c3ca6821" shape="rect">CUDA_ERROR_UNSUPPORTED_LIMIT</a> being returned.
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g2574235fa643f8f251bf7bc28fac3692" id="group__CUDA__CTX_1g2574235fa643f8f251bf7bc28fac3692" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxSetSharedMemConfig (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g92d66e95f602cb9fdaf0682c260c241b" title="" shape="rect">CUsharedconfig</a><span>&nbsp;</span><span class="keyword keyword apiItemName">config</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Sets the shared memory configuration for the current context. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">config</span></tt></dt>
                                 <dd>- requested shared memory configuration</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>On devices with configurable shared memory banks, this function will set the context's shared memory bank size which is used
                                 for subsequent kernel launches.
                              </p>
                              <p class="p">Changed the shared memory configuration between launches may insert a device side synchronization point between those launches.</p>
                              <p class="p">Changing the shared memory bank size will not increase shared memory usage or affect occupancy of kernels, but may have major
                                 effects on performance. Larger bank sizes will allow for greater potential bandwidth to shared memory, but will change what
                                 kinds of accesses to shared memory will result in bank conflicts.
                              </p>
                              <p class="p">This function will do nothing on devices with fixed shared memory bank size.</p>
                              <p class="p">The supported bank configurations are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg92d66e95f602cb9fdaf0682c260c241bd65d166d885bd3f41bf1ced4ab8e044e" shape="rect">CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE</a>: set bank width to the default initial setting (currently, four bytes).
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg92d66e95f602cb9fdaf0682c260c241b18d5d945c971d5d288d2693cbaa4d7dc" shape="rect">CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE</a>: set shared memory bank width to be natively four bytes.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg92d66e95f602cb9fdaf0682c260c241b081c400b814b9832b8a934ad2934985c" shape="rect">CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE</a>: set shared memory bank width to be natively eight bytes.
                                       </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" title="Returns the current shared memory configuration for the current context." shape="rect">cuCtxGetSharedMemConfig</a>, <a class="xref" href="group__CUDA__EXEC.html#group__CUDA__EXEC_1g40f8c11e81def95dc0072a375f965681" title="Sets the preferred cache configuration for a device function." shape="rect">cuFuncSetCacheConfig</a>, 
                              </p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" id="group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuCtxSynchronize (  void ) </span></dt>
                        <dd class="description">
                           <div class="section">Block for a context's tasks to complete. </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Blocks until the device has completed all preceding requested tasks. <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" title="Block for a context's tasks to complete." shape="rect">cuCtxSynchronize()</a> returns an error if one of the preceding tasks failed. If the context was created with the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg9f889e28a45a295b5c8ce13aa05f6cd462aebfe6432ade3feb32f1a409027852" shape="rect">CU_CTX_SCHED_BLOCKING_SYNC</a> flag, the CPU thread will block until the GPU context has finished its work.
                              </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__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g088a90490dafca5893ef6fbebc8de8fb" title="Gets the context's API version." shape="rect">cuCtxGetApiVersion</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" title="Returns the preferred cache configuration for the current context." shape="rect">cuCtxGetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g4e84b109eba36cdaaade167f34ae881e" title="Returns the device ID for the current context." shape="rect">cuCtxGetDevice</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" title="Returns resource limits." shape="rect">cuCtxGetLimit</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g2fac188026a062d92e91a8687d0a7902" title="Pops the current CUDA context from the current CPU thread." shape="rect">cuCtxPopCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1gb02d4c850eb16f861fe5a29682cc90ba" title="Pushes a context on the current CPU thread." shape="rect">cuCtxPushCurrent</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" title="Sets the preferred cache configuration for the current context." shape="rect">cuCtxSetCacheConfig</a>, <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" title="Set resource limits." shape="rect">cuCtxSetLimit</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>