Sophie

Sophie

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

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 9 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__D3D9"></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__GL__DEPRECATED.html" shape="rect">&lt; Previous</a> | <a href="group__CUDA__D3D9__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__D3D9"><a name="group__CUDA__D3D9" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.26.&nbsp;Direct3D 9 Interoperability</h2>
                  <div class="section">
                     <p>This section describes the Direct3D 9 interoperability functions of the low-level CUDA driver application programming interface.
                        Note that mapping of Direct3D 9 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__D3D9__DEPRECATED.html#group__CUDA__D3D9__DEPRECATED" shape="rect">Direct3D 9 Interoperability [DEPRECATED]</a></div></span></dt>
                     <dd class="shortdesc"><span></span><span class="desc"></span><a href="group__CUDA__D3D9__DEPRECATED.html#group__CUDA__D3D9__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__D3D9_1g2cf4b668539659fec0dba41bcc999f6d" shape="rect">CUd3d9DeviceList</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__D3D9_1gab201a2284d11b00cdb4d6bba492e520" shape="rect">cuD3D9CtxCreate</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCtx</span>, <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>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">Flags</span>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DDevice</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create a CUDA context for interoperability with Direct3D 9. </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__D3D9_1gcaca5329caf0c0253a5a944ecc958742" shape="rect">cuD3D9CtxCreateOnDevice</a> (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCtx</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DDevice</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a><span>&nbsp;</span><span class="keyword keyword apiItemName">cudaDevice</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Create a CUDA context for interoperability with Direct3D 9. </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__D3D9_1ge293c667e76dafaaf47ce64d0bd91c4d" shape="rect">cuD3D9GetDevice</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>, const char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pszAdapterName</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__D3D9_1g2c53ac0b20c57738fa497d1f8992f7ad" shape="rect">cuD3D9GetDevices</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>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3D9Device</span>, <a href="group__CUDA__D3D9.html#group__CUDA__D3D9_1g2cf4b668539659fec0dba41bcc999f6d" title="" shape="rect">CUd3d9DeviceList</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 9 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__D3D9_1g439e074e2b46156f859c40ddaaf3d3fb" shape="rect">cuD3D9GetDirect3DDevice</a> (  IDirect3DDevice9**<span>&nbsp;</span><span class="keyword keyword apiItemName">ppD3DDevice</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Get the Direct3D 9 device against which the current CUDA context was created. </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__D3D9_1g391835e0d3c5a34bdba99840157194bf" shape="rect">cuGraphicsD3D9RegisterResource</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>, IDirect3DResource9*<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 9 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__D3D9_1g2cf4b668539659fec0dba41bcc999f6d" id="group__CUDA__D3D9_1g2cf4b668539659fec0dba41bcc999f6d" shape="rect">
                              <!-- --></a><span>enum CUd3d9DeviceList</span></dt>
                        <dd class="description">
                           <div class="section">
                              <p>CUDA devices corresponding to a D3D9 device </p>
                           </div>
                           <div class="enum-members">
                              <h6 class="enumerator_header">
                                 Values
                                 
                              </h6>
                              <dl class="enumerator">
                                 <dt><span class="enum-member-name-def">CU_D3D9_DEVICE_LIST_ALL = <span class="ph ph apiData">0x01</span></span></dt>
                                 <dd>The CUDA devices for all GPUs used by a D3D9 device </dd>
                                 <dt><span class="enum-member-name-def">CU_D3D9_DEVICE_LIST_CURRENT_FRAME = <span class="ph ph apiData">0x02</span></span></dt>
                                 <dd>The CUDA devices for the GPUs used by a D3D9 device in its currently rendering frame </dd>
                                 <dt><span class="enum-member-name-def">CU_D3D9_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 D3D9 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__D3D9_1gab201a2284d11b00cdb4d6bba492e520" id="group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D9CtxCreate (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCtx</span>, <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>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">Flags</span>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DDevice</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create a CUDA context for interoperability with Direct3D 9. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCtx</span></tt></dt>
                                 <dd>- Returned newly created CUDA context </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCudaDevice</span></tt></dt>
                                 <dd>- Returned pointer to the device on which the context was created </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">Flags</span></tt></dt>
                                 <dd>- Context creation flags (see <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate()</a> for details) 
                                 </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pD3DDevice</span></tt></dt>
                                 <dd>- Direct3D device to create interoperability context with</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_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a new CUDA context, enables interoperability for that context with the Direct3D device <tt class="ph tt code">pD3DDevice</tt>, and associates the created CUDA context with the calling thread. The created <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> will be returned in <tt class="ph tt code">*pCtx</tt>. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context. If <tt class="ph tt code">pCudaDevice</tt> is non-NULL then the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" shape="rect">CUdevice</a> on which this CUDA context was created will be returned in <tt class="ph tt code">*pCudaDevice</tt>.
                              </p>
                              <p class="p">On success, this call will increase the internal reference count on <tt class="ph tt code">pD3DDevice</tt>. This reference count will be decremented upon destruction of this context through <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy()</a>. This context will cease to function if <tt class="ph tt code">pD3DDevice</tt> is destroyed or encounters an error.
                              </p>
                              <p class="p">Note that this function is never required for correct functionality. Use of this function will result in accelerated interoperability
                                 only when the operating system is Windows Vista or Windows 7, and the device <tt class="ph tt code">pD3DDdevice</tt> is not an IDirect3DDevice9Ex. In all other circumstances, this function is not necessary.
                              </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__D3D9.html#group__CUDA__D3D9_1ge293c667e76dafaaf47ce64d0bd91c4d" title="Gets the CUDA device corresponding to a display adapter." shape="rect">cuD3D9GetDevice</a>, <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1g391835e0d3c5a34bdba99840157194bf" title="Register a Direct3D 9 resource for access by CUDA." shape="rect">cuGraphicsD3D9RegisterResource</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D9_1gcaca5329caf0c0253a5a944ecc958742" id="group__CUDA__D3D9_1gcaca5329caf0c0253a5a944ecc958742" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D9CtxCreateOnDevice (  <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" title="" shape="rect">CUcontext</a>*<span>&nbsp;</span><span class="keyword keyword apiItemName">pCtx</span>, unsigned int <span>&nbsp;</span><span class="keyword keyword apiItemName">flags</span>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3DDevice</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" title="" shape="rect">CUdevice</a><span>&nbsp;</span><span class="keyword keyword apiItemName">cudaDevice</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Create a CUDA context for interoperability with Direct3D 9. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pCtx</span></tt></dt>
                                 <dd>- Returned newly created CUDA context </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">flags</span></tt></dt>
                                 <dd>- Context creation flags (see <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g65dc0012348bc84810e2103a40d8e2cf" title="Create a CUDA context." shape="rect">cuCtxCreate()</a> for details) 
                                 </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pD3DDevice</span></tt></dt>
                                 <dd>- Direct3D device to create interoperability context with </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">cudaDevice</span></tt></dt>
                                 <dd>- The CUDA device on which to create the context. This device must be among the devices returned when querying CU_D3D9_DEVICES_ALL
                                    from <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1g2c53ac0b20c57738fa497d1f8992f7ad" title="Gets the CUDA devices corresponding to a Direct3D 9 device." shape="rect">cuD3D9GetDevices</a>.
                                 </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_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9264c50688ed110e8476b591befe60c02" shape="rect">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9c5a6ab0245179d297f1fa56ed0097183" shape="rect">CUDA_ERROR_UNKNOWN</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Creates a new CUDA context, enables interoperability for that context with the Direct3D device <tt class="ph tt code">pD3DDevice</tt>, and associates the created CUDA context with the calling thread. The created <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> will be returned in <tt class="ph tt code">*pCtx</tt>. Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.
                              </p>
                              <p class="p">On success, this call will increase the internal reference count on <tt class="ph tt code">pD3DDevice</tt>. This reference count will be decremented upon destruction of this context through <a class="xref" href="group__CUDA__CTX.html#group__CUDA__CTX_1g27a365aebb0eb548166309f58a1e8b8e" title="Destroy a CUDA context." shape="rect">cuCtxDestroy()</a>. This context will cease to function if <tt class="ph tt code">pD3DDevice</tt> is destroyed or encounters an error.
                              </p>
                              <p class="p">Note that this function is never required for correct functionality. Use of this function will result in accelerated interoperability
                                 only when the operating system is Windows Vista or Windows 7, and the device <tt class="ph tt code">pD3DDdevice</tt> is not an IDirect3DDevice9Ex. In all other circumstances, this function is not necessary.
                              </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__D3D9.html#group__CUDA__D3D9_1g2c53ac0b20c57738fa497d1f8992f7ad" title="Gets the CUDA devices corresponding to a Direct3D 9 device." shape="rect">cuD3D9GetDevices</a>, <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1g391835e0d3c5a34bdba99840157194bf" title="Register a Direct3D 9 resource for access by CUDA." shape="rect">cuGraphicsD3D9RegisterResource</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D9_1ge293c667e76dafaaf47ce64d0bd91c4d" id="group__CUDA__D3D9_1ge293c667e76dafaaf47ce64d0bd91c4d" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D9GetDevice (  <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>, const char*<span>&nbsp;</span><span class="keyword keyword apiItemName">pszAdapterName</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 pszAdapterName </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">pszAdapterName</span></tt></dt>
                                 <dd>- Adapter name to query for 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_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 name <tt class="ph tt code">pszAdapterName</tt> obtained from EnumDisplayDevices() or IDirect3D9::GetAdapterIdentifier().
                              </p>
                              <p class="p">If no device on the adapter with name <tt class="ph tt code">pszAdapterName</tt> is CUDA-compatible, then the call will fail.
                              </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__D3D9.html#group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" title="Create a CUDA context for interoperability with Direct3D 9." shape="rect">cuD3D9CtxCreate</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D9_1g2c53ac0b20c57738fa497d1f8992f7ad" id="group__CUDA__D3D9_1g2c53ac0b20c57738fa497d1f8992f7ad" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D9GetDevices (  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>, IDirect3DDevice9*<span>&nbsp;</span><span class="keyword keyword apiItemName">pD3D9Device</span>, <a href="group__CUDA__D3D9.html#group__CUDA__D3D9_1g2cf4b668539659fec0dba41bcc999f6d" title="" shape="rect">CUd3d9DeviceList</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 9 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">pD3D9Device</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">pD3D9Device</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">pD3D9Device</span></tt></dt>
                                 <dd>- Direct3D 9 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__D3D9.html#group__CUDA__D3D9_1gg2cf4b668539659fec0dba41bcc999f6d7d126d9cf1514d7c41b38cf84113a4dd" shape="rect">CU_D3D9_DEVICE_LIST_ALL</a> for all devices, <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1gg2cf4b668539659fec0dba41bcc999f6df8bd68d9d5a86fbf3c9e60ab2e607e41" shape="rect">CU_D3D9_DEVICE_LIST_CURRENT_FRAME</a> for the devices used to render the current frame (in SLI), or <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1gg2cf4b668539659fec0dba41bcc999f6d111afda57f25cc5c51a02078ca0530f2" shape="rect">CU_D3D9_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 9 device <tt class="ph tt code">pD3D9Device</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 9 device <tt class="ph tt code">pD3D9Device</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__D3D9.html#group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" title="Create a CUDA context for interoperability with Direct3D 9." shape="rect">cuD3D9CtxCreate</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D9_1g439e074e2b46156f859c40ddaaf3d3fb" id="group__CUDA__D3D9_1g439e074e2b46156f859c40ddaaf3d3fb" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuD3D9GetDirect3DDevice (  IDirect3DDevice9**<span>&nbsp;</span><span class="keyword keyword apiItemName">ppD3DDevice</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Get the Direct3D 9 device against which the current CUDA context was created. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ppD3DDevice</span></tt></dt>
                                 <dd>- Returned Direct3D device corresponding to CUDA context</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>Returns in <tt class="ph tt code">*ppD3DDevice</tt> the Direct3D device against which this CUDA context was created in <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" title="Create a CUDA context for interoperability with Direct3D 9." shape="rect">cuD3D9CtxCreate()</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__D3D9.html#group__CUDA__D3D9_1ge293c667e76dafaaf47ce64d0bd91c4d" title="Gets the CUDA device corresponding to a display adapter." shape="rect">cuD3D9GetDevice</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__D3D9_1g391835e0d3c5a34bdba99840157194bf" id="group__CUDA__D3D9_1g391835e0d3c5a34bdba99840157194bf" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuGraphicsD3D9RegisterResource (  <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>, IDirect3DResource9*<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 9 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 9 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">IDirect3DVertexBuffer9: may be accessed through a device pointer</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">IDirect3DIndexBuffer9: may be accessed through a device pointer</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">IDirect3DSurface9: may be accessed through an array. Only stand-alone objects of type IDirect3DSurface9 may be explicitly
                                          shared. In particular, individual mipmap levels and faces of cube maps may not be registered directly. To access individual
                                          surfaces associated with a texture, one must register the base texture object.
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">IDirect3DBaseTexture9: individual surfaces on this texture may be accessed through an array.</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 formats is as follows:
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">D3DFMT_L8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_L16</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A8R8G8B8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_X8R8G8B8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_G16R16</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A8B8G8R8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A8L8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_Q8W8V8U8</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_V16U16</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A16B16G16R16F</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A16B16G16R16</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_R32F</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_G16R16F</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_A32B32G32R32F</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_G32R32F</p>
                                    </li>
                                    <li class="li">
                                       <p class="p">D3DFMT_R16F</p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">If Direct3D interoperability is not initialized for this context using <a class="xref" href="group__CUDA__D3D9.html#group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" title="Create a CUDA context for interoperability with Direct3D 9." shape="rect">cuD3D9CtxCreate</a> then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a> is returned. 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__D3D9.html#group__CUDA__D3D9_1gab201a2284d11b00cdb4d6bba492e520" title="Create a CUDA context for interoperability with Direct3D 9." shape="rect">cuD3D9CtxCreate</a>, <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__D3D9__DEPRECATED"><a name="inner_elem__group__CUDA__D3D9__DEPRECATED" shape="rect">
                        <!-- --></a><h3 class="topictitle3 cppModule">Direct3D 9 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>