Sophie

Sophie

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

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.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="Device Management"></meta>
      <meta name="abstract" content=""></meta>
      <meta name="description" content=""></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="group__CUDART__DEVICE"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>CUDA Runtime API :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="//assets.adobedtm.com/b92787824f2e0e9b68dc2e993f9bd995339fe417/satelliteLib-7ba51e58dc61bcb0e9311aadd02a0108ab24cc6c.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script>
      <script type="text/javascript" src="../search/htmlFileList.js"></script>
      <script type="text/javascript" src="../search/htmlFileInfoList.js"></script>
      <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script>
      <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script>
      <script type="text/javascript" src="../search/index-1.js"></script>
      <script type="text/javascript" src="../search/index-2.js"></script>
      <script type="text/javascript" src="../search/index-3.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/cuda-runtime-api/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <div id="site-content">
         <nav id="site-nav">
            <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit 
                  
                  
                  v10.1.168</a></div>
            <div class="category"><a href="index.html" title="CUDA Runtime API">CUDA Runtime API</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="driver-vs-runtime-api.html#driver-vs-runtime-api">1.&nbsp;Difference between the driver and runtime APIs </a></div>
               </li>
               <li>
                  <div class="section-link"><a href="api-sync-behavior.html#api-sync-behavior">2.&nbsp;API synchronization behavior </a></div>
               </li>
               <li>
                  <div class="section-link"><a href="stream-sync-behavior.html#stream-sync-behavior">3.&nbsp;Stream synchronization behavior</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="graphs-thread-safety.html#graphs-thread-safety">4.&nbsp;Graph object thread safety</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="modules.html#modules">5.&nbsp;Modules</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="group__CUDART__DEVICE.html#group__CUDART__DEVICE">5.1.&nbsp;Device Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__THREAD__DEPRECATED.html#group__CUDART__THREAD__DEPRECATED">5.2.&nbsp;Thread Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__ERROR.html#group__CUDART__ERROR">5.3.&nbsp;Error Handling</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__STREAM.html#group__CUDART__STREAM">5.4.&nbsp;Stream Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EVENT.html#group__CUDART__EVENT">5.5.&nbsp;Event Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EXTRES__INTEROP.html#group__CUDART__EXTRES__INTEROP">5.6.&nbsp;External Resource Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION">5.7.&nbsp;Execution Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OCCUPANCY.html#group__CUDART__OCCUPANCY">5.8.&nbsp;Occupancy</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__MEMORY.html#group__CUDART__MEMORY">5.9.&nbsp;Memory Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__MEMORY__DEPRECATED.html#group__CUDART__MEMORY__DEPRECATED">5.10.&nbsp;Memory Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__UNIFIED.html#group__CUDART__UNIFIED">5.11.&nbsp;Unified Addressing</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__PEER.html#group__CUDART__PEER">5.12.&nbsp;Peer Device Memory Access</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OPENGL.html#group__CUDART__OPENGL">5.13.&nbsp;OpenGL Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__OPENGL__DEPRECATED.html#group__CUDART__OPENGL__DEPRECATED">5.14.&nbsp;OpenGL Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D9.html#group__CUDART__D3D9">5.15.&nbsp;Direct3D 9 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D9__DEPRECATED.html#group__CUDART__D3D9__DEPRECATED">5.16.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D10.html#group__CUDART__D3D10">5.17.&nbsp;Direct3D 10 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D10__DEPRECATED.html#group__CUDART__D3D10__DEPRECATED">5.18.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D11.html#group__CUDART__D3D11">5.19.&nbsp;Direct3D 11 Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__D3D11__DEPRECATED.html#group__CUDART__D3D11__DEPRECATED">5.20.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__VDPAU.html#group__CUDART__VDPAU">5.21.&nbsp;VDPAU Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__EGL.html#group__CUDART__EGL">5.22.&nbsp;EGL Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__INTEROP.html#group__CUDART__INTEROP">5.23.&nbsp;Graphics Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TEXTURE.html#group__CUDART__TEXTURE">5.24.&nbsp;Texture Reference Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__SURFACE.html#group__CUDART__SURFACE">5.25.&nbsp;Surface Reference Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TEXTURE__OBJECT.html#group__CUDART__TEXTURE__OBJECT">5.26.&nbsp;Texture Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__SURFACE__OBJECT.html#group__CUDART__SURFACE__OBJECT">5.27.&nbsp;Surface Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART____VERSION.html#group__CUDART____VERSION">5.28.&nbsp;Version Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__GRAPH.html#group__CUDART__GRAPH">5.29.&nbsp;Graph Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL">5.30.&nbsp;C++ API Routines</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__DRIVER.html#group__CUDART__DRIVER">5.31.&nbsp;Interactions with the CUDA Driver API</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__PROFILER.html#group__CUDART__PROFILER">5.32.&nbsp;Profiler Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDART__TYPES.html#group__CUDART__TYPES">5.33.&nbsp;Data types used by CUDA Runtime</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="annotated.html#annotated">6.&nbsp;Data Structures</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="class____cudaOccupancyB2DHelper.html#class____cudaOccupancyB2DHelper">6.1.&nbsp;__cudaOccupancyB2DHelper</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaChannelFormatDesc.html#structcudaChannelFormatDesc">6.2.&nbsp;cudaChannelFormatDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaDeviceProp.html#structcudaDeviceProp">6.3.&nbsp;cudaDeviceProp</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaEglFrame.html#structcudaEglFrame">6.4.&nbsp;cudaEglFrame</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaEglPlaneDesc.html#structcudaEglPlaneDesc">6.5.&nbsp;cudaEglPlaneDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExtent.html#structcudaExtent">6.6.&nbsp;cudaExtent</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalMemoryBufferDesc.html#structcudaExternalMemoryBufferDesc">6.7.&nbsp;cudaExternalMemoryBufferDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalMemoryHandleDesc.html#structcudaExternalMemoryHandleDesc">6.8.&nbsp;cudaExternalMemoryHandleDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalMemoryMipmappedArrayDesc.html#structcudaExternalMemoryMipmappedArrayDesc">6.9.&nbsp;cudaExternalMemoryMipmappedArrayDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalSemaphoreHandleDesc.html#structcudaExternalSemaphoreHandleDesc">6.10.&nbsp;cudaExternalSemaphoreHandleDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalSemaphoreSignalParams.html#structcudaExternalSemaphoreSignalParams">6.11.&nbsp;cudaExternalSemaphoreSignalParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaExternalSemaphoreWaitParams.html#structcudaExternalSemaphoreWaitParams">6.12.&nbsp;cudaExternalSemaphoreWaitParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaFuncAttributes.html#structcudaFuncAttributes">6.13.&nbsp;cudaFuncAttributes</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaHostNodeParams.html#structcudaHostNodeParams">6.14.&nbsp;cudaHostNodeParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t">6.15.&nbsp;cudaIpcEventHandle_t</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t">6.16.&nbsp;cudaIpcMemHandle_t</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaKernelNodeParams.html#structcudaKernelNodeParams">6.17.&nbsp;cudaKernelNodeParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaLaunchParams.html#structcudaLaunchParams">6.18.&nbsp;cudaLaunchParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaMemcpy3DParms.html#structcudaMemcpy3DParms">6.19.&nbsp;cudaMemcpy3DParms</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaMemcpy3DPeerParms.html#structcudaMemcpy3DPeerParms">6.20.&nbsp;cudaMemcpy3DPeerParms</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaMemsetParams.html#structcudaMemsetParams">6.21.&nbsp;cudaMemsetParams</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPitchedPtr.html#structcudaPitchedPtr">6.22.&nbsp;cudaPitchedPtr</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPointerAttributes.html#structcudaPointerAttributes">6.23.&nbsp;cudaPointerAttributes</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaPos.html#structcudaPos">6.24.&nbsp;cudaPos</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaResourceDesc.html#structcudaResourceDesc">6.25.&nbsp;cudaResourceDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaResourceViewDesc.html#structcudaResourceViewDesc">6.26.&nbsp;cudaResourceViewDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structcudaTextureDesc.html#structcudaTextureDesc">6.27.&nbsp;cudaTextureDesc</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUuuid__st.html#structCUuuid__st">6.28.&nbsp;CUuuid_st</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structsurfaceReference.html#structsurfaceReference">6.29.&nbsp;surfaceReference</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structtextureReference.html#structtextureReference">6.30.&nbsp;textureReference</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="functions.html#functions">7.&nbsp;Data Fields</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="deprecated.html#deprecated">8.&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="modules.html" shape="rect">&lt; Previous</a> | <a href="group__CUDART__THREAD__DEPRECATED.html" shape="rect">Next &gt;</a></div>
               <div id="release-info">CUDA Runtime API
                  (<a href="../../pdf/CUDA_Runtime_API.pdf">PDF</a>)
                  -
                   
                  
                  
                  v10.1.168
                  (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
                  -
                  Last updated April 24, 2019
                  -
                  <a href="mailto:CUDAIssues@nvidia.com?subject=CUDA Toolkit Documentation Feedback: CUDA Runtime API">Send Feedback</a></div>
            </div>
            <article id="contents">
               <div class="topic reference apiRef apiPackage cppModule" id="group__CUDART__DEVICE"><a name="group__CUDART__DEVICE" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">5.1.&nbsp;Device Management</h2>
                  <div class="section">
                     <p>This section describes the device management functions of the CUDA runtime application programming interface. </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Functions</h3>
                  <dl class="members">
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" shape="rect">cudaChooseDevice</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span>, const <a href="structcudaDeviceProp.html#structcudaDeviceProp" title="" shape="rect">cudaDeviceProp</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">prop</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Select compute-device which best matches criteria. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1gb22e8256592b836df9a9cc36c9db7151" shape="rect">cudaDeviceGetAttribute</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49e2f8c2c0bd6fe264f2fc970912e5cd" title="" shape="rect">cudaDeviceAttr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns information about the device. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g65f57fb8d0981ca03f6f9b20031c3e5d" shape="rect">cudaDeviceGetByPCIBusId</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span>, const char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pciBusId</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns a handle to a compute device. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" shape="rect">cudaDeviceGetCacheConfig</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gb980f35ed69ee7991704de29a13de49b" title="" shape="rect">cudaFuncCache *</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCacheConfig</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the preferred cache configuration for the current device. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1g720e159aeb125910c22aa20fe9611ec2" shape="rect">cudaDeviceGetLimit</a> (  size_t*<span>&nbsp;</span><span class="keyword keyword apiItemName">pValue</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" title="" shape="rect">cudaLimit</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"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gc63e5bf168e53b2daf71904eab048fa9" shape="rect">cudaDeviceGetP2PAttribute</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g2f597e2acceab33f60bd61c41fea0c1b" title="" shape="rect">cudaDeviceP2PAttr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">srcDevice</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">dstDevice</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Queries attributes of the link between two devices. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gea264dad3d8c4898e0b82213c0253def" shape="rect">cudaDeviceGetPCIBusId</a> (  char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pciBusId</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">len</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns a PCI Bus Id string for the device. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1g318e21528985458de8613d87da832b42" shape="rect">cudaDeviceGetSharedMemConfig</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6e62d15f3c224625e8c9aa946f1709a6" title="" shape="rect">cudaSharedMemConfig *</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pConfig</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the shared memory configuration for the current device. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gfdb79818f7c0ee7bc585648c91770275" shape="rect">cudaDeviceGetStreamPriorityRange</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"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gef69dd5c6d0206c2b8d099abac61f217" shape="rect">cudaDeviceReset</a> (  void ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Destroy all allocations and reset all state on the current device in the current process. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" shape="rect">cudaDeviceSetCacheConfig</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gb980f35ed69ee7991704de29a13de49b" title="" shape="rect">cudaFuncCache</a><span>&nbsp;</span><span class="keyword keyword apiItemName">cacheConfig</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Sets the preferred cache configuration for the current device. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" shape="rect">cudaDeviceSetLimit</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" title="" shape="rect">cudaLimit</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"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1ga4f3f8a422968f9524012f43ba852058" shape="rect">cudaDeviceSetSharedMemConfig</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6e62d15f3c224625e8c9aa946f1709a6" title="" shape="rect">cudaSharedMemConfig</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 device. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" shape="rect">cudaDeviceSynchronize</a> (  void ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Wait for compute device to finish. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" shape="rect">cudaGetDevice</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns which device is currently being used. </span></dd>
                     <dt><span class="member_long_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​
                           <span class="keyword keyword apiItemName">__device__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name_long_type"><a href="#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" shape="rect">cudaGetDeviceCount</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">count</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns the number of compute-capable devices. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1gf830794caf068b71638c6182bba8f77a" shape="rect">cudaGetDeviceFlags</a> (  unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets the flags for the current device. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" shape="rect">cudaGetDeviceProperties</a> (  <a href="structcudaDeviceProp.html#structcudaDeviceProp" title="" shape="rect">cudaDeviceProp</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">prop</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns information about the compute-device. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" shape="rect">cudaIpcCloseMemHandle</a> (  void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Close memory mapped with cudaIpcOpenMemHandle. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" shape="rect">cudaIpcGetEventHandle</a> (  <a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t" title="" shape="rect">cudaIpcEventHandle_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets an interprocess handle for a previously allocated event. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" shape="rect">cudaIpcGetMemHandle</a> (  <a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t" title="" shape="rect">cudaIpcMemHandle_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets an interprocess memory handle for an existing device memory allocation. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" shape="rect">cudaIpcOpenEventHandle</a> (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, <a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t" title="" shape="rect">cudaIpcEventHandle_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Opens an interprocess event handle for use in the current process. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" shape="rect">cudaIpcOpenMemHandle</a> (  void**<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span>, <a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t" title="" shape="rect">cudaIpcMemHandle_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
                           </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" shape="rect">cudaSetDevice</a> (  int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Set device to be used for GPU executions. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" shape="rect">cudaSetDeviceFlags</a> (  unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Sets flags to be used for device executions. </span></dd>
                     <dt><span class="member_type"><span class="keyword keyword apiItemName">__host__</span>
                           ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a>&nbsp;</span><span class="member_name"><a href="#group__CUDART__DEVICE_1g1b9336c70f2299405f67a4f8496d7cfe" shape="rect">cudaSetValidDevices</a> (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device_arr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">len</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Set a list of devices that can be used for CUDA. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" id="group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaChooseDevice (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span>, const <a href="structcudaDeviceProp.html#structcudaDeviceProp" title="" shape="rect">cudaDeviceProp</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">prop</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Select compute-device which best matches criteria. </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>- Device with best match </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">prop</span></tt></dt>
                                 <dd>- Desired device properties</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*device</tt> the device which has properties that best match <tt class="ph tt code">*prop</tt>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gb22e8256592b836df9a9cc36c9db7151" id="group__CUDART__DEVICE_1gb22e8256592b836df9a9cc36c9db7151" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetAttribute (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49e2f8c2c0bd6fe264f2fc970912e5cd" title="" shape="rect">cudaDeviceAttr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns information about the device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">value</span></tt></dt>
                                 <dd>- Returned device attribute value </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">attr</span></tt></dt>
                                 <dd>- Device attribute to query </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">device</span></tt></dt>
                                 <dd>- Device number to query</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*value</tt> the integer value of the attribute <tt class="ph tt code">attr</tt> on device <tt class="ph tt code">device</tt>. The supported attributes are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd08fbcb2d50dbfad988a6203170b10156" shape="rect">cudaDevAttrMaxThreadsPerBlock</a>: Maximum number of threads per block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdf6d8420cf810d454284e7f6a702597f8" shape="rect">cudaDevAttrMaxBlockDimX</a>: Maximum x-dimension of a block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd0fdadc81fcef7969fc4c24260a582601" shape="rect">cudaDevAttrMaxBlockDimY</a>: Maximum y-dimension of a block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cde4a6ca644302689dbc6dd8a7a5fca03d" shape="rect">cudaDevAttrMaxBlockDimZ</a>: Maximum z-dimension of a block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd744bfd226d491b299cf70ebabcab3757" shape="rect">cudaDevAttrMaxGridDimX</a>: Maximum x-dimension of a grid;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd28faa2a117810186bb90f3d5432bb70d" shape="rect">cudaDevAttrMaxGridDimY</a>: Maximum y-dimension of a grid;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd5bd31420dbad853642a42e69958c7cbc" shape="rect">cudaDevAttrMaxGridDimZ</a>: Maximum z-dimension of a grid;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdcf1490f9974e877131048b1b3eb8bdcc" shape="rect">cudaDevAttrMaxSharedMemoryPerBlock</a>: Maximum amount of shared memory available to a thread block in bytes;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdca216ef679ac7324567d35fb947f3e64" shape="rect">cudaDevAttrTotalConstantMemory</a>: Memory available on device for __constant__ variables in a CUDA C kernel in bytes;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd6bc392b398b9209d8a3431debec990fd" shape="rect">cudaDevAttrWarpSize</a>: Warp size in threads;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd7e7a9cf0ed2a239199d499ae5091f281" shape="rect">cudaDevAttrMaxPitch</a>: Maximum pitch in bytes allowed by the memory copy functions that involve memory regions allocated through <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g32bd7a39135594788a542ae72217775c" title="Allocates pitched memory on the device." shape="rect">cudaMallocPitch()</a>;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd7bd81d5b47f5890da85f352862a8d33e" shape="rect">cudaDevAttrMaxTexture1DWidth</a>: Maximum 1D texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd1de34e923feff0673f3fce9131f42051" shape="rect">cudaDevAttrMaxTexture1DLinearWidth</a>: Maximum width for a 1D texture bound to linear memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdeda31a42f6e0adbffa52f0b1d352b4fa" shape="rect">cudaDevAttrMaxTexture1DMipmappedWidth</a>: Maximum mipmapped 1D texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb5d795b3f581056805544ef28511075d" shape="rect">cudaDevAttrMaxTexture2DWidth</a>: Maximum 2D texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdcf28c321f66908dc1ec9cb46d9ec59a5" shape="rect">cudaDevAttrMaxTexture2DHeight</a>: Maximum 2D texture height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd2fa1932b63870857f540b28e4444a02f" shape="rect">cudaDevAttrMaxTexture2DLinearWidth</a>: Maximum width for a 2D texture bound to linear memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd9e6b26ed4fa978295a706d536b6fd2d4" shape="rect">cudaDevAttrMaxTexture2DLinearHeight</a>: Maximum height for a 2D texture bound to linear memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdbd3b15e8d7f58f04c31873bef0cf117c" shape="rect">cudaDevAttrMaxTexture2DLinearPitch</a>: Maximum pitch in bytes for a 2D texture bound to linear memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cde05045d1eba85ad27f416222c2d03ace" shape="rect">cudaDevAttrMaxTexture2DMipmappedWidth</a>: Maximum mipmapped 2D texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd3b6d9586385e9d6b86e0c6859fe570cd" shape="rect">cudaDevAttrMaxTexture2DMipmappedHeight</a>: Maximum mipmapped 2D texture height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cda0017a2ead91b03d1075c306aced933c" shape="rect">cudaDevAttrMaxTexture3DWidth</a>: Maximum 3D texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd14bced4c8e08e4ca35d1324a22476a5c" shape="rect">cudaDevAttrMaxTexture3DHeight</a>: Maximum 3D texture height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc2a1bce21302fee6da652e0afd92dfc0" shape="rect">cudaDevAttrMaxTexture3DDepth</a>: Maximum 3D texture depth;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdd1bffdc561f20553849b54e7ebbbde11" shape="rect">cudaDevAttrMaxTexture3DWidthAlt</a>: Alternate maximum 3D texture width, 0 if no alternate maximum 3D texture size is supported;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd289c6eb12fb79d51b9ad3bb2b8bc7357" shape="rect">cudaDevAttrMaxTexture3DHeightAlt</a>: Alternate maximum 3D texture height, 0 if no alternate maximum 3D texture size is supported;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdf30a2551356d44cee876398067aae25a" shape="rect">cudaDevAttrMaxTexture3DDepthAlt</a>: Alternate maximum 3D texture depth, 0 if no alternate maximum 3D texture size is supported;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd849f60b9f26213c8f2c17716e0884228" shape="rect">cudaDevAttrMaxTextureCubemapWidth</a>: Maximum cubemap texture width or height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd8a09b5ae0d4ea648878fcb6c1d6302c2" shape="rect">cudaDevAttrMaxTexture1DLayeredWidth</a>: Maximum 1D layered texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd68019a4c962a0967b80f9553657976ae" shape="rect">cudaDevAttrMaxTexture1DLayeredLayers</a>: Maximum layers in a 1D layered texture;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd9493ee965d9c35d2a2d6cc19b9af393c" shape="rect">cudaDevAttrMaxTexture2DLayeredWidth</a>: Maximum 2D layered texture width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd6a86483d8f56dc1796c29c0dfdcff85e" shape="rect">cudaDevAttrMaxTexture2DLayeredHeight</a>: Maximum 2D layered texture height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb64a8c3b8857209d411dcdd18d6566cd" shape="rect">cudaDevAttrMaxTexture2DLayeredLayers</a>: Maximum layers in a 2D layered texture;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd69c79fb543330218be45f046361d9c6c" shape="rect">cudaDevAttrMaxTextureCubemapLayeredWidth</a>: Maximum cubemap layered texture width or height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cda22e3d29bc779b832338003a58c11771" shape="rect">cudaDevAttrMaxTextureCubemapLayeredLayers</a>: Maximum layers in a cubemap layered texture;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cde982243eeba0012a8309719bbdf8e787" shape="rect">cudaDevAttrMaxSurface1DWidth</a>: Maximum 1D surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd9c847f23d3ac641e49273fa7e7aadad4" shape="rect">cudaDevAttrMaxSurface2DWidth</a>: Maximum 2D surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd6d65871ae86777965f63375924e5d4b6" shape="rect">cudaDevAttrMaxSurface2DHeight</a>: Maximum 2D surface height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd95fdef60393108768816b49a69412fea" shape="rect">cudaDevAttrMaxSurface3DWidth</a>: Maximum 3D surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdcd29057dfab0acc9c1b4bae62b31a6fc" shape="rect">cudaDevAttrMaxSurface3DHeight</a>: Maximum 3D surface height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc65f6e09e306453928e504124f0400d2" shape="rect">cudaDevAttrMaxSurface3DDepth</a>: Maximum 3D surface depth;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd0bb5be7291722c024db914e67b16bb0f" shape="rect">cudaDevAttrMaxSurface1DLayeredWidth</a>: Maximum 1D layered surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cda11787cba44bfcdab50a565546718fde" shape="rect">cudaDevAttrMaxSurface1DLayeredLayers</a>: Maximum layers in a 1D layered surface;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd5f8341be4c264cec2ddd9c153e74b2a2" shape="rect">cudaDevAttrMaxSurface2DLayeredWidth</a>: Maximum 2D layered surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd349a016c64a83540a16efcd6c7f48002" shape="rect">cudaDevAttrMaxSurface2DLayeredHeight</a>: Maximum 2D layered surface height;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdaaa31c1f16c4cc6c4934964045417d42" shape="rect">cudaDevAttrMaxSurface2DLayeredLayers</a>: Maximum layers in a 2D layered surface;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd330ae617b2503e5a7ec2c74cd65d73e0" shape="rect">cudaDevAttrMaxSurfaceCubemapWidth</a>: Maximum cubemap surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd3287281e5a089843d5a8eb140187126d" shape="rect">cudaDevAttrMaxSurfaceCubemapLayeredWidth</a>: Maximum cubemap layered surface width;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdbe8696b02b34231e6cc0058553d7ad7d" shape="rect">cudaDevAttrMaxSurfaceCubemapLayeredLayers</a>: Maximum layers in a cubemap layered surface;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cddfbbe8d1cb269bf4824f5465b71f2e1f" shape="rect">cudaDevAttrMaxRegistersPerBlock</a>: Maximum number of 32-bit registers available to a thread block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd0bc2bd833cdf0f092a43f4fab7221a9e" shape="rect">cudaDevAttrClockRate</a>: Peak clock frequency in kilohertz;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdea4010e77cea234af52cb9b6ba53faf3" shape="rect">cudaDevAttrTextureAlignment</a>: Alignment requirement; texture base addresses aligned to textureAlign bytes do not need an offset applied to texture fetches;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd57e9e5b8b5911a542b3d3c338cdc936a" shape="rect">cudaDevAttrTexturePitchAlignment</a>: Pitch alignment requirement for 2D texture references bound to pitched memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc73c5b37c6e88c0ea32829b4dfea20e9" shape="rect">cudaDevAttrGpuOverlap</a>: 1 if the device can concurrently copy memory between host and device while executing a kernel, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd74de9ed281f917c8e4ef272da09f338a" shape="rect">cudaDevAttrMultiProcessorCount</a>: Number of multiprocessors on the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd94c4716a60420f8e7ff2464f6381faea" shape="rect">cudaDevAttrKernelExecTimeout</a>: 1 if there is a run time limit for kernels executed on the device, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd5e2efe8fc55f0602896a582f915e8ade" shape="rect">cudaDevAttrIntegrated</a>: 1 if the device is integrated with the memory subsystem, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdab8d5fcf5498b163c2a342487b0799c6" shape="rect">cudaDevAttrCanMapHostMemory</a>: 1 if the device can map host memory into the CUDA address space, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <div class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd60b1eb0c9d9c5d10cc15f8d22bd635b1" shape="rect">cudaDevAttrComputeMode</a>: Compute mode is the compute mode that the device is currently in. Available modes are as follows:
                                          <ul class="ul">
                                             <li class="li">
                                                <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d04f74579a1612e99d5a3170813897b34f" shape="rect">cudaComputeModeDefault</a>: Default mode - Device is not restricted and multiple threads can use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d06965403d087b7f1153726c999bbc879c" shape="rect">cudaComputeModeExclusive</a>: Compute-exclusive mode - Only one thread will be able to use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d0fc71b88518e4501544d6e65b5f3671b6" shape="rect">cudaComputeModeProhibited</a>: Compute-prohibited mode - No threads can use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d02cd032834fecbec513ea1018145b111d" shape="rect">cudaComputeModeExclusiveProcess</a>: Compute-exclusive-process mode - Many threads in one process will be able to use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                          </ul>
                                       </div>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdca44ee69956aa3575ae528453c92145b" shape="rect">cudaDevAttrConcurrentKernels</a>: 1 if the device supports executing multiple kernels within the same context simultaneously, or 0 if not. It is not guaranteed
                                          that multiple kernels will be resident on the device concurrently so this feature should not be relied upon for correctness;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd4eda3f8cee267406e6a5bae59e0e9355" shape="rect">cudaDevAttrEccEnabled</a>: 1 if error correction is enabled on the device, 0 if error correction is disabled or not supported by the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd43510a3c7deb77547365592346efea2e" shape="rect">cudaDevAttrPciBusId</a>: PCI bus identifier of the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb4dbdca8eaaf0da8c10f7625811923d6" shape="rect">cudaDevAttrPciDeviceId</a>: PCI device (also known as slot) identifier of the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc56e7ca3cfe198f40ec5af569f509594" shape="rect">cudaDevAttrTccDriver</a>: 1 if the device is using a TCC driver. TCC is only available on Tesla hardware running Windows Vista or later;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb496a68470a711a91b1decaf3722b876" shape="rect">cudaDevAttrMemoryClockRate</a>: Peak memory clock frequency in kilohertz;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd3b05daa4e76a34af2183f31143bb9a92" shape="rect">cudaDevAttrGlobalMemoryBusWidth</a>: Global memory bus width in bits;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd1b0342682d15910022ba3f383a851ad7" shape="rect">cudaDevAttrL2CacheSize</a>: Size of L2 cache in bytes. 0 if the device doesn't have L2 cache;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd7134e378583c080549742fae9e9ab2c1" shape="rect">cudaDevAttrMaxThreadsPerMultiProcessor</a>: Maximum resident threads per multiprocessor;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd00bbd7151c3af0c95253182a82a9ad37" shape="rect">cudaDevAttrUnifiedAddressing</a>: 1 if the device shares a unified address space with the host, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd220ff111a6616ab512e229d8f2f8bf87" shape="rect">cudaDevAttrComputeCapabilityMajor</a>: Major compute capability version number;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd2c981c76c9de58d39502e483a7b484c7" shape="rect">cudaDevAttrComputeCapabilityMinor</a>: Minor compute capability version number;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd98c866015b622979af1ffd155867561b" shape="rect">cudaDevAttrStreamPrioritiesSupported</a>: 1 if the device supports stream priorities, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb604005d7e05a02d8456ea88a98df71a" shape="rect">cudaDevAttrGlobalL1CacheSupported</a>: 1 if device supports caching globals in L1 cache, 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdf7b1a72971ff5b5e4f7b8aed3c2402f6" shape="rect">cudaDevAttrLocalL1CacheSupported</a>: 1 if device supports caching locals in L1 cache, 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc478150b5ec1689a2944aaf7e25a5685" shape="rect">cudaDevAttrMaxSharedMemoryPerMultiprocessor</a>: Maximum amount of shared memory available to a multiprocessor in bytes; this amount is shared by all thread blocks simultaneously
                                          resident on a multiprocessor;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdbfd53fc7581bed23d0f68860e5aa7519" shape="rect">cudaDevAttrMaxRegistersPerMultiprocessor</a>: Maximum number of 32-bit registers available to a multiprocessor; this number is shared by all thread blocks simultaneously
                                          resident on a multiprocessor;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd5467985f87821a03625ab62e72195ff8" shape="rect">cudaDevAttrManagedMemory</a>: 1 if device supports allocating managed memory, 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd0b9ed60aade2b0822cce3333c7328ac0" shape="rect">cudaDevAttrIsMultiGpuBoard</a>: 1 if device is on a multi-GPU board, 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cda1a1451c4d46071acf2b0d5a1b266b62" shape="rect">cudaDevAttrMultiGpuBoardGroupID</a>: Unique identifier for a group of devices on the same multi-GPU board;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdbe97c871f26473bdede939ce116e1230" shape="rect">cudaDevAttrHostNativeAtomicSupported</a>: 1 if the link between the device and the host supports native atomic operations;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd4ac89cbfc8aa6328b51942f5db4d312e" shape="rect">cudaDevAttrSingleToDoublePrecisionPerfRatio</a>: Ratio of single precision performance (in floating-point operations per second) to double precision performance;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cddc80992427a92713e699953a6d249d6f" shape="rect">cudaDevAttrPageableMemoryAccess</a>: 1 if the device supports coherently accessing pageable memory without calling cudaHostRegister on it, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc88178f29891f2c18fe67361cc80de09" shape="rect">cudaDevAttrConcurrentManagedAccess</a>: 1 if the device can coherently access managed memory concurrently with the CPU, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cde023ca14ea2a9aa5b829f0a63baa2001" shape="rect">cudaDevAttrComputePreemptionSupported</a>: 1 if the device supports Compute Preemption, 0 if not.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdb08e379a7a038dc8134914702c223f69" shape="rect">cudaDevAttrCanUseHostPointerForRegisteredMem</a>: 1 if the device can access host registered memory at the same virtual address as the CPU, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd108260813c2eb395a60d4acf08c97595" shape="rect">cudaDevAttrCooperativeLaunch</a>: 1 if the device supports launching cooperative kernels via <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1gc0210b928f9bf4e212af07d35ac11d67" title="Launches a device function." shape="rect">cudaLaunchCooperativeKernel</a>, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdd23f91b7405936dcbdb32cccf4598ea3" shape="rect">cudaDevAttrCooperativeMultiDeviceLaunch</a>: 1 if the device supports launching cooperative kernels via <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g20f8d75d8786c54cc168c47fde66ee52" title="Launches device functions on multiple devices where thread blocks can cooperate and synchronize as they execute." shape="rect">cudaLaunchCooperativeKernelMultiDevice</a>, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd7028b9e7fccc21045febe4ee96a33e0e" shape="rect">cudaDevAttrCanFlushRemoteWrites</a>: 1 if the device supports flushing of outstanding remote writes, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd6ea4a004a336c3c95b6ff06ec6269e29" shape="rect">cudaDevAttrHostRegisterSupported</a>: 1 if the device supports host memory registration via <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ge8d5c17670f16ac4fc8fcb4181cb490c" title="Registers an existing host memory range for use by CUDA." shape="rect">cudaHostRegister</a>, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cdc228cf8983c97d0e035da72a71494eaa" shape="rect">cudaDevAttrPageableMemoryAccessUsesHostPageTables</a>: 1 if the device accesses pageable memory via the host's page tables, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cde3b8c9e94a896324793a79584a23266f" shape="rect">cudaDevAttrDirectManagedMemAccessFromHost</a>: 1 if the host can directly access managed memory on the device without migration, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg49e2f8c2c0bd6fe264f2fc970912e5cd024f669ca60d8ff7b3126dbfc61fd925" shape="rect">cudaDevAttrMaxSharedMemoryPerBlockOptin</a>: Maximum per block shared memory size on the device. This value can be opted into when using <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g422642bfa0c035a590e4c43ff7c11f8d" title="[C++ API] Set attributes for a given function" shape="rect">cudaFuncSetAttribute</a></p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g9c3e1414f0ad901d3278a4d6645fc266" target="_blank" shape="rect">cuDeviceGetAttribute</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g65f57fb8d0981ca03f6f9b20031c3e5d" id="group__CUDART__DEVICE_1g65f57fb8d0981ca03f6f9b20031c3e5d" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetByPCIBusId (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span>, const char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pciBusId</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns a handle to a compute device. </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 ordinal</dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pciBusId</span></tt></dt>
                                 <dd>- String in one of the following forms: [domain]:[bus]:[device].[function] [domain]:[bus]:[device] [bus]:[device].[function]
                                    where <tt class="ph tt code">domain</tt>, <tt class="ph tt code">bus</tt>, <tt class="ph tt code">device</tt>, and <tt class="ph tt code">function</tt> are all hexadecimal values
                                 </dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*device</tt> a device ordinal given a PCI bus ID string.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gea264dad3d8c4898e0b82213c0253def" title="Returns a PCI Bus Id string for the device." shape="rect">cudaDeviceGetPCIBusId</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1ga89cd3fa06334ba7853ed1232c5ebe2a" target="_blank" shape="rect">cuDeviceGetByPCIBusId</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" id="group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetCacheConfig (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gb980f35ed69ee7991704de29a13de49b" title="" shape="rect">cudaFuncCache *</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCacheConfig</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the preferred cache configuration for the current device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCacheConfig</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</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 returns through <tt class="ph tt code">pCacheConfig</tt> the preferred cache configuration for the current device. This is only a preference. The runtime 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">pCacheConfig</tt> of <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b3b4b8c65376ce1ca107be413e15981bc" shape="rect">cudaFuncCachePreferNone</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__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b3b4b8c65376ce1ca107be413e15981bc" shape="rect">cudaFuncCachePreferNone</a>: no preference for shared memory or L1 (default)
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b84725d25c531f9bafc61ae329afe5b2b" shape="rect">cudaFuncCachePreferShared</a>: prefer larger shared memory and smaller L1 cache
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b8ecb48ccbc2230c81528a2c7c695100e" shape="rect">cudaFuncCachePreferL1</a>: prefer larger L1 cache and smaller shared memory
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49bd151ac8d667150c601de4b9542887a3b" shape="rect">cudaFuncCachePreferEqual</a>: prefer equal size 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><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" title="Sets the preferred cache configuration for the current device." shape="rect">cudaDeviceSetCacheConfig</a>, <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g6699ca1943ac2655effa0d571b2f4f15" title="Sets the preferred cache configuration for a device function." shape="rect">cudaFuncSetCacheConfig ( C API)</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g7d9cc996fe45b6260ebb086caff1c685" title="[C++ API] Sets the preferred cache configuration for a device function" shape="rect">cudaFuncSetCacheConfig ( C++ API)</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g40b6b141698f76744dea6e39b9a25360" target="_blank" shape="rect">cuCtxGetCacheConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g720e159aeb125910c22aa20fe9611ec2" id="group__CUDART__DEVICE_1g720e159aeb125910c22aa20fe9611ec2" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetLimit (  size_t*<span>&nbsp;</span><span class="keyword keyword apiItemName">pValue</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" title="" shape="rect">cudaLimit</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 the 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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c3b950b6f8668f7282fae25bfcefd13a" shape="rect">cudaErrorUnsupportedLimit</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>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__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" shape="rect">cudaLimit</a> values are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc93651fc8f54e641c9b133f1b57703d22ce656" shape="rect">cudaLimitStackSize</a>: stack size in bytes of each GPU thread;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365123b80a6221a6853e918c2816bb76742c" shape="rect">cudaLimitPrintfFifoSize</a>: size in bytes of the shared FIFO used by the printf() device system call.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc93651b399716bf0a592bc42055473c1273881" shape="rect">cudaLimitMallocHeapSize</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365123c4900be4af436cb769e4c72d07be11" shape="rect">cudaLimitDevRuntimeSyncDepth</a>: maximum grid depth at which a thread can isssue the device runtime call <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize()</a> to wait on child grid launches to complete.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365118712cb05d2c3efaeea73afba823d916" shape="rect">cudaLimitDevRuntimePendingLaunchCount</a>: maximum number of outstanding device runtime launches.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365168d3522068213e4ba46c4c99ebc4ce12" shape="rect">cudaLimitMaxL2FetchGranularity</a>: L2 cache fetch granularity.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" title="Set resource limits." shape="rect">cudaDeviceSetLimit</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g9f2d47d1745752aa16da7ed0d111b6a8" target="_blank" shape="rect">cuCtxGetLimit</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gc63e5bf168e53b2daf71904eab048fa9" id="group__CUDART__DEVICE_1gc63e5bf168e53b2daf71904eab048fa9" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetP2PAttribute (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g2f597e2acceab33f60bd61c41fea0c1b" title="" shape="rect">cudaDeviceP2PAttr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">srcDevice</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">dstDevice</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Queries attributes of the link between two devices. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">value</span></tt></dt>
                                 <dd>- Returned value of the requested attribute </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">attr</span></tt></dt>
                                 <dd></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">srcDevice</span></tt></dt>
                                 <dd>- The source device of the target link. </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">dstDevice</span></tt></dt>
                                 <dd>- The destination device of the target link.</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*value</tt> the value of the requested attribute <tt class="ph tt code">attrib</tt> of the link between <tt class="ph tt code">srcDevice</tt> and <tt class="ph tt code">dstDevice</tt>. The supported attributes are:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg2f597e2acceab33f60bd61c41fea0c1bdca8430f659738ac2ebfbfc4e0899d3b" shape="rect">cudaDevP2PAttrPerformanceRank</a>: A relative value indicating the performance of the link between two devices. Lower value means better performance (0 being
                                          the value used for most performant link).
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg2f597e2acceab33f60bd61c41fea0c1b0fa6e51b6472b6ea6ea0cd27fea05a3c" shape="rect">cudaDevP2PAttrAccessSupported</a>: 1 if peer access is enabled.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg2f597e2acceab33f60bd61c41fea0c1b8513982962e4439fa60f2a24348be587" shape="rect">cudaDevP2PAttrNativeAtomicSupported</a>: 1 if native atomic operations over the link are supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg2f597e2acceab33f60bd61c41fea0c1bc11dffbfb7a6d8872dfaeca4b971c11e" shape="rect">cudaDevP2PAttrCudaArrayAccessSupported</a>: 1 if accessing CUDA arrays over the link is supported.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a> if <tt class="ph tt code">srcDevice</tt> or <tt class="ph tt code">dstDevice</tt> are not valid or if they represent the same device.
                              </p>
                              <p class="p">Returns <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a> if <tt class="ph tt code">attrib</tt> is not valid or if <tt class="ph tt code">value</tt> is a null pointer.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection">cudaCtxEnablePeerAccess, cudaCtxDisablePeerAccess, cudaCtxCanAccessPeer, <a class="xref" href="../cuda-driver-api/group__CUDA__PEER__ACCESS.html#group__CUDA__PEER__ACCESS_1g4c55c60508f8eba4546b51f2ee545393" target="_blank" shape="rect">cuDeviceGetP2PAttribute</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gea264dad3d8c4898e0b82213c0253def" id="group__CUDART__DEVICE_1gea264dad3d8c4898e0b82213c0253def" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetPCIBusId (  char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pciBusId</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">len</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns a PCI Bus Id string for the device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pciBusId</span></tt></dt>
                                 <dd>- Returned identifier string for the device in the following format [domain]:[bus]:[device].[function] where <tt class="ph tt code">domain</tt>, <tt class="ph tt code">bus</tt>, <tt class="ph tt code">device</tt>, and <tt class="ph tt code">function</tt> are all hexadecimal values. pciBusId should be large enough to store 13 characters including the NULL-terminator.
                                 </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">len</span></tt></dt>
                                 <dd>- Maximum length of string to store in <tt class="ph tt code">name</tt></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">device</span></tt></dt>
                                 <dd>- Device to get identifier string for</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns an ASCII string identifying the device <tt class="ph tt code">dev</tt> in the NULL-terminated string pointed to by <tt class="ph tt code">pciBusId</tt>. <tt class="ph tt code">len</tt> specifies the maximum length of the string that may be returned.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g65f57fb8d0981ca03f6f9b20031c3e5d" title="Returns a handle to a compute device." shape="rect">cudaDeviceGetByPCIBusId</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g85295e7d9745ab8f0aa80dd1e172acfc" target="_blank" shape="rect">cuDeviceGetPCIBusId</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g318e21528985458de8613d87da832b42" id="group__CUDART__DEVICE_1g318e21528985458de8613d87da832b42" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetSharedMemConfig (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6e62d15f3c224625e8c9aa946f1709a6" title="" shape="rect">cudaSharedMemConfig *</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pConfig</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the shared memory configuration for the current device. </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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>This function will return in <tt class="ph tt code">pConfig</tt> the current size of shared memory banks on the current device. On devices with configurable shared memory banks, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1ga4f3f8a422968f9524012f43ba852058" title="Sets the shared memory configuration for the current device." shape="rect">cudaDeviceSetSharedMemConfig</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__CUDART__DEVICE.html#group__CUDART__DEVICE_1g318e21528985458de8613d87da832b42" title="Returns the shared memory configuration for the current device." shape="rect">cudaDeviceGetSharedMemConfig</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">cudaSharedMemBankSizeFourByte - shared memory bank width is four bytes.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">cudaSharedMemBankSizeEightByte - shared memory bank width is 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><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" title="Sets the preferred cache configuration for the current device." shape="rect">cudaDeviceSetCacheConfig</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" title="Returns the preferred cache configuration for the current device." shape="rect">cudaDeviceGetCacheConfig</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1ga4f3f8a422968f9524012f43ba852058" title="Sets the shared memory configuration for the current device." shape="rect">cudaDeviceSetSharedMemConfig</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g7d9cc996fe45b6260ebb086caff1c685" title="[C++ API] Sets the preferred cache configuration for a device function" shape="rect">cudaFuncSetCacheConfig</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g17153a1b8b8c756f7ab8505686a4ad74" target="_blank" shape="rect">cuCtxGetSharedMemConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gfdb79818f7c0ee7bc585648c91770275" id="group__CUDART__DEVICE_1gfdb79818f7c0ee7bc585648c91770275" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceGetStreamPriorityRange (  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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</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 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__CUDART__STREAM.html#group__CUDART__STREAM_1ge2be9e9858849bf62ba4a8b66d1c3540" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</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__CUDART__DEVICE.html#group__CUDART__DEVICE_1gb22e8256592b836df9a9cc36c9db7151" title="Returns information about the device." shape="rect">cudaDeviceGetAttribute</a>).
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1ge2be9e9858849bf62ba4a8b66d1c3540" title="Create an asynchronous stream with the specified priority." shape="rect">cudaStreamCreateWithPriority</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g192bb727d15c4407c119747de7d198a6" title="Query the priority of a stream." shape="rect">cudaStreamGetPriority</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g137920ab61a71be6ce67605b9f294091" target="_blank" shape="rect">cuCtxGetStreamPriorityRange</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gef69dd5c6d0206c2b8d099abac61f217" id="group__CUDART__DEVICE_1gef69dd5c6d0206c2b8d099abac61f217" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceReset (  void ) </span></dt>
                        <dd class="description">
                           <div class="section">Destroy all allocations and reset all state on the current device in the current process. </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Explicitly destroys and cleans up all resources associated with the current device in the current process. Any subsequent
                                 API call to this device will reinitialize the device.
                              </p>
                              <p class="p">Note that this function will reset the device immediately. It is the caller's responsibility to ensure that the device is
                                 not being accessed by any other host threads from the process when this function is called.
                              </p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" id="group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceSetCacheConfig (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gb980f35ed69ee7991704de29a13de49b" title="" shape="rect">cudaFuncCache</a><span>&nbsp;</span><span class="keyword keyword apiItemName">cacheConfig</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Sets the preferred cache configuration for the current device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">cacheConfig</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</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">cacheConfig</tt> the preferred cache configuration for the current device. This is only a preference. The runtime 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__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g6699ca1943ac2655effa0d571b2f4f15" title="Sets the preferred cache configuration for a device function." shape="rect">cudaFuncSetCacheConfig ( C API)</a> or <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g7d9cc996fe45b6260ebb086caff1c685" title="[C++ API] Sets the preferred cache configuration for a device function" shape="rect">cudaFuncSetCacheConfig ( C++ API)</a> will be preferred over this device-wide setting. Setting the device-wide cache configuration to <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b3b4b8c65376ce1ca107be413e15981bc" shape="rect">cudaFuncCachePreferNone</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__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b3b4b8c65376ce1ca107be413e15981bc" shape="rect">cudaFuncCachePreferNone</a>: no preference for shared memory or L1 (default)
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b84725d25c531f9bafc61ae329afe5b2b" shape="rect">cudaFuncCachePreferShared</a>: prefer larger shared memory and smaller L1 cache
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49b8ecb48ccbc2230c81528a2c7c695100e" shape="rect">cudaFuncCachePreferL1</a>: prefer larger L1 cache and smaller shared memory
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ggb980f35ed69ee7991704de29a13de49bd151ac8d667150c601de4b9542887a3b" shape="rect">cudaFuncCachePreferEqual</a>: prefer equal size 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><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" title="Returns the preferred cache configuration for the current device." shape="rect">cudaDeviceGetCacheConfig</a>, <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g6699ca1943ac2655effa0d571b2f4f15" title="Sets the preferred cache configuration for a device function." shape="rect">cudaFuncSetCacheConfig ( C API)</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g7d9cc996fe45b6260ebb086caff1c685" title="[C++ API] Sets the preferred cache configuration for a device function" shape="rect">cudaFuncSetCacheConfig ( C++ API)</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g54699acf7e2ef27279d013ca2095f4a3" target="_blank" shape="rect">cuCtxSetCacheConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" id="group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceSetLimit (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" title="" shape="rect">cudaLimit</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c3b950b6f8668f7282fae25bfcefd13a" shape="rect">cudaErrorUnsupportedLimit</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</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 device. 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__CUDART__DEVICE.html#group__CUDART__DEVICE_1g720e159aeb125910c22aa20fe9611ec2" title="Returns resource limits." shape="rect">cudaDeviceGetLimit()</a> to find out exactly what the limit has been set to.
                              </p>
                              <p class="p">Setting each <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g4c4b34c054d383b0e9a63ab0ffc93651" shape="rect">cudaLimit</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc93651fc8f54e641c9b133f1b57703d22ce656" shape="rect">cudaLimitStackSize</a> controls the stack size in bytes of each GPU thread. Note that the CUDA driver will set the <tt class="ph tt code">limit</tt> to the maximum of <tt class="ph tt code">value</tt> and what the kernel function requires.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365123b80a6221a6853e918c2816bb76742c" shape="rect">cudaLimitPrintfFifoSize</a> controls the size in bytes of the shared FIFO used by the printf() device system call. Setting <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365123b80a6221a6853e918c2816bb76742c" shape="rect">cudaLimitPrintfFifoSize</a> must not be performed after launching any kernel that uses the printf() device system call - in such case <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a> will be returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc93651b399716bf0a592bc42055473c1273881" shape="rect">cudaLimitMallocHeapSize</a> controls the size in bytes of the heap used by the malloc() and free() device system calls. Setting <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc93651b399716bf0a592bc42055473c1273881" shape="rect">cudaLimitMallocHeapSize</a> must not be performed after launching any kernel that uses the malloc() or free() device system calls - in such case <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a> will be returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365123c4900be4af436cb769e4c72d07be11" shape="rect">cudaLimitDevRuntimeSyncDepth</a> controls the maximum nesting depth of a grid at which a thread can safely call <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize()</a>. Setting this limit must be performed before any launch of a kernel that uses the device runtime and calls <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize()</a> above the default sync depth, two levels of grids. Calls to <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize()</a> will fail with error code <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038265dbf94c45903cd582cfc40f93a176a" shape="rect">cudaErrorSyncDepthExceeded</a> 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 runtime 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__CUDART__DEVICE.html#group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" title="Set resource limits." shape="rect">cudaDeviceSetLimit</a> will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c3b950b6f8668f7282fae25bfcefd13a" shape="rect">cudaErrorUnsupportedLimit</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365118712cb05d2c3efaeea73afba823d916" shape="rect">cudaLimitDevRuntimePendingLaunchCount</a> controls the maximum number of outstanding device runtime launches that can be made from the current device. 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 <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00382372902b9ffd65825d138e16125b1376" shape="rect">cudaErrorLaunchPendingCountExceeded</a> when <a class="xref" href="group__CUDART__ERROR.html#group__CUDART__ERROR_1g3529f94cb530a83a76613616782bd233" title="Returns the last error from a runtime call." shape="rect">cudaGetLastError()</a> 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
                                          runtime 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__CUDART__DEVICE.html#group__CUDART__DEVICE_1g05956f16eaa47ef3a4efee84563ccb7d" title="Set resource limits." shape="rect">cudaDeviceSetLimit</a> will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c3b950b6f8668f7282fae25bfcefd13a" shape="rect">cudaErrorUnsupportedLimit</a> being returned.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg4c4b34c054d383b0e9a63ab0ffc9365168d3522068213e4ba46c4c99ebc4ce12" shape="rect">cudaLimitMaxL2FetchGranularity</a> controls the L2 cache fetch granularity. Values can range from 0B to 128B. This is purely a performance hint and it can be
                                          ignored or clamped depending on the platform.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g720e159aeb125910c22aa20fe9611ec2" title="Returns resource limits." shape="rect">cudaDeviceGetLimit</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g0651954dfb9788173e60a9af7201e65a" target="_blank" shape="rect">cuCtxSetLimit</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1ga4f3f8a422968f9524012f43ba852058" id="group__CUDART__DEVICE_1ga4f3f8a422968f9524012f43ba852058" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceSetSharedMemConfig (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g6e62d15f3c224625e8c9aa946f1709a6" title="" shape="rect">cudaSharedMemConfig</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 device. </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__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>On devices with configurable shared memory banks, this function will set the shared memory bank size which is used for all
                                 subsequent kernel launches. Any per-function setting of shared memory set via <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g3ef735b45b7549e936a60cb084740754" title="Sets the shared memory configuration for a device function." shape="rect">cudaFuncSetSharedMemConfig</a> will override the device wide setting.
                              </p>
                              <p class="p">Changing the shared memory configuration between launches may introduce a device side synchronization point.</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">cudaSharedMemBankSizeDefault: set bank width the device default (currently, four bytes)</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">cudaSharedMemBankSizeFourByte: set shared memory bank width to be four bytes natively.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight bytes natively.</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g6c9cc78ca80490386cf593b4baa35a15" title="Sets the preferred cache configuration for the current device." shape="rect">cudaDeviceSetCacheConfig</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gd9bf5eae6d464de05aa3840df9f5deeb" title="Returns the preferred cache configuration for the current device." shape="rect">cudaDeviceGetCacheConfig</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g318e21528985458de8613d87da832b42" title="Returns the shared memory configuration for the current device." shape="rect">cudaDeviceGetSharedMemConfig</a>, <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g7d9cc996fe45b6260ebb086caff1c685" title="[C++ API] Sets the preferred cache configuration for a device function" shape="rect">cudaFuncSetCacheConfig</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g2574235fa643f8f251bf7bc28fac3692" target="_blank" shape="rect">cuCtxSetSharedMemConfig</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" id="group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaDeviceSynchronize (  void ) </span></dt>
                        <dd class="description">
                           <div class="section">Wait for compute device to finish. </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a></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__CUDART__DEVICE.html#group__CUDART__DEVICE_1g10e20b05a95f638a4071a655503df25d" title="Wait for compute device to finish." shape="rect">cudaDeviceSynchronize()</a> returns an error if one of the preceding tasks has failed. If the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g057e6912c52708b6aa86e79dd83d007c" shape="rect">cudaDeviceScheduleBlockingSync</a> flag was set for this device, the host thread will block until the device has finished its work.
                              </p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gef69dd5c6d0206c2b8d099abac61f217" title="Destroy all allocations and reset all state on the current device in the current process." shape="rect">cudaDeviceReset</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g7a54725f28d34b8c6299f0c6ca579616" target="_blank" shape="rect">cuCtxSynchronize</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" id="group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaGetDevice (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns which device is currently being used. </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>- Returns the device on which the active host thread executes the device code.</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*device</tt> the current device for the calling host thread.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g8f13165846b73750693640fb3e8380d0" target="_blank" shape="rect">cuCtxGetCurrent</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" id="group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​
                              <span class="keyword keyword apiItemName">__device__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaGetDeviceCount (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">count</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns the number of compute-capable devices. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">count</span></tt></dt>
                                 <dd>- Returns the number of devices with compute capability greater or equal to 2.0</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a> (if a NULL device pointer is assigned), <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*count</tt> the number of devices with compute capability greater or equal to 2.0 that are available for execution.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g52b5ce05cb8c5fb6831b2c0ff2887c74" target="_blank" shape="rect">cuDeviceGetCount</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1gf830794caf068b71638c6182bba8f77a" id="group__CUDART__DEVICE_1gf830794caf068b71638c6182bba8f77a" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaGetDeviceFlags (  unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets the flags for the current device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Pointer to store the device flags</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">flags</tt> the flags for the current device. If there is a current device for the calling thread, and the device has been initialized
                                 or flags have been set on that device specifically, the flags for the device are returned. If there is no current device,
                                 but flags have been set for the thread with <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" title="Sets flags to be used for device executions." shape="rect">cudaSetDeviceFlags</a>, the thread flags are returned. Finally, if there is no current device and no thread flags, the flags for the first device
                                 are returned, which may be the default flags. Compare to the behavior of <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" title="Sets flags to be used for device executions." shape="rect">cudaSetDeviceFlags</a>.
                              </p>
                              <p class="p">Typically, the flags returned should match the behavior that will be seen if the calling thread uses a device after this call,
                                 without any change to the flags or current device inbetween by this or another thread. Note that if the device is not initialized,
                                 it is possible for another thread to change the flags for the current device before it is initialized. Additionally, when
                                 using exclusive mode, if this thread has not requested a specific device, it may use a device other than the first device,
                                 contrary to the assumption made by this function.
                              </p>
                              <p class="p">If a context has been created via the driver API and is current to the calling thread, the flags for that context are always
                                 returned.
                              </p>
                              <p class="p">Flags returned by this function may specifically include <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g3762be9cccdd809a4ca128354fd134b0" shape="rect">cudaDeviceMapHost</a> even though it is not accepted by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" title="Sets flags to be used for device executions." shape="rect">cudaSetDeviceFlags</a> because it is implicit in runtime API flags. The reason for this is that the current context may have been created via the
                                 driver API in which case the flag is not implicit and may be unset.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" title="Sets flags to be used for device executions." shape="rect">cudaSetDeviceFlags</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1gf81eef983c1e3b2ef4f166d7a930c86d" target="_blank" shape="rect">cuCtxGetFlags</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__PRIMARY__CTX.html#group__CUDA__PRIMARY__CTX_1g65f3e018721b6d90aa05cfb56250f469" target="_blank" shape="rect">cuDevicePrimaryCtxGetState</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" id="group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaGetDeviceProperties (  <a href="structcudaDeviceProp.html#structcudaDeviceProp" title="" shape="rect">cudaDeviceProp</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">prop</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns information about the compute-device. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">prop</span></tt></dt>
                                 <dd>- Properties for the specified device </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">device</span></tt></dt>
                                 <dd>- Device number to get properties for</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*prop</tt> the properties of device <tt class="ph tt code">dev</tt>. The <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp" shape="rect">cudaDeviceProp</a> structure is defined as: <pre xml:space="preserve">‎    struct <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp" shape="rect">cudaDeviceProp</a> {
              char <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11e26f1c6bd42f4821b7ef1a4bd3bd25c" shape="rect">name</a>[256];
              cudaUUID_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1626c20637498c7be1381db55a6261308" shape="rect">uuid</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1983c292e2078dd5a4240f49c41d647f3" shape="rect">totalGlobalMem</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_182ec4c5e244addb9cd57f5b9da0eaca7" shape="rect">sharedMemPerBlock</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_184472707f521930fc052663820d635fc" shape="rect">regsPerBlock</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18656f53eb2a7e54500f6fb95a830b47d" shape="rect">warpSize</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14382eddd3f5836f1195ca988388783bb" shape="rect">memPitch</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_118f38f08c66c8812b1ddeb16e4bf51a4" shape="rect">maxThreadsPerBlock</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_192d195493a9d36b2d827aaf3ffd89f1e" shape="rect">maxThreadsDim</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_17d138a572315b3bbb6caf7ccc914a130" shape="rect">maxGridSize</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1dee14230e417cb3059d697d6804da414" shape="rect">clockRate</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b4047e5e22082b1aefeac3b9ef39d0be" shape="rect">totalConstMem</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_164490976c8e07e028a8f1ce1f5cd42d6" shape="rect">major</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_150d477d8d5d3a04e0785f469277c65bb" shape="rect">minor</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1500248658a996f51752e1ab1769f8a88" shape="rect">textureAlignment</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13a3f10d2833bdc82ceb370a449aafeec" shape="rect">texturePitchAlignment</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13281f4cdba05e2ca43be1caae2bcb29b" shape="rect">deviceOverlap</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13e36d9d236f97095ef2b496cd2f98121" shape="rect">multiProcessorCount</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_19a63114766c4d2309f00403c1bf056c8" shape="rect">kernelExecTimeoutEnabled</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1613bf3e02c6120db852a2ecd5ff9605a" shape="rect">integrated</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_115414c4b1fedd1a22030522d54caa653" shape="rect">canMapHostMemory</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_15458a603dcbca1dd361ac5b99c07675b" shape="rect">computeMode</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_121e1544ca58ec5e559d0d498c5af9061" shape="rect">maxTexture1D</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16875f2ba4ab9d9733948545303786cc4" shape="rect">maxTexture1DMipmap</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_120efbdc4556a390720e0f75b62b8f83d" shape="rect">maxTexture1DLinear</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1618ac703b9a48adf50713897689a3eb2" shape="rect">maxTexture2D</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f227daa1f3c12d90898c77152b1136bf" shape="rect">maxTexture2DMipmap</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1757a4245a175441c2a1535ef9c9524a4" shape="rect">maxTexture2DLinear</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11468730923ddf5a68ecc9bb42053c1c9" shape="rect">maxTexture2DGather</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16ea5619e4e11617451c6adc8560f068b" shape="rect">maxTexture3D</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16f5f5ba8a7dc088392be0d2f8f51faed" shape="rect">maxTexture3DAlt</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f9076f17639b08ea1783bb3035b1f707" shape="rect">maxTextureCubemap</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11047afc38a23fcdfd5f202002caa53f5" shape="rect">maxTexture1DLayered</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16011fd7e13a77d58fbbd4a5ba1801fbf" shape="rect">maxTexture2DLayered</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f838fe5c7528d1e345a83659d001d799" shape="rect">maxTextureCubemapLayered</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1fd25f5ae34d7eeb2c52f87b9e932fe05" shape="rect">maxSurface1D</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1a85bc895583a26251fbfef635c7644a9" shape="rect">maxSurface2D</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14fdf5cd399b60955ee35421a7cc6418a" shape="rect">maxSurface3D</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16cf36809ff5ed6b8aa836177d0292200" shape="rect">maxSurface1DLayered</a>[2];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1edeed8d96d802c4b01149e2e6a7b4ea8" shape="rect">maxSurface2DLayered</a>[3];
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1d170a7ad44ced64478d50fd7b6378b41" shape="rect">maxSurfaceCubemap</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1d4564200e6bc420be63b61251c6d39b8" shape="rect">maxSurfaceCubemapLayered</a>[2];
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18fe20825e4239ff91a7708c9468a02b5" shape="rect">surfaceAlignment</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18e2fe2a3b264901816874516af12a097" shape="rect">concurrentKernels</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_172919e0168f8dc8a719e2c38355b80ab" shape="rect">ECCEnabled</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1c5adc2ef8c6b89fb139b4684175db54a" shape="rect">pciBusID</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_156978c2bfc433d26ac3b4c765ee536bb" shape="rect">pciDeviceID</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f3a69f0796e32c0e32d17c151443fab0" shape="rect">pciDomainID</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1fcc96a9e56f84f4a0e853c18ce8e2c0d" shape="rect">tccDriver</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_105a89c028bee8fe480d0f44ddd43357b" shape="rect">asyncEngineCount</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_107b0114cefb43da05e05c65ec859542c" shape="rect">unifiedAddressing</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b200f01a8ec81912285c2633117109c4" shape="rect">memoryClockRate</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e764fca4d15a459279b31cb533435c19" shape="rect">memoryBusWidth</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b40b9ed0e542e9f09667b0a89fb6ad85" shape="rect">l2CacheSize</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_196dac83c7095e29b86300cc02851844c" shape="rect">maxThreadsPerMultiProcessor</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_143e968b12978ffd2a80bde224d7dc782" shape="rect">streamPrioritiesSupported</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1551ac00fc5ba827a91d705b164288bff" shape="rect">globalL1CacheSupported</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e1772eeb293a76aae0bbf7f965a403d5" shape="rect">localL1CacheSupported</a>;
              size_t <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16cede1829516e86917f0842a5f6498c8" shape="rect">sharedMemPerMultiprocessor</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1de02e669caefcadadaaa42877b08e80a" shape="rect">regsPerMultiprocessor</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f7230860be3e37047c7ce5d32542b54b" shape="rect">managedMemory</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1512d849f57e6a6a0ece1d21879c3ae35" shape="rect">isMultiGpuBoard</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_163af976611c9d29f169882f5c32472d4" shape="rect">multiGpuBoardGroupID</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14bd4d531bf2ac497d659b03910440315" shape="rect">singleToDoublePrecisionPerfRatio</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_146116bab1064b5d7d0642d78f6c27ce1" shape="rect">pageableMemoryAccess</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_116f9619ccc85e93bc456b8c69c80e78b" shape="rect">concurrentManagedAccess</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_154a9a6e0067360f23dc91e60e7cf88d1" shape="rect">computePreemptionSupported</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1ae79e062f076b0270625b38bb91285b8" shape="rect">canUseHostPointerForRegisteredMem</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13c26ab51c96f39b115d7826337541914" shape="rect">cooperativeLaunch</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_183271637b431ccb5f5b58c46d0bd8cc9" shape="rect">cooperativeMultiDeviceLaunch</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e9f1ed6bffd5606eb81d438728a844ca" shape="rect">pageableMemoryAccessUsesHostPageTables</a>;
              int <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b47773cf29bec05e6f1ba569346889e8" shape="rect">directManagedMemAccessFromHost</a>;
          }</pre> where:<ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11e26f1c6bd42f4821b7ef1a4bd3bd25c" shape="rect">name[256]</a> is an ASCII string identifying the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1626c20637498c7be1381db55a6261308" shape="rect">uuid</a> is a 16-byte unique identifier.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1983c292e2078dd5a4240f49c41d647f3" shape="rect">totalGlobalMem</a> is the total amount of global memory available on the device in bytes;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_182ec4c5e244addb9cd57f5b9da0eaca7" shape="rect">sharedMemPerBlock</a> is the maximum amount of shared memory available to a thread block in bytes;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_184472707f521930fc052663820d635fc" shape="rect">regsPerBlock</a> is the maximum number of 32-bit registers available to a thread block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18656f53eb2a7e54500f6fb95a830b47d" shape="rect">warpSize</a> is the warp size in threads;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14382eddd3f5836f1195ca988388783bb" shape="rect">memPitch</a> is the maximum pitch in bytes allowed by the memory copy functions that involve memory regions allocated through <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g32bd7a39135594788a542ae72217775c" title="Allocates pitched memory on the device." shape="rect">cudaMallocPitch()</a>;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_118f38f08c66c8812b1ddeb16e4bf51a4" shape="rect">maxThreadsPerBlock</a> is the maximum number of threads per block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_192d195493a9d36b2d827aaf3ffd89f1e" shape="rect">maxThreadsDim[3]</a> contains the maximum size of each dimension of a block;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_17d138a572315b3bbb6caf7ccc914a130" shape="rect">maxGridSize[3]</a> contains the maximum size of each dimension of a grid;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1dee14230e417cb3059d697d6804da414" shape="rect">clockRate</a> is the clock frequency in kilohertz;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b4047e5e22082b1aefeac3b9ef39d0be" shape="rect">totalConstMem</a> is the total amount of constant memory available on the device in bytes;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_164490976c8e07e028a8f1ce1f5cd42d6" shape="rect">major</a>, <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_150d477d8d5d3a04e0785f469277c65bb" shape="rect">minor</a> are the major and minor revision numbers defining the device's compute capability;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1500248658a996f51752e1ab1769f8a88" shape="rect">textureAlignment</a> is the alignment requirement; texture base addresses that are aligned to <a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1500248658a996f51752e1ab1769f8a88" shape="rect">textureAlignment</a> bytes do not need an offset applied to texture fetches;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13a3f10d2833bdc82ceb370a449aafeec" shape="rect">texturePitchAlignment</a> is the pitch alignment requirement for 2D texture references that are bound to pitched memory;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13281f4cdba05e2ca43be1caae2bcb29b" shape="rect">deviceOverlap</a> is 1 if the device can concurrently copy memory between host and device while executing a kernel, or 0 if not. Deprecated,
                                          use instead asyncEngineCount.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13e36d9d236f97095ef2b496cd2f98121" shape="rect">multiProcessorCount</a> is the number of multiprocessors on the device;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_19a63114766c4d2309f00403c1bf056c8" shape="rect">kernelExecTimeoutEnabled</a> is 1 if there is a run time limit for kernels executed on the device, or 0 if not.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1613bf3e02c6120db852a2ecd5ff9605a" shape="rect">integrated</a> is 1 if the device is an integrated (motherboard) GPU and 0 if it is a discrete (card) component.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_115414c4b1fedd1a22030522d54caa653" shape="rect">canMapHostMemory</a> is 1 if the device can map host memory into the CUDA address space for use with <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gb65da58f444e7230d3322b6126bb4902" title="Allocates page-locked memory on the host." shape="rect">cudaHostAlloc()</a>/<a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gc00502b44e5f1bdc0b424487ebb08db0" title="Passes back device pointer of mapped host memory allocated by cudaHostAlloc or registered by cudaHostRegister." shape="rect">cudaHostGetDevicePointer()</a>, or 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <div class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_15458a603dcbca1dd361ac5b99c07675b" shape="rect">computeMode</a> is the compute mode that the device is currently in. Available modes are as follows:
                                          <ul class="ul">
                                             <li class="li">
                                                <p class="p">cudaComputeModeDefault: Default mode - Device is not restricted and multiple threads can use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p">cudaComputeModeExclusive: Compute-exclusive mode - Only one thread will be able to use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p">cudaComputeModeProhibited: Compute-prohibited mode - No threads can use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device.
                                                </p>
                                             </li>
                                             <li class="li">
                                                <p class="p">cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many threads in one process will be able to use <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> with this device. 
                                                </p>
                                                <p class="p">
                                                   If <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice()</a> is called on an already occupied <tt class="ph tt code">device</tt> with computeMode <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d06965403d087b7f1153726c999bbc879c" shape="rect">cudaComputeModeExclusive</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038459c4ec80247b489ddb9c5577fcc266a" shape="rect">cudaErrorDeviceAlreadyInUse</a> will be immediately returned indicating the device cannot be used. When an occupied exclusive mode device is chosen with
                                                   <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, all subsequent non-device management runtime functions will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2ab67256308f82a7be0fcd9fb145ad7" shape="rect">cudaErrorDevicesUnavailable</a>.
                                                </p>
                                             </li>
                                          </ul>
                                       </div>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_121e1544ca58ec5e559d0d498c5af9061" shape="rect">maxTexture1D</a> is the maximum 1D texture size.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16875f2ba4ab9d9733948545303786cc4" shape="rect">maxTexture1DMipmap</a> is the maximum 1D mipmapped texture texture size.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_120efbdc4556a390720e0f75b62b8f83d" shape="rect">maxTexture1DLinear</a> is the maximum 1D texture size for textures bound to linear memory.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1618ac703b9a48adf50713897689a3eb2" shape="rect">maxTexture2D[2]</a> contains the maximum 2D texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f227daa1f3c12d90898c77152b1136bf" shape="rect">maxTexture2DMipmap[2]</a> contains the maximum 2D mipmapped texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1757a4245a175441c2a1535ef9c9524a4" shape="rect">maxTexture2DLinear[3]</a> contains the maximum 2D texture dimensions for 2D textures bound to pitch linear memory.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11468730923ddf5a68ecc9bb42053c1c9" shape="rect">maxTexture2DGather[2]</a> contains the maximum 2D texture dimensions if texture gather operations have to be performed.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16ea5619e4e11617451c6adc8560f068b" shape="rect">maxTexture3D[3]</a> contains the maximum 3D texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16f5f5ba8a7dc088392be0d2f8f51faed" shape="rect">maxTexture3DAlt[3]</a> contains the maximum alternate 3D texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f9076f17639b08ea1783bb3035b1f707" shape="rect">maxTextureCubemap</a> is the maximum cubemap texture width or height.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_11047afc38a23fcdfd5f202002caa53f5" shape="rect">maxTexture1DLayered[2]</a> contains the maximum 1D layered texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16011fd7e13a77d58fbbd4a5ba1801fbf" shape="rect">maxTexture2DLayered[3]</a> contains the maximum 2D layered texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f838fe5c7528d1e345a83659d001d799" shape="rect">maxTextureCubemapLayered[2]</a> contains the maximum cubemap layered texture dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1fd25f5ae34d7eeb2c52f87b9e932fe05" shape="rect">maxSurface1D</a> is the maximum 1D surface size.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1a85bc895583a26251fbfef635c7644a9" shape="rect">maxSurface2D[2]</a> contains the maximum 2D surface dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14fdf5cd399b60955ee35421a7cc6418a" shape="rect">maxSurface3D[3]</a> contains the maximum 3D surface dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16cf36809ff5ed6b8aa836177d0292200" shape="rect">maxSurface1DLayered[2]</a> contains the maximum 1D layered surface dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1edeed8d96d802c4b01149e2e6a7b4ea8" shape="rect">maxSurface2DLayered[3]</a> contains the maximum 2D layered surface dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1d170a7ad44ced64478d50fd7b6378b41" shape="rect">maxSurfaceCubemap</a> is the maximum cubemap surface width or height.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1d4564200e6bc420be63b61251c6d39b8" shape="rect">maxSurfaceCubemapLayered[2]</a> contains the maximum cubemap layered surface dimensions.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18fe20825e4239ff91a7708c9468a02b5" shape="rect">surfaceAlignment</a> specifies the alignment requirements for surfaces.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_18e2fe2a3b264901816874516af12a097" shape="rect">concurrentKernels</a> is 1 if the device supports executing multiple kernels within the same context simultaneously, or 0 if not. It is not guaranteed
                                          that multiple kernels will be resident on the device concurrently so this feature should not be relied upon for correctness;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_172919e0168f8dc8a719e2c38355b80ab" shape="rect">ECCEnabled</a> is 1 if the device has ECC support turned on, or 0 if not.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1c5adc2ef8c6b89fb139b4684175db54a" shape="rect">pciBusID</a> is the PCI bus identifier of the device.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_156978c2bfc433d26ac3b4c765ee536bb" shape="rect">pciDeviceID</a> is the PCI device (sometimes called slot) identifier of the device.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f3a69f0796e32c0e32d17c151443fab0" shape="rect">pciDomainID</a> is the PCI domain identifier of the device.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1fcc96a9e56f84f4a0e853c18ce8e2c0d" shape="rect">tccDriver</a> is 1 if the device is using a TCC driver or 0 if not.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_105a89c028bee8fe480d0f44ddd43357b" shape="rect">asyncEngineCount</a> is 1 when the device can concurrently copy memory between host and device while executing a kernel. It is 2 when the device
                                          can concurrently copy memory between host and device in both directions and execute a kernel at the same time. It is 0 if
                                          neither of these is supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_107b0114cefb43da05e05c65ec859542c" shape="rect">unifiedAddressing</a> is 1 if the device shares a unified address space with the host and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b200f01a8ec81912285c2633117109c4" shape="rect">memoryClockRate</a> is the peak memory clock frequency in kilohertz.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e764fca4d15a459279b31cb533435c19" shape="rect">memoryBusWidth</a> is the memory bus width in bits.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b40b9ed0e542e9f09667b0a89fb6ad85" shape="rect">l2CacheSize</a> is L2 cache size in bytes.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_196dac83c7095e29b86300cc02851844c" shape="rect">maxThreadsPerMultiProcessor</a> is the number of maximum resident threads per multiprocessor.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_143e968b12978ffd2a80bde224d7dc782" shape="rect">streamPrioritiesSupported</a> is 1 if the device supports stream priorities, or 0 if it is not supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1551ac00fc5ba827a91d705b164288bff" shape="rect">globalL1CacheSupported</a> is 1 if the device supports caching of globals in L1 cache, or 0 if it is not supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e1772eeb293a76aae0bbf7f965a403d5" shape="rect">localL1CacheSupported</a> is 1 if the device supports caching of locals in L1 cache, or 0 if it is not supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_16cede1829516e86917f0842a5f6498c8" shape="rect">sharedMemPerMultiprocessor</a> is the maximum amount of shared memory available to a multiprocessor in bytes; this amount is shared by all thread blocks
                                          simultaneously resident on a multiprocessor;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1de02e669caefcadadaaa42877b08e80a" shape="rect">regsPerMultiprocessor</a> is the maximum number of 32-bit registers available to a multiprocessor; this number is shared by all thread blocks simultaneously
                                          resident on a multiprocessor;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1f7230860be3e37047c7ce5d32542b54b" shape="rect">managedMemory</a> is 1 if the device supports allocating managed memory on this system, or 0 if it is not supported.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1512d849f57e6a6a0ece1d21879c3ae35" shape="rect">isMultiGpuBoard</a> is 1 if the device is on a multi-GPU board (e.g. Gemini cards), and 0 if not;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_163af976611c9d29f169882f5c32472d4" shape="rect">multiGpuBoardGroupID</a> is a unique identifier for a group of devices associated with the same board. Devices on the same multi-GPU board will share
                                          the same identifier;
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_14bd4d531bf2ac497d659b03910440315" shape="rect">singleToDoublePrecisionPerfRatio</a> is the ratio of single precision performance (in floating-point operations per second) to double precision performance.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_146116bab1064b5d7d0642d78f6c27ce1" shape="rect">pageableMemoryAccess</a> is 1 if the device supports coherently accessing pageable memory without calling cudaHostRegister on it, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_116f9619ccc85e93bc456b8c69c80e78b" shape="rect">concurrentManagedAccess</a> is 1 if the device can coherently access managed memory concurrently with the CPU, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_154a9a6e0067360f23dc91e60e7cf88d1" shape="rect">computePreemptionSupported</a> is 1 if the device supports Compute Preemption, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1ae79e062f076b0270625b38bb91285b8" shape="rect">canUseHostPointerForRegisteredMem</a> is 1 if the device can access host registered memory at the same virtual address as the CPU, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_13c26ab51c96f39b115d7826337541914" shape="rect">cooperativeLaunch</a> is 1 if the device supports launching cooperative kernels via <a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1gc0210b928f9bf4e212af07d35ac11d67" title="Launches a device function." shape="rect">cudaLaunchCooperativeKernel</a>, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_183271637b431ccb5f5b58c46d0bd8cc9" shape="rect">cooperativeMultiDeviceLaunch</a> is 1 if the device supports launching cooperative kernels via <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g20f8d75d8786c54cc168c47fde66ee52" title="Launches device functions on multiple devices where thread blocks can cooperate and synchronize as they execute." shape="rect">cudaLaunchCooperativeKernelMultiDevice</a>, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1e9f1ed6bffd5606eb81d438728a844ca" shape="rect">pageableMemoryAccessUsesHostPageTables</a> is 1 if the device accesses pageable memory via the host's page tables, and 0 otherwise.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="structcudaDeviceProp.html#structcudaDeviceProp_1b47773cf29bec05e6f1ba569346889e8" shape="rect">directManagedMemAccessFromHost</a> is 1 if the host can directly access managed memory on the device without migration, and 0 otherwise.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gb22e8256592b836df9a9cc36c9db7151" title="Returns information about the device." shape="rect">cudaDeviceGetAttribute</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g9c3e1414f0ad901d3278a4d6645fc266" target="_blank" shape="rect">cuDeviceGetAttribute</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__DEVICE.html#group__CUDA__DEVICE_1gef75aa30df95446a845f2a7b9fffbb7f" target="_blank" shape="rect">cuDeviceGetName</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" id="group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaIpcCloseMemHandle (  void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Close memory mapped with cudaIpcOpenMemHandle. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">devPtr</span></tt></dt>
                                 <dd>- Device pointer returned by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a></dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2625b63c0940c54ed07f2986b12e0f1" shape="rect">cudaErrorMapBufferObjectFailed</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Unmaps memory returnd by <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a>. The original allocation in the exporting process as well as imported mappings in other processes will be unaffected.
                              </p>
                              <p class="p">Any resources used to enable peer access will be freed if this is the last mapping using them.</p>
                              <p class="p">IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality
                                 is not supported on Tegra platforms.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc</a>, <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ga042655cbbf3408f01061652a075e094" title="Frees memory on the device." shape="rect">cudaFree</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" title="Opens an interprocess event handle for use in the current process." shape="rect">cudaIpcOpenEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1gd6f5d5bcf6376c6853b64635b0157b9e" target="_blank" shape="rect">cuIpcCloseMemHandle</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" id="group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaIpcGetEventHandle (  <a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t" title="" shape="rect">cudaIpcEventHandle_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">event</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets an interprocess handle for a previously allocated event. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">handle</span></tt></dt>
                                 <dd>- Pointer to a user allocated cudaIpcEventHandle in which to return the opaque event handle </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Event allocated with <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49ec9cd742f8a3f6fde4ee72a66326f6" shape="rect">cudaEventInterprocess</a> and <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a> flags.
                                 </dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2625b63c0940c54ed07f2986b12e0f1" shape="rect">cudaErrorMapBufferObjectFailed</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Takes as input a previously allocated event. This event must have been created with the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g49ec9cd742f8a3f6fde4ee72a66326f6" shape="rect">cudaEventInterprocess</a> and <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a> flags set. This opaque handle may be copied into other processes and opened with <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" title="Opens an interprocess event handle for use in the current process." shape="rect">cudaIpcOpenEventHandle</a> to allow efficient hardware synchronization between GPU work in different processes.
                              </p>
                              <p class="p">After the event has been been opened in the importing process, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1gf4fcb74343aa689f4159791967868446" title="Records an event." shape="rect">cudaEventRecord</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g949aa42b30ae9e622f6ba0787129ff22" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc301fd024e6fd4a17074d229d4504077" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a> and <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2bf738909b4a059023537eaa29d8a5b7" title="Queries an event's status." shape="rect">cudaEventQuery</a> may be used in either process. Performing operations on the imported event after the exported event has been freed with <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2cb6baa0830a1cd0bd957bfd8705045b" title="Destroys an event object." shape="rect">cudaEventDestroy</a> will result in undefined behavior.
                              </p>
                              <p class="p">IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality
                                 is not supported on Tegra platforms.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g4b5fdb19d7fb5f6f8862559f9279f6c3" title="[C++ API] Creates an event object with the specified flags" shape="rect">cudaEventCreate</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2cb6baa0830a1cd0bd957bfd8705045b" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g949aa42b30ae9e622f6ba0787129ff22" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2bf738909b4a059023537eaa29d8a5b7" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc301fd024e6fd4a17074d229d4504077" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" title="Opens an interprocess event handle for use in the current process." shape="rect">cudaIpcOpenEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1gea02eadd12483de5305878b13288a86c" target="_blank" shape="rect">cuIpcGetEventHandle</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" id="group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaIpcGetMemHandle (  <a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t" title="" shape="rect">cudaIpcMemHandle_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, void*<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets an interprocess memory handle for an existing device memory allocation. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">handle</span></tt></dt>
                                 <dd>- Pointer to user allocated cudaIpcMemHandle to return the handle in. </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">devPtr</span></tt></dt>
                                 <dd>- Base pointer to previously allocated device memory</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f210f50ae7f17f655e0504929606add9" shape="rect">cudaErrorMemoryAllocation</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2625b63c0940c54ed07f2986b12e0f1" shape="rect">cudaErrorMapBufferObjectFailed</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Takes a pointer to the base of an existing device memory allocation created with <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc</a> and exports it for use in another process. This is a lightweight operation and may be called multiple times on an allocation
                                 without adverse effects.
                              </p>
                              <p class="p">If a region of memory is freed with <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ga042655cbbf3408f01061652a075e094" title="Frees memory on the device." shape="rect">cudaFree</a> and a subsequent call to <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc</a> returns memory with the same device address, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a> will return a unique handle for the new memory.
                              </p>
                              <p class="p">IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality
                                 is not supported on Tegra platforms.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc</a>, <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ga042655cbbf3408f01061652a075e094" title="Frees memory on the device." shape="rect">cudaFree</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" title="Opens an interprocess event handle for use in the current process." shape="rect">cudaIpcOpenEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g6f1b5be767b275f016523b2ac49ebec1" target="_blank" shape="rect">cuIpcGetMemHandle</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" id="group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaIpcOpenEventHandle (  <a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" title="" shape="rect">cudaEvent_t</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">event</span>, <a href="structcudaIpcEventHandle__t.html#structcudaIpcEventHandle__t" title="" shape="rect">cudaIpcEventHandle_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Opens an interprocess event handle for use in the current process. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">event</span></tt></dt>
                                 <dd>- Returns the imported event </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">handle</span></tt></dt>
                                 <dd>- Interprocess handle to open</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2625b63c0940c54ed07f2986b12e0f1" shape="rect">cudaErrorMapBufferObjectFailed</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Opens an interprocess event handle exported from another process with <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle</a>. This function returns a <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gea2f543a9fc0e52fe4ae712920fd1247" shape="rect">cudaEvent_t</a> that behaves like a locally created event with the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1ga5d3eff7c3623e2be533968d9cc1ee7e" shape="rect">cudaEventDisableTiming</a> flag specified. This event must be freed with <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2cb6baa0830a1cd0bd957bfd8705045b" title="Destroys an event object." shape="rect">cudaEventDestroy</a>.
                              </p>
                              <p class="p">Performing operations on the imported event after the exported event has been freed with <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2cb6baa0830a1cd0bd957bfd8705045b" title="Destroys an event object." shape="rect">cudaEventDestroy</a> will result in undefined behavior.
                              </p>
                              <p class="p">IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality
                                 is not supported on Tegra platforms.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__HIGHLEVEL.html#group__CUDART__HIGHLEVEL_1g4b5fdb19d7fb5f6f8862559f9279f6c3" title="[C++ API] Creates an event object with the specified flags" shape="rect">cudaEventCreate</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2cb6baa0830a1cd0bd957bfd8705045b" title="Destroys an event object." shape="rect">cudaEventDestroy</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g949aa42b30ae9e622f6ba0787129ff22" title="Waits for an event to complete." shape="rect">cudaEventSynchronize</a>, <a class="xref" href="group__CUDART__EVENT.html#group__CUDART__EVENT_1g2bf738909b4a059023537eaa29d8a5b7" title="Queries an event's status." shape="rect">cudaEventQuery</a>, <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1gc301fd024e6fd4a17074d229d4504077" title="Make a compute stream wait on an event." shape="rect">cudaStreamWaitEvent</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1gf1d525918b6c643b99ca8c8e42e36c2e" target="_blank" shape="rect">cuIpcOpenEventHandle</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" id="group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaIpcOpenMemHandle (  void**<span>&nbsp;</span><span class="keyword keyword apiItemName">devPtr</span>, <a href="structcudaIpcMemHandle__t.html#structcudaIpcMemHandle__t" title="" shape="rect">cudaIpcMemHandle_t</a><span>&nbsp;</span><span class="keyword keyword apiItemName">handle</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
                              
                           </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">devPtr</span></tt></dt>
                                 <dd>- Returned device pointer </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">handle</span></tt></dt>
                                 <dd>- cudaIpcMemHandle to open </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Flags for this operation. Must be specified as <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g60f28a5142ee7ae0336dfa83fd54e006" shape="rect">cudaIpcMemLazyEnablePeerAccess</a></dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a2625b63c0940c54ed07f2986b12e0f1" shape="rect">cudaErrorMapBufferObjectFailed</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038c4673247aee4d1ab8d07871f376e0273" shape="rect">cudaErrorInvalidResourceHandle</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00388f0bc63a488221933dbf7cd67305b666" shape="rect">cudaErrorTooManyPeers</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038d846fd9f2e8ba5e2fb4f1695b7ab6164" shape="rect">cudaErrorNotSupported</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Maps memory exported from another process with <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a> into the current device address space. For contexts on different devices <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a> can attempt to enable peer access between the devices as if the user called <a class="xref" href="group__CUDART__PEER.html#group__CUDART__PEER_1g2b0adabf90db37e5cfddc92cbb2589f3" title="Enables direct access to memory allocations on a peer device." shape="rect">cudaDeviceEnablePeerAccess</a>. This behavior is controlled by the <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g60f28a5142ee7ae0336dfa83fd54e006" shape="rect">cudaIpcMemLazyEnablePeerAccess</a> flag. <a class="xref" href="group__CUDART__PEER.html#group__CUDART__PEER_1g4db0d04e44995d5c1c34be4ecc863f22" title="Queries if a device may directly access a peer device's memory." shape="rect">cudaDeviceCanAccessPeer</a> can determine if a mapping is possible.
                              </p>
                              <p class="p"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a> can open handles to devices that may not be visible in the process calling the API.
                              </p>
                              <p class="p">Contexts that may open cudaIpcMemHandles are restricted in the following way. cudaIpcMemHandles from each device in a given
                                 process may only be opened by one context per device per other process.
                              </p>
                              <p class="p">Memory returned from <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g01050a29fefde385b1042081ada4cde9" title="Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process." shape="rect">cudaIpcOpenMemHandle</a> must be freed with <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a>.
                              </p>
                              <p class="p">Calling <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ga042655cbbf3408f01061652a075e094" title="Frees memory on the device." shape="rect">cudaFree</a> on an exported memory region before calling <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a> in the importing context will result in undefined behavior.
                              </p>
                              <p class="p">IPC functionality is restricted to devices with support for unified addressing on Linux operating systems. IPC functionality
                                 is not supported on Tegra platforms.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">No guarantees are made about the address returned in <tt class="ph tt code">*devPtr</tt>. In particular, multiple processes may not receive the same address for the same <tt class="ph tt code">handle</tt>.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc</a>, <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ga042655cbbf3408f01061652a075e094" title="Frees memory on the device." shape="rect">cudaFree</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g89a3abe1e9a11d08c665176669109784" title="Gets an interprocess handle for a previously allocated event." shape="rect">cudaIpcGetEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g9691446ab0aec1d6e528357387ed87b2" title="Opens an interprocess event handle for use in the current process." shape="rect">cudaIpcOpenEventHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g8a37f7dfafaca652391d0758b3667539" title="Gets an interprocess memory handle for an existing device memory allocation." shape="rect">cudaIpcGetMemHandle</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g02bb3632b5d223db6acae5f8744e2c91" title="Close memory mapped with cudaIpcOpenMemHandle." shape="rect">cudaIpcCloseMemHandle</a>, <a class="xref" href="group__CUDART__PEER.html#group__CUDART__PEER_1g2b0adabf90db37e5cfddc92cbb2589f3" title="Enables direct access to memory allocations on a peer device." shape="rect">cudaDeviceEnablePeerAccess</a>, <a class="xref" href="group__CUDART__PEER.html#group__CUDART__PEER_1g4db0d04e44995d5c1c34be4ecc863f22" title="Queries if a device may directly access a peer device's memory." shape="rect">cudaDeviceCanAccessPeer</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1ga8bd126fcff919a0c996b7640f197b79" target="_blank" shape="rect">cuIpcOpenMemHandle</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" id="group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaSetDevice (  int <span>&nbsp;</span><span class="keyword keyword apiItemName">device</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Set device to be used for GPU executions. </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>- Device on which the active host thread should execute the device code.</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038459c4ec80247b489ddb9c5577fcc266a" shape="rect">cudaErrorDeviceAlreadyInUse</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Sets <tt class="ph tt code">device</tt> as the current device for the calling host thread. Valid device id's are 0 to (<a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount()</a> - 1).
                              </p>
                              <p class="p">Any device memory subsequently allocated from this host thread using <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g37d37965bfb4803b6d4e59ff26856356" title="Allocate memory on the device." shape="rect">cudaMalloc()</a>, <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g32bd7a39135594788a542ae72217775c" title="Allocates pitched memory on the device." shape="rect">cudaMallocPitch()</a> or <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1g6728eb7dc25f332f50bdb16a19620d3d" title="Allocate an array on the device." shape="rect">cudaMallocArray()</a> will be physically resident on <tt class="ph tt code">device</tt>. Any host memory allocated from this host thread using <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gab84100ae1fa1b12eaca660207ef585b" title="Allocates page-locked memory on the host." shape="rect">cudaMallocHost()</a> or <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gb65da58f444e7230d3322b6126bb4902" title="Allocates page-locked memory on the host." shape="rect">cudaHostAlloc()</a> or <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1ge8d5c17670f16ac4fc8fcb4181cb490c" title="Registers an existing host memory range for use by CUDA." shape="rect">cudaHostRegister()</a> will have its lifetime associated with <tt class="ph tt code">device</tt>. Any streams or events created from this host thread will be associated with <tt class="ph tt code">device</tt>. Any kernels launched from this host thread using the &lt;&lt;&lt;&gt;&gt;&gt; operator or <a class="xref" href="group__CUDART__EXECUTION.html#group__CUDART__EXECUTION_1g5064cdf5d8e6741ace56fd8be951783c" title="Launches a device function." shape="rect">cudaLaunchKernel()</a> will be executed on <tt class="ph tt code">device</tt>.
                              </p>
                              <p class="p">This call may be made from any host thread, to any device, and at any time. This function will do no synchronization with
                                 the previous or new device, and should be considered a very low overhead call.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1gbe562ee6258b4fcc272ca6478ca2a2f7" target="_blank" shape="rect">cuCtxSetCurrent</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" id="group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaSetDeviceFlags (  unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Sets flags to be used for device executions. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Parameters for device operation</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a906ddf08d574274bf7334adb1497550" shape="rect">cudaErrorSetOnActiveProcess</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Records <tt class="ph tt code">flags</tt> as the flags to use when initializing the current device. If no device has been made current to the calling thread, then
                                 <tt class="ph tt code">flags</tt> will be applied to the initialization of any device initialized by the calling host thread, unless that device has had its
                                 initialization flags set explicitly by this or any host thread.
                              </p>
                              <p class="p">If the current device has been set and that device has already been initialized then this call will fail with the error <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038a906ddf08d574274bf7334adb1497550" shape="rect">cudaErrorSetOnActiveProcess</a>. In this case it is necessary to reset <tt class="ph tt code">device</tt> using <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gef69dd5c6d0206c2b8d099abac61f217" title="Destroy all allocations and reset all state on the current device in the current process." shape="rect">cudaDeviceReset()</a> before the device's initialization flags may be set.
                              </p>
                              <p class="p">The two LSBs of the <tt class="ph tt code">flags</tt> parameter can be used to control how the CPU thread interacts with the OS scheduler when waiting for results from the device.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g3ade1dbaf4b222b22733cdfdcc026075" shape="rect">cudaDeviceScheduleAuto</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 <tt class="ph tt code">C</tt> and the number of logical processors in the system <tt class="ph tt code">P</tt>. If <tt class="ph tt code">C</tt> &gt; <tt class="ph tt code">P</tt>, then CUDA will yield to other OS threads when waiting for the device, otherwise CUDA will not yield while waiting for results
                                          and actively spin on the processor. Additionally, on Tegra devices, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g3ade1dbaf4b222b22733cdfdcc026075" shape="rect">cudaDeviceScheduleAuto</a> uses a heuristic based on the power profile of the platform and may choose <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g057e6912c52708b6aa86e79dd83d007c" shape="rect">cudaDeviceScheduleBlockingSync</a> for low-powered devices.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf01347c3dafebf07e1a0b4321a030a63" shape="rect">cudaDeviceScheduleSpin</a>: Instruct CUDA to actively spin when waiting for results from the device. This can decrease latency when waiting for the
                                          device, but may lower the performance of CPU threads if they are performing work in parallel with the CUDA thread.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gbc13c52d342c67ebf0f1f7af937735a8" shape="rect">cudaDeviceScheduleYield</a>: Instruct CUDA to yield its thread when waiting for results from the device. This can increase latency when waiting for the
                                          device, but can increase the performance of CPU threads performing work in parallel with the device.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g057e6912c52708b6aa86e79dd83d007c" shape="rect">cudaDeviceScheduleBlockingSync</a>: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the device to finish work.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g130ddae663f1873258fee5a6e0808b71" shape="rect">cudaDeviceBlockingSync</a>: Instruct CUDA to block the CPU thread on a synchronization primitive when waiting for the device to finish work. 
                                       </p>
                                       <p class="p"><a class="xref" href="deprecated.html#deprecated" shape="rect">Deprecated:</a> This flag was deprecated as of CUDA 4.0 and replaced with <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g057e6912c52708b6aa86e79dd83d007c" shape="rect">cudaDeviceScheduleBlockingSync</a>.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1g3762be9cccdd809a4ca128354fd134b0" shape="rect">cudaDeviceMapHost</a>: This flag enables allocating pinned host memory that is accessible to the device. It is implicit for the runtime but may
                                          be absent if a context is created using the driver API. If this flag is not set, <a class="xref" href="group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gc00502b44e5f1bdc0b424487ebb08db0" title="Passes back device pointer of mapped host memory allocated by cudaHostAlloc or registered by cudaHostRegister." shape="rect">cudaHostGetDevicePointer()</a> will always return a failure code.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gda5f97298bf704dd3b04cbac4819e6e3" shape="rect">cudaDeviceLmemResizeToMax</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"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf830794caf068b71638c6182bba8f77a" title="Gets the flags for the current device." shape="rect">cudaGetDeviceFlags</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g80861db2ce7c29b6e8055af8ae01bc78" title="Returns which device is currently being used." shape="rect">cudaGetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1b9336c70f2299405f67a4f8496d7cfe" title="Set a list of devices that can be used for CUDA." shape="rect">cudaSetValidDevices</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</a>, <a class="xref" href="../cuda-driver-api/group__CUDA__PRIMARY__CTX.html#group__CUDA__PRIMARY__CTX_1gd779a84f17acdad0d9143d9fe719cfdf" target="_blank" shape="rect">cuDevicePrimaryCtxSetFlags</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDART__DEVICE_1g1b9336c70f2299405f67a4f8496d7cfe" id="group__CUDART__DEVICE_1g1b9336c70f2299405f67a4f8496d7cfe" shape="rect">
                              <!-- --></a><span><span class="keyword keyword apiItemName">__host__</span>
                              ​<a href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gf599e5b8b829ce7db0f5216928f6ecb6" title="" shape="rect">cudaError_t</a> cudaSetValidDevices (  int*<span>&nbsp;</span><span class="keyword keyword apiItemName">device_arr</span>, int <span>&nbsp;</span><span class="keyword keyword apiItemName">len</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Set a list of devices that can be used for CUDA. </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_arr</span></tt></dt>
                                 <dd>- List of devices to try </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">len</span></tt></dt>
                                 <dd>- Number of devices in specified list</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591" shape="rect">cudaSuccess</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Sets a list of devices for CUDA execution in priority order using <tt class="ph tt code">device_arr</tt>. The parameter <tt class="ph tt code">len</tt> specifies the number of elements in the list. CUDA will try devices from the list sequentially until it finds one that works.
                                 If this function is not called, or if it is called with a <tt class="ph tt code">len</tt> of 0, then CUDA will go back to its default behavior of trying devices sequentially from a default list containing all of
                                 the available CUDA devices in the system. If a specified device ID in the list does not exist, this function will return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a" shape="rect">cudaErrorInvalidDevice</a>. If <tt class="ph tt code">len</tt> is not 0 and <tt class="ph tt code">device_arr</tt> is NULL or if <tt class="ph tt code">len</tt> exceeds the number of devices in the system, then <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c" shape="rect">cudaErrorInvalidValue</a> is returned.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><ul class="ul">
                                       <li class="li">
                                          <p class="p">Note that this function may also return error codes from previous, asynchronous launches. </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that this function may also return <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038ce7993a88ecf2c57b8102d55d997a18c" shape="rect">cudaErrorInitializationError</a>, <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038f5e52d1774934b77ba55d2aa2c063067" shape="rect">cudaErrorInsufficientDriver</a> or <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e0038e942e4cbbd2bef6e92e293253f055613" shape="rect">cudaErrorNoDevice</a> if this call tries to initialize internal CUDA RT state. 
                                          </p>
                                       </li>
                                       <li class="li">
                                          <p class="p">Note that as specified by <a class="xref" href="group__CUDART__STREAM.html#group__CUDART__STREAM_1g74aa9f4b1c2f12d994bf13876a5a2498" title="Add a callback to a compute stream." shape="rect">cudaStreamAddCallback</a> no CUDA function may be called from callback. <a class="xref" href="group__CUDART__TYPES.html#group__CUDART__TYPES_1gg3f51e3575c2178246db0a94a430e003867b6095ab719b21659a400b553963eb3" shape="rect">cudaErrorNotPermitted</a> may, but is not guaranteed to, be returned as a diagnostic in such case.
                                          </p>
                                       </li>
                                    </ul>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g18808e54893cfcaafefeab31a73cc55f" title="Returns the number of compute-capable devices." shape="rect">cudaGetDeviceCount</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb" title="Set device to be used for GPU executions." shape="rect">cudaSetDevice</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g1bf9d625a931d657e08db2b4391170f0" title="Returns information about the compute-device." shape="rect">cudaGetDeviceProperties</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g69e73c7dda3fc05306ae7c811a690fac" title="Sets flags to be used for device executions." shape="rect">cudaSetDeviceFlags</a>, <a class="xref" href="group__CUDART__DEVICE.html#group__CUDART__DEVICE_1gf61f9ae0fe2d93b5b968756684a49460" title="Select compute-device which best matches criteria." shape="rect">cudaChooseDevice</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><script type="text/javascript">_satellite.pageBottom();</script></body>
</html>