Sophie

Sophie

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

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

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
      <meta name="copyright" content="(C) Copyright 2005"></meta>
      <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta>
      <meta name="DC.Type" content="cppModule"></meta>
      <meta name="DC.Title" content="Direct3D 11 Interoperability"></meta>
      <meta name="abstract" content=""></meta>
      <meta name="description" content=""></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="group__CUDA__D3D11"></meta>
      <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link>
      <title>CUDA Driver API :: CUDA Toolkit Documentation</title>
      <!--[if lt IE 9]>
      <script src="../common/formatting/html5shiv-printshiv.min.js"></script>
      <![endif]-->
      <script type="text/javascript" charset="utf-8" src="../common/scripts/tynt/tynt.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script>
      <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script>
      <script type="text/javascript" src="../search/htmlFileList.js"></script>
      <script type="text/javascript" src="../search/htmlFileInfoList.js"></script>
      <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script>
      <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script>
      <script type="text/javascript" src="../search/index-1.js"></script>
      <script type="text/javascript" src="../search/index-2.js"></script>
      <script type="text/javascript" src="../search/index-3.js"></script>
      <link rel="canonical" href="http://docs.nvidia.com/cuda/cuda-driver-api/index.html"></link>
      <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link>
   </head>
   <body>
      
      <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search">
            <input type="text" name="search-text"></input><fieldset id="search-location">
               <legend>Search In:</legend>
               <label><input type="radio" name="search-type" value="site"></input>Entire Site</label>
               <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset>
            <button type="reset">clear search</button>
            <button id="submit" type="submit">search</button></form>
      </header>
      <div id="site-content">
         <nav id="site-nav">
            <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit
                  v6.5</a></div>
            <div class="category"><a href="index.html" title="CUDA Driver API">CUDA Driver API</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="api-sync-behavior.html#api-sync-behavior">1.&nbsp;API synchronization behavior </a></div>
               </li>
               <li>
                  <div class="section-link"><a href="stream-sync-behavior.html#stream-sync-behavior">2.&nbsp;Stream synchronization behavior</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="modules.html#modules">3.&nbsp;Modules</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES">3.1.&nbsp;Data types used by CUDA driver</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__ERROR.html#group__CUDA__ERROR">3.2.&nbsp;Error Handling</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__INITIALIZE.html#group__CUDA__INITIALIZE">3.3.&nbsp;Initialization</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VERSION.html#group__CUDA__VERSION">3.4.&nbsp;Version Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE.html#group__CUDA__DEVICE">3.5.&nbsp;Device Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE__DEPRECATED.html#group__CUDA__DEVICE__DEPRECATED">3.6.&nbsp;Device Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX.html#group__CUDA__CTX">3.7.&nbsp;Context Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX__DEPRECATED.html#group__CUDA__CTX__DEPRECATED">3.8.&nbsp;Context Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MODULE.html#group__CUDA__MODULE">3.9.&nbsp;Module Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MEM.html#group__CUDA__MEM">3.10.&nbsp;Memory Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__UNIFIED.html#group__CUDA__UNIFIED">3.11.&nbsp;Unified Addressing</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__STREAM.html#group__CUDA__STREAM">3.12.&nbsp;Stream Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EVENT.html#group__CUDA__EVENT">3.13.&nbsp;Event Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC.html#group__CUDA__EXEC">3.14.&nbsp;Execution Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC__DEPRECATED.html#group__CUDA__EXEC__DEPRECATED">3.15.&nbsp;Execution Control [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__OCCUPANCY.html#group__CUDA__OCCUPANCY">3.16.&nbsp;Occupancy</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF.html#group__CUDA__TEXREF">3.17.&nbsp;Texture Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF__DEPRECATED.html#group__CUDA__TEXREF__DEPRECATED">3.18.&nbsp;Texture Reference Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFREF.html#group__CUDA__SURFREF">3.19.&nbsp;Surface Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXOBJECT.html#group__CUDA__TEXOBJECT">3.20.&nbsp;Texture Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFOBJECT.html#group__CUDA__SURFOBJECT">3.21.&nbsp;Surface Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PEER__ACCESS.html#group__CUDA__PEER__ACCESS">3.22.&nbsp;Peer Context Memory Access</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS">3.23.&nbsp;Graphics Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PROFILER.html#group__CUDA__PROFILER">3.24.&nbsp;Profiler Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GL.html#group__CUDA__GL">3.25.&nbsp;OpenGL Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__GL__DEPRECATED.html#group__CUDA__GL__DEPRECATED">3.25.1.&nbsp;OpenGL Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D9.html#group__CUDA__D3D9">3.26.&nbsp;Direct3D 9 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D9__DEPRECATED.html#group__CUDA__D3D9__DEPRECATED">3.26.1.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D10.html#group__CUDA__D3D10">3.27.&nbsp;Direct3D 10 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D10__DEPRECATED.html#group__CUDA__D3D10__DEPRECATED">3.27.1.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D11.html#group__CUDA__D3D11">3.28.&nbsp;Direct3D 11 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D11__DEPRECATED.html#group__CUDA__D3D11__DEPRECATED">3.28.1.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VDPAU.html#group__CUDA__VDPAU">3.29.&nbsp;VDPAU Interoperability</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="annotated.html#annotated">4.&nbsp;Data Structures</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="structCUDA__ARRAY3D__DESCRIPTOR.html#structCUDA__ARRAY3D__DESCRIPTOR">4.1.&nbsp;CUDA_ARRAY3D_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__ARRAY__DESCRIPTOR.html#structCUDA__ARRAY__DESCRIPTOR">4.2.&nbsp;CUDA_ARRAY_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY2D.html#structCUDA__MEMCPY2D">4.3.&nbsp;CUDA_MEMCPY2D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D.html#structCUDA__MEMCPY3D">4.4.&nbsp;CUDA_MEMCPY3D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D__PEER.html#structCUDA__MEMCPY3D__PEER">4.5.&nbsp;CUDA_MEMCPY3D_PEER</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS.html#structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS">4.6.&nbsp;CUDA_POINTER_ATTRIBUTE_P2P_TOKENS</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__DESC.html#structCUDA__RESOURCE__DESC">4.7.&nbsp;CUDA_RESOURCE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__VIEW__DESC.html#structCUDA__RESOURCE__VIEW__DESC">4.8.&nbsp;CUDA_RESOURCE_VIEW_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__TEXTURE__DESC.html#structCUDA__TEXTURE__DESC">4.9.&nbsp;CUDA_TEXTURE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUdevprop.html#structCUdevprop">4.10.&nbsp;CUdevprop</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcEventHandle.html#structCUipcEventHandle">4.11.&nbsp;CUipcEventHandle</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcMemHandle.html#structCUipcMemHandle">4.12.&nbsp;CUipcMemHandle</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="functions.html#functions">5.&nbsp;Data Fields</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="deprecated.html#deprecated">6.&nbsp;Deprecated List</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="notices-header.html#notices-header">Notices</a></div>
                  <ul></ul>
               </li>
            </ul>
         </nav>
         <div id="resize-nav"></div>
         <nav id="search-results">
            <h2>Search Results</h2>
            <ol></ol>
         </nav>
         
         <div id="contents-container">
            <div id="breadcrumbs-container">
               <div id="breadcrumbs"><a href="group__CUDA__D3D10__DEPRECATED.html" shape="rect">&lt; Previous</a> | <a href="group__CUDA__D3D11__DEPRECATED.html" shape="rect">Next &gt;</a></div>
               <div id="release-info">CUDA Driver API
                  (<a href="../../pdf/CUDA_Driver_API.pdf">PDF</a>)
                  -
                  
                  v6.5
                  (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>)
                  -
                  Last updated August 1, 2014
                  -
                  <a href="mailto:cudatools@nvidia.com?subject=CUDA Toolkit Documentation Feedback: CUDA Driver API">Send Feedback</a>
                  -
                  <span class="st_facebook"></span><span class="st_twitter"></span><span class="st_linkedin"></span><span class="st_reddit"></span><span class="st_slashdot"></span><span class="st_tumblr"></span><span class="st_sharethis"></span></div>
            </div>
            <article id="contents">
               <div class="topic reference apiRef apiPackage cppModule" id="group__CUDA__D3D11"><a name="group__CUDA__D3D11" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.28.&nbsp;Direct3D 11 Interoperability</h2>
                  <div class="section">
                     <p>This section describes the Direct3D 11 interoperability functions of the low-level CUDA driver application programming interface.
                        Note that mapping of Direct3D 11 resources is performed with the graphics API agnostic, resource mapping interface described
                        in <a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS" shape="rect">Graphics Interoperability</a>. 
                     </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Modules</h3>
                  <dl class="members">
                     <dt><span class="member_type">&nbsp;</span><span class="member_name">
                           <div><a class="link" href="group__CUDA__D3D11__DEPRECATED.html#group__CUDA__D3D11__DEPRECATED" shape="rect">Direct3D 11 Interoperability [DEPRECATED]</a></div></span></dt>
                     <dd class="shortdesc"><span></span><span class="desc"></span><a href="group__CUDA__D3D11__DEPRECATED.html#group__CUDA__D3D11__DEPRECATED" class="link" title="" shape="rect"></a></dd>
                  </dl>
                  <h3 class="fake_sectiontitle member_header">Enumerations</h3>
                  <dl class="members">
                     <dt><span class="member_type">enum&nbsp;</span><span class="member_name"><a href="#group__CUDA__D3D11_1gf590094e914ab0d2c6a5385711496500" shape="rect">CUd3d11DeviceList</a></span></dt>
                     <dd class="shortdesc"><span></span><span class="desc"></span></dd>
                  </dl>
                  <h3 class="fake_sectiontitle member_header">Functions</h3>
                  <dl class="members">
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__D3D11_1ga1f1648cdf3bd5aef7a55af6dc1f42cd" shape="rect">cuD3D11GetDevice</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDevice</span>, IDXGIAdapter*<span>&nbsp;</span><span class="keyword keyword apiItemName">pAdapter</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets the CUDA device corresponding to a display adapter. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__D3D11_1g7fca109b0dba2050b58f6bac627ff441" shape="rect">cuD3D11GetDevices</a> (  unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDeviceCount</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDevices</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">cudaDeviceCount</span>, ID3D11Device*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3D11Device</span>, <a href="group__CUDA__D3D11.html#group__CUDA__D3D11_1gf590094e914ab0d2c6a5385711496500" title="" shape="rect">CUd3d11DeviceList</a><span>&nbsp;</span><span class="keyword keyword apiItemName">deviceList</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Gets the CUDA devices corresponding to a Direct3D 11 device. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__D3D11_1g4c02792aa87c3acc255b9de15b0509da" shape="rect">cuGraphicsD3D11RegisterResource</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc0c4e1704647178d9c5ba3be46517dcd" title="" shape="rect">CUgraphicsResource</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaResource</span>, ID3D11Resource*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DResource</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">Flags</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Register a Direct3D 11 resource for access by CUDA. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Enumerations</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDA__D3D11_1gf590094e914ab0d2c6a5385711496500" id="group__CUDA__D3D11_1gf590094e914ab0d2c6a5385711496500" shape="rect">
                              <!-- --></a><span>enum CUd3d11DeviceList</span></dt>
                        <dd class="description">
                           <div class="section">
                              <p>CUDA devices corresponding to a D3D11 device </p>
                           </div>
                           <div class="enum-members">
                              <h6 class="enumerator_header">
                                 Values
                                 
                              </h6>
                              <dl class="enumerator">
                                 <dt><span class="enum-member-name-def">CU_D3D11_DEVICE_LIST_ALL = <span class="ph ph apiData">0x01</span></span></dt>
                                 <dd>The CUDA devices for all GPUs used by a D3D11 device </dd>
                                 <dt><span class="enum-member-name-def">CU_D3D11_DEVICE_LIST_CURRENT_FRAME = <span class="ph ph apiData">0x02</span></span></dt>
                                 <dd>The CUDA devices for the GPUs used by a D3D11 device in its currently rendering frame </dd>
                                 <dt><span class="enum-member-name-def">CU_D3D11_DEVICE_LIST_NEXT_FRAME = <span class="ph ph apiData">0x03</span></span></dt>
                                 <dd>The CUDA devices for the GPUs to be used by a D3D11 device in the next frame </dd>
                              </dl>
                           </div>
                        </dd>
                     </dl>
                  </div>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDA__D3D11_1ga1f1648cdf3bd5aef7a55af6dc1f42cd" id="group__CUDA__D3D11_1ga1f1648cdf3bd5aef7a55af6dc1f42cd" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D11GetDevice (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDevice</span>, IDXGIAdapter*<span>&nbsp;</span><span class="keyword keyword apiItemName">pAdapter</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets the CUDA device corresponding to a display adapter. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCudaDevice</span></tt></dt>
                                 <dd>- Returned CUDA device corresponding to <tt class="ph tt code">pAdapter</tt></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pAdapter</span></tt></dt>
                                 <dd>- Adapter to query for CUDA device</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9761bea84083d384d4fb88d51d972aada" shape="rect">CUDA_ERROR_NO_DEVICE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9af1cadbeb21d3a78115ca211ba44c053" shape="rect">CUDA_ERROR_NOT_FOUND</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*pCudaDevice</tt> the CUDA-compatible device corresponding to the adapter <tt class="ph tt code">pAdapter</tt> obtained from IDXGIFactory::EnumAdapters.
                              </p>
                              <p class="p">If no device on <tt class="ph tt code">pAdapter</tt> is CUDA-compatible the call will return <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9761bea84083d384d4fb88d51d972aada" shape="rect">CUDA_ERROR_NO_DEVICE</a>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDA__D3D11.html#group__CUDA__D3D11_1g7fca109b0dba2050b58f6bac627ff441" title="Gets the CUDA devices corresponding to a Direct3D 11 device." shape="rect">cuD3D11GetDevices</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D11_1g7fca109b0dba2050b58f6bac627ff441" id="group__CUDA__D3D11_1g7fca109b0dba2050b58f6bac627ff441" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D11GetDevices (  unsigned int*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDeviceCount</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaDevices</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">cudaDeviceCount</span>, ID3D11Device*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3D11Device</span>, <a href="group__CUDA__D3D11.html#group__CUDA__D3D11_1gf590094e914ab0d2c6a5385711496500" title="" shape="rect">CUd3d11DeviceList</a><span>&nbsp;</span><span class="keyword keyword apiItemName">deviceList</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Gets the CUDA devices corresponding to a Direct3D 11 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">pCudaDeviceCount</span></tt></dt>
                                 <dd>- Returned number of CUDA devices corresponding to <tt class="ph tt code">pD3D11Device</tt></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCudaDevices</span></tt></dt>
                                 <dd>- Returned CUDA devices corresponding to <tt class="ph tt code">pD3D11Device</tt></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">cudaDeviceCount</span></tt></dt>
                                 <dd>- The size of the output device array <tt class="ph tt code">pCudaDevices</tt></dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pD3D11Device</span></tt></dt>
                                 <dd>- Direct3D 11 device to query for CUDA devices </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">deviceList</span></tt></dt>
                                 <dd>- The set of devices to return. This set may be <a class="xref" href="group__CUDA__D3D11.html#group__CUDA__D3D11_1ggf590094e914ab0d2c6a5385711496500f6d10bf4ca0a08ec3a8638799a42f06d" shape="rect">CU_D3D11_DEVICE_LIST_ALL</a> for all devices, <a class="xref" href="group__CUDA__D3D11.html#group__CUDA__D3D11_1ggf590094e914ab0d2c6a5385711496500cf10944d19f95ddebf5e2a56b3313bb2" shape="rect">CU_D3D11_DEVICE_LIST_CURRENT_FRAME</a> for the devices used to render the current frame (in SLI), or <a class="xref" href="group__CUDA__D3D11.html#group__CUDA__D3D11_1ggf590094e914ab0d2c6a53857114965006f90591f1e5804a28848a8ce6654d986" shape="rect">CU_D3D11_DEVICE_LIST_NEXT_FRAME</a> for the devices used to render the next frame (in SLI).
                                 </dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9761bea84083d384d4fb88d51d972aada" shape="rect">CUDA_ERROR_NO_DEVICE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9af1cadbeb21d3a78115ca211ba44c053" shape="rect">CUDA_ERROR_NOT_FOUND</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*pCudaDeviceCount</tt> the number of CUDA-compatible device corresponding to the Direct3D 11 device <tt class="ph tt code">pD3D11Device</tt>. Also returns in <tt class="ph tt code">*pCudaDevices</tt> at most <tt class="ph tt code">cudaDeviceCount</tt> of the CUDA-compatible devices corresponding to the Direct3D 11 device <tt class="ph tt code">pD3D11Device</tt>.
                              </p>
                              <p class="p">If any of the GPUs being used to render <tt class="ph tt code">pDevice</tt> are not CUDA capable then the call will return <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9761bea84083d384d4fb88d51d972aada" shape="rect">CUDA_ERROR_NO_DEVICE</a>.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDA__D3D11.html#group__CUDA__D3D11_1ga1f1648cdf3bd5aef7a55af6dc1f42cd" title="Gets the CUDA device corresponding to a display adapter." shape="rect">cuD3D11GetDevice</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D11_1g4c02792aa87c3acc255b9de15b0509da" id="group__CUDA__D3D11_1g4c02792aa87c3acc255b9de15b0509da" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuGraphicsD3D11RegisterResource (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc0c4e1704647178d9c5ba3be46517dcd" title="" shape="rect">CUgraphicsResource</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCudaResource</span>, ID3D11Resource*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DResource</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">Flags</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Register a Direct3D 11 resource for access by 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">pCudaResource</span></tt></dt>
                                 <dd>- Returned graphics resource handle </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pD3DResource</span></tt></dt>
                                 <dd>- Direct3D resource to register </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">Flags</span></tt></dt>
                                 <dd>- Parameters for resource registration</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e90fd2e63260c6317ba943af0f7e4b8d21" shape="rect">CUDA_ERROR_INVALID_HANDLE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Registers the Direct3D 11 resource <tt class="ph tt code">pD3DResource</tt> for access by CUDA and returns a CUDA handle to <tt class="ph tt code">pD3Dresource</tt> in <tt class="ph tt code">pCudaResource</tt>. The handle returned in <tt class="ph tt code">pCudaResource</tt> may be used to map and unmap this resource until it is unregistered. On success this call will increase the internal reference
                                 count on <tt class="ph tt code">pD3DResource</tt>. This reference count will be decremented when this resource is unregistered through <a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS_1ga7e5e97b74eaa13dfa6582e853e4c96d" title="Unregisters a graphics resource for access by CUDA." shape="rect">cuGraphicsUnregisterResource()</a>.
                              </p>
                              <p class="p">This call is potentially high-overhead and should not be called every frame in interactive applications.</p>
                              <p class="p">The type of <tt class="ph tt code">pD3DResource</tt> must be one of the following.
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">ID3D11Buffer: may be accessed through a device pointer.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">ID3D11Texture1D: individual subresources of the texture may be accessed via arrays</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">ID3D11Texture2D: individual subresources of the texture may be accessed via arrays</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">ID3D11Texture3D: individual subresources of the texture may be accessed via arrays</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">The <tt class="ph tt code">Flags</tt> argument may be used to specify additional parameters at register time. The valid values for this parameter are
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">CU_GRAPHICS_REGISTER_FLAGS_NONE: Specifies no hints about how this resource will be used.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: Specifies that CUDA will bind this resource to a surface reference.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: Specifies that CUDA will perform texture gather operations on this resource.</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Not all Direct3D resources of the above types may be used for interoperability with CUDA. The following are some limitations.
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">The primary rendertarget may not be registered with CUDA.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">Resources allocated as shared may not be registered with CUDA.</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">Textures which are not of a format which is 1, 2, or 4 channels of 8, 16, or 32-bit integer or floating-point data cannot
                                          be shared.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">Surfaces of depth or stencil formats cannot be shared.</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">A complete list of supported DXGI formats is as follows. For compactness the notation A_{B,C,D} represents A_B, A_C, and A_D.
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_A8_UNORM</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_B8G8R8A8_UNORM</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_B8G8R8X8_UNORM</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R16_FLOAT</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R16G16B16A16_{FLOAT,SINT,SNORM,UINT,UNORM}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R16G16_{FLOAT,SINT,SNORM,UINT,UNORM}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R16_{SINT,SNORM,UINT,UNORM}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R32_FLOAT</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R32G32B32A32_{FLOAT,SINT,UINT}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R32G32_{FLOAT,SINT,UINT}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R32_{SINT,UINT}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R8G8B8A8_{SINT,SNORM,UINT,UNORM,UNORM_SRGB}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R8G8_{SINT,SNORM,UINT,UNORM}</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">DXGI_FORMAT_R8_{SINT,SNORM,UINT,UNORM}</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">If <tt class="ph tt code">pD3DResource</tt> is of incorrect type or is already registered then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e90fd2e63260c6317ba943af0f7e4b8d21" shape="rect">CUDA_ERROR_INVALID_HANDLE</a> is returned. If <tt class="ph tt code">pD3DResource</tt> cannot be registered then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a> is returned. If <tt class="ph tt code">Flags</tt> is not one of the above specified value then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> is returned.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </p>
                              <p class="p"></p>
                              <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p>
                              <p class="p see_subsection"><a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS_1ga7e5e97b74eaa13dfa6582e853e4c96d" title="Unregisters a graphics resource for access by CUDA." shape="rect">cuGraphicsUnregisterResource</a>, <a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS_1gffcfd8e78d82cc4f6dd987e8bce4edb0" title="Map graphics resources for access by CUDA." shape="rect">cuGraphicsMapResources</a>, <a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS_1g61c55e987e54558cce547240d6123078" title="Get an array through which to access a subresource of a mapped graphics resource." shape="rect">cuGraphicsSubResourceGetMappedArray</a>, <a class="xref" href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS_1g8a634cf4150d399f0018061580592457" title="Get a device pointer through which to access a mapped graphics resource." shape="rect">cuGraphicsResourceGetMappedPointer</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                     </dl>
                  </div>
                  <div class="topic reference apiRef apiPackage cppModule" id="inner_elem__group__CUDA__D3D11__DEPRECATED"><a name="inner_elem__group__CUDA__D3D11__DEPRECATED" shape="rect">
                        <!-- --></a><h3 class="topictitle3 cppModule">Direct3D 11 Interoperability [DEPRECATED]</h3>
                     <div class="section">
                        <p></p>
                     </div>
                  </div>
               </div>
               
               <hr id="contents-end"></hr>
               
            </article>
         </div>
      </div>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script>
      <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script>
      <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script></body>
</html>